SpECTRE  v2023.05.16
control_system::Tags::IsActive< ControlSystem > Struct Template Reference

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

#include <IsActive.hpp>

Public Types

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

Static Public Member Functions

template<typename Metavariables >
static bool create_from_options (const control_system::OptionHolder< ControlSystem > &option_holder, 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 (const control_system::OptionHolder< ControlSystem > &option_holder)
 

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. The OptionHolder has an option for whether the control system is active.

That option can be overridden if we are overriding the functions of time. 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: