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

Generated by: LCOV version 1.14