SpECTRE  v2022.06.14
control_system::Tags::IsActive< ControlSystem > Struct Template Reference

DataBox tag to determine if this control system is active. More...

#include <Tags.hpp>

Public Types

using type = bool
 
template<typename Metavariables >
using option_tags = typename detail::IsActiveOptionList< Metavariables, detail::has_override_functions_of_time_v< Metavariables > >::type
 

Static Public Member Functions

template<typename Metavariables >
static bool create_from_options (const std::optional< std::string > &function_of_time_file, const std::map< std::string, std::string > &function_of_time_name_map)
 
template<typename Metavariables >
static bool create_from_options ()
 

Static Public Attributes

static constexpr bool pass_metavariables = true
 

Detailed Description

template<typename ControlSystem>
struct control_system::Tags::IsActive< ControlSystem >

DataBox tag to determine if this control system is active.

This effectively lets us choose control systems at runtime. If the metavariables specifies static constexpr bool override_functions_of_time = true, then this will check the domain::FunctionsOfTime::OptionTags::FunctionOfTimeFile option. If the file is defined, it will loop over the map between SpEC and SpECTRE names from domain::FunctionsOfTime::OptionTags::FunctionOfTimeNameMap. If the function of time corresponding to this control system is being overriden with data from the file, then this tag will be false so the control system doesn't actually update the function of time.

If the metavariables doesn't specify override_functions_of_time, or it is set to false, then this control system is active by default so the tag will be true.


The documentation for this struct was generated from the following file: