SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/Elasticity - Strain.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 44.4 % 9 4
Test Date: 2026-10-22 17:29:42
Legend: Lines:     hit not hit

            Line data    Source code
       1            0 : // Distributed under the MIT License.
       2              : // See LICENSE.txt for details.
       3              : 
       4              : #pragma once
       5              : 
       6              : #include <cstddef>
       7              : 
       8              : #include "DataStructures/Tensor/Tensor.hpp"
       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            1 : void strain(gsl::not_null<tnsr::ii<DataType, Dim>*> strain,
      21              :             const tnsr::iJ<DataType, Dim>& deriv_displacement);
      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            1 : 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);
      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            1 : 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::ElementLogical,
      47              :                                   Frame::Inertial>& inv_jacobian);
      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>
      58            1 : struct StrainCompute : Elasticity::Tags::Strain<Dim>, db::ComputeTag {
      59            0 :   using base = Elasticity::Tags::Strain<Dim>;
      60            0 :   using return_type = tnsr::ii<DataVector, Dim>;
      61            0 :   using argument_tags =
      62              :       tmpl::list<Elasticity::Tags::Displacement<Dim>, domain::Tags::Mesh<Dim>,
      63              :                  domain::Tags::InverseJacobian<Dim, Frame::ElementLogical,
      64              :                                                Frame::Inertial>>;
      65            0 :   static constexpr auto function = &strain<Dim>;
      66              : };
      67              : 
      68              : }  // namespace Tags
      69              : }  // namespace Elasticity
        

Generated by: LCOV version 2.0-1