hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
Public Member Functions | List of all members
hpfem::physics::Elasticity< Dim > Class Template Reference

Assembles and solves the elasticity problem on the vector H1 space over dofs. More...

#include <elasticity.hpp>

Public Member Functions

 Elasticity (const fespace::DofMap< Dim > &dofs, ElasticitySetup< Dim > setup)
 
const fespace::DofMap< Dim > & dofs () const noexcept
 
const ElasticitySetup< Dim > & setup () const noexcept
 
Index num_dofs () const noexcept
 Size of the block vector, Dim · dofs().num_dofs().
 
const ElasticMaterial & material (Index cell) const
 Material of a cell.
 
assembly::VoigtMatrix< Dim > stiffness_of_cell (Index cell) const
 Voigt stiffness of a cell (assembly::isotropic_stiffness).
 
assembly::ElasticForm< Dim > form_of_cell (Index cell) const
 Per-cell form: stiffness, body force, eigenstrain.
 
assembly::AssembledSystem system () const
 
Vector solve () const
 
Eigen::Matrix< Complex, Eigen::Dynamic, Dim > displacements_at (const Vector &u, const Eigen::Matrix< Real, Eigen::Dynamic, Dim > &points) const
 
Real strain_energy (const Vector &u) const
 
NodeField mesh_velocity (const Vector &u) const
 
mesh::Mesh< Dim > deformed_mesh (const Vector &u, Real scale=1.0) const
 
adaptivity::Estimate estimate (const Vector &u, const adaptivity::EstimatorOptions &options={}) const
 
adaptivity::ElasticFacetCondition< Dim > facet_condition (Index facet) const
 The boundary conditions as seen by the estimator, per boundary facet.
 
Real energy_error (const Vector &u, const DisplacementField< Dim > &exact, const std::function< assembly::ComplexTensor< Dim >(const Point< Dim > &)> &exact_gradient, int extra_order=4) const
 
assembly::ComplexTensor< Dim > eigenstrain (Index c, const Point< Dim > &xi) const
 The total eigenstrain ε* at reference point ξ of cell c.
 
Complex l2_product (const Vector &a, const Vector &b) const
 \( \int a_h \cdot b_h\,dx \) of two block coefficient vectors (a conjugated).
 
std::vector< Vector > rigid_modes () const
 
Eigen::Matrix< Complex, Dim, 1 > displacement (const Vector &u, Index c, const Point< Dim > &xi) const
 Displacement at reference point ξ of cell c.
 
std::optional< Eigen::Matrix< Complex, Dim, 1 > > displacement_at (const Vector &u, const mesh::PointLocator< Dim > &locator, const Point< Dim > &x) const
 
assembly::ComplexTensor< Dim > strain (const Vector &u, Index c, const Point< Dim > &xi) const
 Strain ε(u) at reference point ξ of cell c.
 
Complex hoop_strain (const Vector &u, Index c, const Point< Dim > &xi) const
 
Complex hoop_stress (const Vector &u, Index c, const Point< Dim > &xi) const
 
assembly::AxisymmetricElasticForm axisymmetric_form_of_cell (Index cell) const
 Per-cell form of the axisymmetric problem (Dim = 2).
 
assembly::ComplexTensor< Dim > stress (const Vector &u, Index c, const Point< Dim > &xi) const
 

Detailed Description

template<int Dim>
class hpfem::physics::Elasticity< Dim >

Assembles and solves the elasticity problem on the vector H1 space over dofs.

Constructor & Destructor Documentation

◆ Elasticity()

template<int Dim>
hpfem::physics::Elasticity< Dim >::Elasticity ( const fespace::DofMap< Dim > &  dofs,
ElasticitySetup< Dim >  setup 
)
Exceptions
InvalidArgumentfor E ≤ 0 or ν ∉ (−1, 0.5) of a material, a displacement condition without any component, a condition / traction whose tag no boundary facet carries, a temperature vector of the wrong size, or remove_rigid_modes together with displacement conditions. Warns (log) for ν > 0.45, where the pure displacement form may lock.

Member Function Documentation

◆ axisymmetric_form_of_cell()

template<int Dim>
assembly::AxisymmetricElasticForm hpfem::physics::Elasticity< Dim >::axisymmetric_form_of_cell ( Index  cell) const

