SpECTRE Documentation Coverage Report
Current view: top level - Domain/Protocols - Metavariables.hpp Hit Total Coverage
Commit: 3f09028930c0450a2fb61ee918b22882f5d03d2b Lines: 1 6 16.7 %
Date: 2021-10-22 20:52:16
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 <type_traits>
       7             : 
       8           0 : namespace domain::protocols {
       9             : /*!
      10             :  * \brief Compile-time options for a Domain.
      11             :  *
      12             :  * A class conforming to this protocol is placed in the metavariables to choose
      13             :  * compile-time options for creating domains. The conforming class must provide
      14             :  * the following static member variables:
      15             :  * - `bool enable_time_dependent_maps`: Whether or not domains may have
      16             :  * time-dependent maps. When set to `true` domain creators may require
      17             :  * additional input-file options related to the time dependence. When set to
      18             :  * `false` the domains are static, e.g. for elliptic problems.
      19             :  *
      20             :  * Here is an example of a class that conforms to this protocol:
      21             :  *
      22             :  * \snippet Domain/Test_Protocols.cpp domain_metavariables_example
      23             :  *
      24             :  */
      25           1 : struct Metavariables {
      26             :   template <typename ConformingType>
      27           0 :   struct test {
      28           0 :     using enable_time_dependent_maps_type = const bool;
      29           0 :     using enable_time_dependent_maps_return_type =
      30             :         decltype(ConformingType::enable_time_dependent_maps);
      31             :     static_assert(std::is_same_v<enable_time_dependent_maps_type,
      32             :                                  enable_time_dependent_maps_return_type>,
      33             :                   "The metavariable 'enable_time_dependent_maps' should be a "
      34             :                   "static constexpr bool.");
      35             :   };
      36             : };
      37             : }  // namespace domain::protocols

Generated by: LCOV version 1.14