SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/Elasticity/ConstitutiveRelations - ConstitutiveRelation.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 30.8 % 13 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              : #include <memory>
       8              : #include <pup.h>
       9              : 
      10              : #include "DataStructures/Tensor/TypeAliases.hpp"
      11              : #include "Utilities/Gsl.hpp"
      12              : #include "Utilities/Serialization/CharmPupable.hpp"
      13              : #include "Utilities/TMPL.hpp"
      14              : 
      15              : /// \cond
      16              : class DataVector;
      17              : /// \endcond
      18              : 
      19              : namespace Elasticity {
      20              : /*!
      21              :  * \brief Constitutive (stress-strain) relations that characterize the elastic
      22              :  * properties of a material
      23              :  */
      24            1 : namespace ConstitutiveRelations {
      25              : 
      26              : /*!
      27              :  * \brief Base class for constitutive (stress-strain) relations that
      28              :  * characterize the elastic properties of a material
      29              :  *
      30              :  * \details A constitutive relation, in the context of elasticity, relates the
      31              :  * Stress \f$T^{ij}\f$ and Strain \f$S_{ij}=\nabla_{(i}u_{j)}\f$ within an
      32              :  * elastic material (see \ref Elasticity). For small stresses it is approximated
      33              :  * by the linear relation
      34              :  *
      35              :  * \f[
      36              :  * T^{ij} = -Y^{ijkl}S_{kl}
      37              :  * \f]
      38              :  *
      39              :  * (Eq. 11.17 in \cite ThorneBlandford2017) that is referred to as _Hooke's
      40              :  * law_. The constitutive relation in this linear approximation is determined by
      41              :  * the elasticity (or _Young's_) tensor \f$Y^{ijkl}=Y^{(ij)(kl)}=Y^{klij}\f$
      42              :  * that generalizes a simple proportionality to a three-dimensional and
      43              :  * (possibly) anisotropic material.
      44              :  *
      45              :  * \note We assume a Euclidean metric in Cartesian coordinates here (for now).
      46              :  */
      47              : template <size_t Dim>
      48            1 : class ConstitutiveRelation : public PUP::able {
      49              :  public:
      50            0 :   static constexpr size_t volume_dim = Dim;
      51              : 
      52            0 :   ConstitutiveRelation() = default;
      53            0 :   ConstitutiveRelation(const ConstitutiveRelation&) = default;
      54            0 :   ConstitutiveRelation& operator=(const ConstitutiveRelation&) = default;
      55            0 :   ConstitutiveRelation(ConstitutiveRelation&&) = default;
      56            0 :   ConstitutiveRelation& operator=(ConstitutiveRelation&&) = default;
      57            0 :   ~ConstitutiveRelation() override = default;
      58              : 
      59            0 :   WRAPPED_PUPable_abstract(ConstitutiveRelation);  // NOLINT
      60              : 
      61              :   /// Returns a `std::unique_ptr` pointing to a copy of the
      62              :   /// `ConstitutiveRelation`.
      63            1 :   virtual std::unique_ptr<ConstitutiveRelation<Dim>> get_clone() const = 0;
      64              : 
      65              :   /// The constitutive relation that characterizes the elastic properties of a
      66              :   /// material
      67            1 :   virtual void stress(gsl::not_null<tnsr::II<DataVector, Dim>*> stress,
      68              :                       const tnsr::ii<DataVector, Dim>& strain,
      69              :                       const tnsr::I<DataVector, Dim>& x) const = 0;
      70              : };
      71              : 
      72              : }  // namespace ConstitutiveRelations
      73              : }  // namespace Elasticity
        

Generated by: LCOV version 2.0-1