Per-cell form of the axisymmetric problem (Dim = 2).

◆ deformed_mesh()

template<int Dim>
mesh::Mesh< Dim > hpfem::physics::Elasticity< Dim >::deformed_mesh ( const Vector &  u,
Real  scale = 1.0 
) const

The mesh with its geometry moved by scale · Re u: move_nodes(mesh, mesh_velocity(u), scale) on a second-order mesh or for p = 1. An affine mesh with p ≥ 2 is first raised to geometry order 2 (edge nodes at the midpoints), so that the quadratic part of u moves the edges too. E.g. for an optical solve on the shrunk part (ADR-0016 §6).

◆ displacement()

template<int Dim>
Eigen::Matrix< Complex, Dim, 1 > hpfem::physics::Elasticity< Dim >::displacement ( const Vector &  u,
Index  c,
const Point< Dim > &  xi 
) const

Displacement at reference point ξ of cell c.

◆ displacement_at()

template<int Dim>
std::optional< Eigen::Matrix< Complex, Dim, 1 > > hpfem::physics::Elasticity< Dim >::displacement_at ( const Vector &  u,
const mesh::PointLocator< Dim > &  locator,
const Point< Dim > &  x 
) const

Displacement at the physical point x (located with locator, built on the mesh), or nothing outside the mesh.

◆ displacements_at()

template<int Dim>
Eigen::Matrix< Complex, Eigen::Dynamic, Dim > hpfem::physics::Elasticity< Dim >::displacements_at ( const Vector &  u,
const Eigen::Matrix< Real, Eigen::Dynamic, Dim > &  points 
) const

Displacements at the physical points (one per row of points, n × Dim), NaN in the rows of points outside the mesh: e.g. points of the surface for the shape error.

◆ dofs()

template<int Dim>
const fespace::DofMap< Dim > & hpfem::physics::Elasticity< Dim >::dofs ( ) const
inlinenoexcept

◆ eigenstrain()

template<int Dim>
assembly::ComplexTensor< Dim > hpfem::physics::Elasticity< Dim >::eigenstrain ( Index  c,
const Point< Dim > &  xi 
) const

The total eigenstrain ε* at reference point ξ of cell c.

◆ energy_error()

template<int Dim>
Real hpfem::physics::Elasticity< Dim >::energy_error ( const Vector &  u,
const DisplacementField< Dim > &  exact,
const std::function< assembly::ComplexTensor< Dim >(const Point< Dim > &)> &  exact_gradient,
int  extra_order = 4 
) const

Energy-norm error \( |||u - u_h|||=\big(\int\varepsilon(e) : C : \varepsilon(e)\big)^{1/2} \) [J^{1/2}] (2D: per metre of depth; axisymmetric: with the hoop strain and the weight r, per radian) against the exact displacement and its gradient \( (\nabla u)_{ij} = \partial_j u_i \) (the displacement only enters the hoop strain). Quadrature of degree 2p + extra_order (+2 on curved cells).

◆ estimate()

template<int Dim>
adaptivity::Estimate hpfem::physics::Elasticity< Dim >::estimate ( const Vector &  u,
const adaptivity::EstimatorOptions &  options = {} 
) const

Residual a-posteriori error indicators of u in the energy norm (adaptivity/elasticity_estimator.hpp, M20 S5b): the equilibrium residual in the cells, the traction jumps across interior facets (hanging ones included) and the traction residual on the natural boundary (the traction-free facets, the tractions, and the free components of the displacement conditions); axisymmetric problems with the weight r and the hoop stress, the axis without a term. For the hp loop of adaptivity (marking, decision, refinement).

◆ facet_condition()

template<int Dim>
adaptivity::ElasticFacetCondition< Dim > hpfem::physics::Elasticity< Dim >::facet_condition ( Index  facet) const

The boundary conditions as seen by the estimator, per boundary facet.

◆ form_of_cell()

template<int Dim>
assembly::ElasticForm< Dim > hpfem::physics::Elasticity< Dim >::form_of_cell ( Index  cell) const

Per-cell form: stiffness, body force, eigenstrain.

◆ hoop_strain()

template<int Dim>
Complex hpfem::physics::Elasticity< Dim >::hoop_strain ( const Vector &  u,
Index  c,
const Point< Dim > &  xi 
) const

Hoop strain u_r / r at reference point ξ of cell c (axisymmetric; ∂u_r/∂r on the axis).

Exceptions
InvalidArgumentif the problem is not axisymmetric.

◆ hoop_stress()

template<int Dim>
Complex hpfem::physics::Elasticity< Dim >::hoop_stress ( const Vector &  u,
Index  c,
const Point< Dim > &  xi 
) const

Hoop stress σ_θθ at reference point ξ of cell c (axisymmetric).

Exceptions
InvalidArgumentif the problem is not axisymmetric.

◆ l2_product()

template<int Dim>
Complex hpfem::physics::Elasticity< Dim >::l2_product ( const Vector &  a,
const Vector &  b 
) const

\( \int a_h \cdot b_h\,dx \) of two block coefficient vectors (a conjugated).

◆ material()

template<int Dim>
const ElasticMaterial & hpfem::physics::Elasticity< Dim >::material ( Index  cell) const

Material of a cell.

◆ mesh_velocity()

template<int Dim>
NodeField hpfem::physics::Elasticity< Dim >::mesh_velocity ( const Vector &  u) const

Re u as a mesh velocity on the geometry nodes of the mesh (physics::NodeField, the rows of num_geometry_nodes: the vertex values, and for a second-order mesh the displacement at the edge midpoints, which the edge nodes are the images of): the velocity V of ADR-0011, so that shape_sensitivity(shape_gradient(...), V) (or shape_derivative) of an optical goal on the same mesh is its first-order change under the deformation (M20 S4).

◆ num_dofs()

template<int Dim>
Index hpfem::physics::Elasticity< Dim >::num_dofs ( ) const
inlinenoexcept

Size of the block vector, Dim · dofs().num_dofs().

◆ rigid_modes()

template<int Dim>
std::vector< Vector > hpfem::physics::Elasticity< Dim >::rigid_modes ( ) const

The rigid-body modes as block coefficient vectors (Dim translations, then the rotations about the centroid of the mesh: 3 in 3D, 1 in 2D), exact on curved cells for p ≥ 2.

◆ setup()

template<int Dim>
const ElasticitySetup< Dim > & hpfem::physics::Elasticity< Dim >::setup ( ) const
inlinenoexcept

◆ solve()

template<int Dim>
Vector hpfem::physics::Elasticity< Dim >::solve ( ) const

Displacement coefficients (block vector of size num_dofs()).

Exceptions
Errorif the factorisation fails (e.g. a free body without remove_rigid_modes); InvalidArgument with remove_rigid_modes if the loads are not in equilibrium.

◆ stiffness_of_cell()

template<int Dim>
assembly::VoigtMatrix< Dim > hpfem::physics::Elasticity< Dim >::stiffness_of_cell ( Index  cell) const

Voigt stiffness of a cell (assembly::isotropic_stiffness).

◆ strain()

template<int Dim>
assembly::ComplexTensor< Dim > hpfem::physics::Elasticity< Dim >::strain ( const Vector &  u,
Index  c,
const Point< Dim > &  xi 
) const

Strain ε(u) at reference point ξ of cell c.

◆ strain_energy()

template<int Dim>
Real hpfem::physics::Elasticity< Dim >::strain_energy ( const Vector &  u) const

Elastic strain energy \( \tfrac12\int (\varepsilon - \varepsilon^*) : C : (\varepsilon - \varepsilon^*)\,dx \) [J] (3D) or [J/m] (2D).

◆ stress()

template<int Dim>
assembly::ComplexTensor< Dim > hpfem::physics::Elasticity< Dim >::stress ( const Vector &  u,
Index  c,
const Point< Dim > &  xi 
) const

Stress σ = C : (ε(u) − ε*) at reference point ξ of cell c (in 2D the in-plane part of the plane-strain stress; axisymmetric: (rr, rz; rz, zz), the hoop part from hoop_stress).

◆ system()

template<int Dim>
assembly::AssembledSystem hpfem::physics::Elasticity< Dim >::system ( ) const

Stiffness matrix and load (body force, eigenstrain, tractions), before the boundary conditions and constraints.


The documentation for this class was generated from the following file: