SpECTRE Documentation Coverage Report
Current view: top level - Elliptic/Systems/Elasticity - Equations.hpp Hit Total Coverage
Commit: 1f2210958b4f38fdc0400907ee7c6d5af5111418 Lines: 3 11 27.3 %
Date: 2025-12-05 05:03:31
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 <vector>
       9             : 
      10             : #include "DataStructures/Tensor/Tensor.hpp"
      11             : #include "Domain/Structure/Element.hpp"
      12             : #include "Domain/Tags.hpp"
      13             : #include "Elliptic/Systems/Elasticity/Tags.hpp"
      14             : #include "Utilities/Gsl.hpp"
      15             : #include "Utilities/MakeWithValue.hpp"
      16             : #include "Utilities/TMPL.hpp"
      17             : 
      18             : /// \cond
      19             : class DataVector;
      20             : namespace PUP {
      21             : class er;
      22             : }  // namespace PUP
      23             : namespace Elasticity {
      24             : namespace ConstitutiveRelations {
      25             : template <size_t Dim>
      26             : class ConstitutiveRelation;
      27             : }  // namespace ConstitutiveRelations
      28             : namespace Tags {
      29             : template <size_t Dim>
      30             : struct ConstitutiveRelationPerBlock;
      31             : }  // namespace Tags
      32             : }  // namespace Elasticity
      33             : /// \endcond
      34             : 
      35             : namespace Elasticity {
      36             : 
      37             : /*!
      38             :  * \brief Compute the fluxes \f$F^{ij}=Y^{ijkl}(x) S_{kl}(x)=-T^{ij}\f$ for
      39             :  * the Elasticity equation.
      40             :  */
      41             : template <size_t Dim>
      42           1 : void primal_fluxes(gsl::not_null<tnsr::II<DataVector, Dim>*> minus_stress,
      43             :                    const tnsr::iJ<DataVector, Dim>& deriv_displacement,
      44             :                    const ConstitutiveRelations::ConstitutiveRelation<Dim>&
      45             :                        constitutive_relation,
      46             :                    const tnsr::I<DataVector, Dim>& coordinates);
      47             : 
      48             : /*!
      49             :  * \brief Add the contribution \f$-\Gamma^i_{ik}T^{kj} - \Gamma^j_{ik}T^{ik}\f$
      50             :  * to the displacement source for the curved-space elasticity equations on a
      51             :  * metric \f$\gamma_{ij}\f$.
      52             :  *
      53             :  * These sources arise from the non-principal part of the divergence on a
      54             :  * curved background.
      55             :  */
      56             : template <size_t Dim>
      57           1 : void add_curved_sources(
      58             :     gsl::not_null<tnsr::I<DataVector, Dim>*> source_for_displacement,
      59             :     const tnsr::Ijj<DataVector, Dim>& christoffel_second_kind,
      60             :     const tnsr::i<DataVector, Dim>& christoffel_contracted,
      61             :     const tnsr::II<DataVector, Dim>& stress);
      62             : 
      63             : /*!
      64             :  * \brief Compute the fluxes \f$F^i_A\f$ for the Elasticity equation on a flat
      65             :  * metric in Cartesian coordinates.
      66             :  *
      67             :  * \see Elasticity::FirstOrderSystem
      68             :  */
      69             : template <size_t Dim>
      70           1 : struct Fluxes {
      71           0 :   using argument_tags =
      72             :       tmpl::list<Tags::ConstitutiveRelationPerBlock<Dim>,
      73             :                  domain::Tags::Coordinates<Dim, Frame::Inertial>>;
      74           0 :   using volume_tags = tmpl::list<Tags::ConstitutiveRelationPerBlock<Dim>>;
      75           0 :   using const_global_cache_tags = volume_tags;
      76           0 :   static constexpr bool is_trivial = false;
      77           0 :   static constexpr bool is_discontinuous = true;
      78           0 :   static void apply(
      79             :       gsl::not_null<tnsr::II<DataVector, Dim>*> minus_stress,
      80             :       const std::vector<
      81             :           std::unique_ptr<ConstitutiveRelations::ConstitutiveRelation<Dim>>>&
      82             :           constitutive_relation_per_block,
      83             :       const tnsr::I<DataVector, Dim>& coordinates,
      84             :       const ElementId<Dim>& element_id,
      85             :       const tnsr::I<DataVector, Dim>& displacement,
      86             :       const tnsr::iJ<DataVector, Dim>& deriv_displacement);
      87           0 :   static void apply(
      88             :       gsl::not_null<tnsr::II<DataVector, Dim>*> minus_stress,
      89             :       const std::vector<
      90             :           std::unique_ptr<ConstitutiveRelations::ConstitutiveRelation<Dim>>>&
      91             :           constitutive_relation_per_block,
      92             :       const tnsr::I<DataVector, Dim>& coordinates,
      93             :       const ElementId<Dim>& element_id,
      94             :       const tnsr::i<DataVector, Dim>& face_normal,
      95             :       const tnsr::I<DataVector, Dim>& face_normal_vector,
      96             :       const tnsr::I<DataVector, Dim>& displacement);
      97             : };
      98             : 
      99             : }  // namespace Elasticity

Generated by: LCOV version 1.14