|
hp-FEM
Adaptive hp-FEM suite for nano-optics
|
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 |
Assembles and solves the elasticity problem on the vector H1 space over dofs.
| hpfem::physics::Elasticity< Dim >::Elasticity | ( | const fespace::DofMap< Dim > & | dofs, |
| ElasticitySetup< Dim > | setup | ||
| ) |
| InvalidArgument | for 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. |
| assembly::AxisymmetricElasticForm hpfem::physics::Elasticity< Dim >::axisymmetric_form_of_cell | ( | Index | cell | ) | const |
Per-cell form of the axisymmetric problem (Dim = 2).
| 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).
| 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.
| 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.
| 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.
|
inlinenoexcept |
| assembly::ComplexTensor< Dim > hpfem::physics::Elasticity< Dim >::eigenstrain | ( | Index | c, |
| const Point< Dim > & | xi | ||
| ) | const |
The total eigenstrain ε* at reference point ξ of cell c.
| 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).
| 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).
| adaptivity::ElasticFacetCondition< Dim > hpfem::physics::Elasticity< Dim >::facet_condition | ( | Index | facet | ) | const |
The boundary conditions as seen by the estimator, per boundary facet.
| assembly::ElasticForm< Dim > hpfem::physics::Elasticity< Dim >::form_of_cell | ( | Index | cell | ) | const |
Per-cell form: stiffness, body force, eigenstrain.
| 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).
| InvalidArgument | if the problem is not axisymmetric. |
| 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).
| InvalidArgument | if the problem is not axisymmetric. |
| 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).
| const ElasticMaterial & hpfem::physics::Elasticity< Dim >::material | ( | Index | cell | ) | const |
Material of a cell.
| 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).
|
inlinenoexcept |
Size of the block vector, Dim · dofs().num_dofs().
| 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.
|
inlinenoexcept |
| Vector hpfem::physics::Elasticity< Dim >::solve | ( | ) | const |
Displacement coefficients (block vector of size num_dofs()).
| Error | if the factorisation fails (e.g. a free body without remove_rigid_modes); InvalidArgument with remove_rigid_modes if the loads are not in equilibrium. |
| assembly::VoigtMatrix< Dim > hpfem::physics::Elasticity< Dim >::stiffness_of_cell | ( | Index | cell | ) | const |
Voigt stiffness of a cell (assembly::isotropic_stiffness).
| 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.
| 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).
| 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).
| assembly::AssembledSystem hpfem::physics::Elasticity< Dim >::system | ( | ) | const |
Stiffness matrix and load (body force, eigenstrain, tractions), before the boundary conditions and constraints.