Line data Source code
1 0 : // Distributed under the MIT License. 2 : // See LICENSE.txt for details. 3 : 4 : #pragma once 5 : 6 : #include <string> 7 : 8 : #include "DataStructures/DataBox/Tag.hpp" 9 : #include "Options/String.hpp" 10 : #include "Utilities/PrettyType.hpp" 11 : 12 : namespace OptionTags { 13 : /*! 14 : * \ingroup OptionGroupsGroup 15 : * \brief Groups the variable fixer configurations in the input file. 16 : */ 17 1 : struct VariableFixingGroup { 18 0 : static std::string name() { return "VariableFixing"; } 19 0 : static constexpr Options::String help = "Options for variable fixing"; 20 : }; 21 : 22 : /*! 23 : * \ingroup OptionTagsGroup 24 : * \brief The global cache tag that retrieves the parameters for the variable 25 : * fixer from the input file. 26 : */ 27 : template <typename VariableFixerType> 28 1 : struct VariableFixer { 29 0 : static constexpr Options::String help = "Options for the variable fixer"; 30 0 : using type = VariableFixerType; 31 0 : static std::string name() { return pretty_type::name<VariableFixerType>(); } 32 0 : using group = VariableFixingGroup; 33 : }; 34 : } // namespace OptionTags 35 : 36 : namespace Tags { 37 : /*! 38 : * \brief The global cache tag for the variable fixer 39 : */ 40 : template <typename VariableFixerType> 41 1 : struct VariableFixer : db::SimpleTag { 42 0 : using type = VariableFixerType; 43 0 : using option_tags = 44 : tmpl::list<::OptionTags::VariableFixer<VariableFixerType>>; 45 : 46 0 : static constexpr bool pass_metavariables = false; 47 0 : static VariableFixerType create_from_options( 48 : const VariableFixerType& variable_fixer) { 49 : return variable_fixer; 50 : } 51 : }; 52 : } // namespace Tags