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

Generated by: LCOV version 1.14