Strain.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <cstddef>
7 
9 #include "Domain/Tags.hpp"
10 #include "Elliptic/Systems/Elasticity/Tags.hpp"
11 
12 namespace Elasticity {
13 
14 /*!
15  * \brief The symmetric strain \f$S_{ij}=\nabla_{(i} \xi_{j)}\f$ in the elastic
16  * material.
17  *
18  * Note that this function involves a numeric differentiation of the
19  * displacement vector.
20  */
21 template <size_t Dim>
22 void strain(gsl::not_null<tnsr::ii<DataVector, Dim>*> strain,
23  const tnsr::I<DataVector, Dim>& displacement, const Mesh<Dim>& mesh,
24  const InverseJacobian<DataVector, Dim, Frame::Logical,
25  Frame::Inertial>& inv_jacobian) noexcept;
26 
27 namespace Tags {
28 
29 /*!
30  * \brief The symmetric strain \f$S_{ij}=\nabla_{(i} \xi_{j)}\f$ in the elastic
31  * material.
32  *
33  * \see `Elasticity::strain`
34  */
35 template <size_t Dim>
38  using return_type = tnsr::ii<DataVector, Dim>;
39  using argument_tags = tmpl::list<
42  static constexpr auto function = &strain<Dim>;
43 };
44 
45 } // namespace Tags
46 } // namespace Elasticity
db::ComputeTag
Mark a struct as a compute tag by inheriting from this.
Definition: Tag.hpp:157
Frame::Inertial
Definition: IndexType.hpp:44
Tags.hpp
domain::Tags::Mesh
The computational grid of the Element in the DataBox.
Definition: Tags.hpp:107
Elasticity::Tags::Displacement
The material displacement field .
Definition: Tags.hpp:47
Elasticity
Items related to solving elasticity problems.
Definition: LaserBeam.cpp:13
cstddef
Elasticity::Tags::Strain
The symmetric strain , describing the deformation of the elastic material.
Definition: Tags.hpp:56
domain::Tags::InverseJacobian< Dim, Frame::Logical, Frame::Inertial >
DataVector
Stores a collection of function values.
Definition: DataVector.hpp:46
Mesh
Holds the number of grid points, basis, and quadrature in each direction of the computational grid.
Definition: Mesh.hpp:48
Tensor.hpp
Frame::Logical
Definition: IndexType.hpp:42
Elasticity::Tags::StrainCompute
The symmetric strain in the elastic material.
Definition: Strain.hpp:36
gsl::not_null
Require a pointer to not be a nullptr
Definition: ReadSpecThirdOrderPiecewisePolynomial.hpp:13