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 #include "Utilities/Gsl.hpp"
12 
13 namespace Elasticity {
14 
15 /*!
16  * \brief The symmetric strain \f$S_{ij} = \partial_{(i} \xi_{j)}\f$ on a flat
17  * background in Cartesian coordinates.
18  */
19 template <typename DataType, size_t Dim>
20 void strain(gsl::not_null<tnsr::ii<DataType, Dim>*> strain,
21  const tnsr::iJ<DataType, Dim>& deriv_displacement) noexcept;
22 
23 /*!
24  * \brief The symmetric strain \f$S_{ij} = \nabla_{(i} \gamma_{j)k} \xi^k =
25  * \partial_{(i} \gamma_{j)k} \xi^k - \Gamma_{kij} \xi^k\f$ on a
26  * background metric \f$\gamma_{ij}\f$.
27  */
28 template <typename DataType, size_t Dim>
29 void strain(gsl::not_null<tnsr::ii<DataType, Dim>*> strain,
30  const tnsr::iJ<DataType, Dim>& deriv_displacement,
31  const tnsr::ii<DataType, Dim>& metric,
32  const tnsr::ijj<DataType, Dim>& deriv_metric,
33  const tnsr::ijj<DataType, Dim>& christoffel_first_kind,
34  const tnsr::I<DataType, Dim>& displacement) noexcept;
35 
36 /*!
37  * \brief The symmetric strain \f$S_{ij} = \partial_{(i} \xi_{j)}\f$ on a flat
38  * background in Cartesian coordinates.
39  *
40  * Note that this function involves a numeric differentiation of the
41  * displacement vector.
42  */
43 template <size_t Dim>
44 void strain(gsl::not_null<tnsr::ii<DataVector, Dim>*> strain,
45  const tnsr::I<DataVector, Dim>& displacement, const Mesh<Dim>& mesh,
46  const InverseJacobian<DataVector, Dim, Frame::Logical,
47  Frame::Inertial>& inv_jacobian) noexcept;
48 
49 namespace Tags {
50 
51 /*!
52  * \brief The symmetric strain \f$S_{ij}=\nabla_{(i} \xi_{j)}\f$ in the elastic
53  * material.
54  *
55  * \see `Elasticity::strain`
56  */
57 template <size_t Dim>
60  using return_type = tnsr::ii<DataVector, Dim>;
61  using argument_tags = tmpl::list<
64  static constexpr auto function = &strain<Dim>;
65 };
66 
67 } // namespace Tags
68 } // namespace Elasticity
db::ComputeTag
Mark a struct as a compute tag by inheriting from this.
Definition: Tag.hpp:157
gr::christoffel_first_kind
void christoffel_first_kind(gsl::not_null< tnsr::abb< DataType, SpatialDim, Frame, Index > * > christoffel, const tnsr::abb< DataType, SpatialDim, Frame, Index > &d_metric) noexcept
Computes Christoffel symbol of the first kind from derivative of metric.
Frame::Inertial
Definition: IndexType.hpp:44
Elasticity::strain
void strain(gsl::not_null< tnsr::ii< DataType, Dim > * > strain, const tnsr::iJ< DataType, Dim > &deriv_displacement) noexcept
The symmetric strain on a flat background in Cartesian coordinates.
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.hpp:25
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:49
Gsl.hpp
Tensor.hpp
Frame::Logical
Definition: IndexType.hpp:42
Elasticity::Tags::StrainCompute
The symmetric strain in the elastic material.
Definition: Strain.hpp:58
gsl::not_null
Require a pointer to not be a nullptr
Definition: ReadSpecPiecewisePolynomial.hpp:13