SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/Elasticity/ConstitutiveRelations - Tags.hpp Hit Total Coverage
Commit: ebec864322c50bab8dca0a90baf8d01875114261 Lines: 2 7 28.6 %
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 "DataStructures/DataBox/Tag.hpp"
       7             : #include "Utilities/TMPL.hpp"
       8             : 
       9             : namespace Elasticity {
      10             : namespace Tags {
      11             : 
      12             : /// Base tag for the constitutive relation
      13           1 : struct ConstitutiveRelationBase : db::BaseTag {};
      14             : 
      15             : /*!
      16             :  * \brief The elastic material's constitutive relation.
      17             :  *
      18             :  * When constructing from options, copies the constitutive relation from the
      19             :  * `Metavariables::constitutive_relation_provider_option_tag` by calling its
      20             :  * constructed object's `constitutive_relation()` member function.
      21             :  *
      22             :  * The constitutive relation can be retrieved from the DataBox using its base
      23             :  * `Elasticity::Tags::ConstitutiveRelation` tag.
      24             :  *
      25             :  * \see `Elasticity::ConstitutiveRelations::ConstitutiveRelation`
      26             :  */
      27             : template <typename ConstitutiveRelationType>
      28           1 : struct ConstitutiveRelation : ConstitutiveRelationBase, db::SimpleTag {
      29           0 :   using type = ConstitutiveRelationType;
      30             : 
      31           0 :   static constexpr bool pass_metavariables = true;
      32             :   template <typename Metavariables>
      33           0 :   using option_tags = tmpl::list<
      34             :       typename Metavariables::constitutive_relation_provider_option_tag>;
      35             :   template <typename Metavariables, typename ProviderType>
      36           0 :   static type create_from_options(const ProviderType& provider) noexcept {
      37             :     return provider.constitutive_relation();
      38             :   }
      39             : };
      40             : 
      41             : }  // namespace Tags
      42             : }  // namespace Elasticity

Generated by: LCOV version 1.14