7#ifndef FRICTIONQPOTFEM_UNIFORMMULTILAYERLEVERDRIVE2D_H
8#define FRICTIONQPOTFEM_UNIFORMMULTILAYERLEVERDRIVE2D_H
22namespace UniformMultiLayerLeverDrive2d {
124 using size_type =
typename decltype(m_lever_hi)::size_type;
125 std::array<size_type, 1> shape = {
static_cast<size_type
>(
m_n_layer)};
127 m_lever_hi.resize(shape);
128 m_lever_hi.fill(0.0);
130 m_lever_hi_H.resize(shape);
131 m_lever_hi_H.fill(0.0);
133 m_lever_hi_H_2.resize(shape);
134 m_lever_hi_H_2.fill(0.0);
137 m_lever_target = 0.0;
144 std::string
type()
const override
146 return "FrictionQPotFEM.UniformMultiLayerLeverDrive2d.System";
163 m_lever_hi_H = m_lever_hi / H;
164 m_lever_hi_H_2 = xt::pow(m_lever_hi / H, 2.0);
176 m_lever_target = xdrive;
187 return m_lever_target;
227 auto xdrive0 = m_lever_target;
233 double infty = std::numeric_limits<double>::max();
236 for (
size_t q = 0; q <
m_nip; ++q) {
237 rigid(e, q, 0) = -infty;
238 rigid(e, q, 1) = infty;
267 m_pert_lever_target = c * xlever;
288 template <
class T,
class U,
class W>
289 double initEventDriven(
double xlever,
const T& active,
const U& delta_u,
const W& delta_ubar)
297 m_pert_lever_target = c * xlever;
305 bool yield_element =
false,
306 bool fallback =
false)
override
322 return m_pert_lever_target;
337 m_lever_u = m_lever_target;
343 n += m_lever_hi_H_2(i);
367 double m_lever_target;
369 double m_pert_lever_target;
long minimise(size_t nmargin=0, double tol=1e-5, size_t niter_tol=20, size_t max_iter=1e7, bool time_activity=false, bool max_iter_is_error=true)
Minimise energy: run System::timeStep until a mechanical equilibrium has been reached.
double eta() const
Get the damping at the interface.
double rho() const
Mass density.
void setV(const T &v)
Overwrite nodal velocities.
GMatElastoPlasticQPot::Cartesian2d::Cusp< 2 > m_plas
Material for plastic el.
array_type::tensor< double, 2 > m_a
Nodal accelerations.
double eventDriven_setDeltaU(const T &delta_u, bool autoscale=true)
Set purely elastic and linear response to specific boundary conditions.
size_t m_inc
Current increment (current time = m_dt * m_inc).
void setU(const T &u)
Overwrite nodal displacements.
array_type::tensor< double, 2 > m_v
Nodal velocities.
const auto & coor() const
Nodal coordinates.
void computeForceMaterial()
Update m_fmaterial based on the current displacement field m_u.
virtual void setInc(size_t arg)
Set increment.
const auto & conn() const
Connectivity.
double dt() const
Get time step.
array_type::tensor< double, 2 > m_u
Nodal displacements.
const auto & dofs() const
DOFs per node.
bool isHomogeneousElastic() const
Check if elasticity is homogeneous.
virtual double eventDrivenStep(double deps, bool kick, int direction=1, bool yield_element=false, bool iterative=false)
Add event driven step for the boundary conditions that correspond to the displacement perturbation se...
double alpha() const
Background damping density.
void setA(const T &a)
Overwrite nodal accelerations.
size_t m_nip
Number of integration points.
size_t m_nelem_plas
Number of plastic elements.
const array_type::tensor< size_t, N > & i() const
Index of the current yield strain per item.
void set_epsy(const T &epsy)
Overwrite yield strains per item.
const array_type::tensor< double, N+1 > & epsy() const
Yield strains per item.
std::vector< std::string > version_dependencies()
Return versions of this library and of all of its dependencies.
std::vector< std::string > version_compiler()
Version information of the compilers.
xt::xtensor< T, N > tensor
Fixed (static) rank array.
Friction simulations based on a disorder potential energy landscape and the finite element method.
#define FRICTIONQPOTFEM_ASSERT(expr)
All assertions are implementation as::