SpECTRE  v2024.02.05
Options Namespace Reference

Utilities for parsing input files. More...

Namespaces

namespace  AutoLabel
 The label representing the absence of a value for Options::Auto
 

Classes

struct  Alternatives
 Provide multiple ways to construct a class. More...
 
class  Auto
 A class indicating that a parsed value can be automatically computed instead of specified. More...
 
class  Comparator
 An option-creatable mathematical comparison. More...
 
struct  Context
 Information about the nested operations being performed by the parser, for use in printing errors. A default-constructed Context is printed as an empty string. This struct is primarily used as an argument to PARSE_ERROR for reporting input file parsing errors. Users outside of the core option parsing code should not need to manipulate the contents. More...
 
struct  create_from_yaml
 Used by the parser to create an object. The default action is to parse options using T::options. This struct may be specialized to change that behavior for specific types. More...
 
struct  create_from_yaml< amr::Flag >
 
struct  create_from_yaml< amr::Isotropy >
 
struct  create_from_yaml< Auto< T, Label > >
 
struct  create_from_yaml< Auto_detail::AutoLabel< Label > >
 
struct  create_from_yaml< blaze::CompressedMatrix< Type, SO, Tag > >
 
struct  create_from_yaml< blaze::CompressedVector< T, TF, Tag > >
 
struct  create_from_yaml< blaze::DynamicMatrix< Type, SO, Alloc, Tag > >
 
struct  create_from_yaml< blaze::DynamicVector< T, TF, Tag > >
 
struct  create_from_yaml< blaze::StaticMatrix< Type, M, N, SO, AF, PF, Tag > >
 
struct  create_from_yaml< blaze::StaticVector< T, N, TF, AF, PF, Tag > >
 
struct  create_from_yaml< Cce::InitializeJ::ConformalFactorIterationHeuristic >
 
struct  create_from_yaml< Comparator >
 
struct  create_from_yaml< Convergence::Reason >
 
struct  create_from_yaml< DenseTriggers::Or >
 
struct  create_from_yaml< DenseTriggers::Times >
 
struct  create_from_yaml< domain::CoordinateMaps::Distribution >
 
struct  create_from_yaml< domain::creators::detail::Excision >
 
struct  create_from_yaml< domain::ElementWeight >
 
struct  create_from_yaml< EventsAndDenseTriggers >
 
struct  create_from_yaml< EventsAndTriggers >
 
struct  create_from_yaml< evolution::dg::subcell::ActiveGrid >
 
struct  create_from_yaml< FastFlow::FlowType >
 
struct  create_from_yaml< fd::DerivativeOrder >
 
struct  create_from_yaml< fd::reconstruction::FallbackReconstructorType >
 
struct  create_from_yaml< FloatingPointType >
 
struct  create_from_yaml< gh::BoundaryConditions::detail::ConstraintPreservingBjorhusType >
 
struct  create_from_yaml< imex::Mode >
 
struct  create_from_yaml< importers::ObservationSelector >
 
struct  create_from_yaml< intrp::AngularOrdering >
 
struct  create_from_yaml< Limiters::MinmodType >
 
struct  create_from_yaml< Limiters::WenoType >
 
struct  create_from_yaml< NewtonianEuler::Limiters::VariablesToLimit >
 
struct  create_from_yaml< Options::Options_detail::variant_parse_error< T... > >
 
struct  create_from_yaml< Parallel::Phase >
 
struct  create_from_yaml< RelativisticEuler::Solutions::TovCoordinates >
 
struct  create_from_yaml< ScalarWave::BoundaryConditions::detail::ConstraintPreservingSphericalRadiationType >
 
struct  create_from_yaml< ScalarWave::BoundaryConditions::detail::SphericalRadiationType >
 
struct  create_from_yaml< ShellWedges >
 
struct  create_from_yaml< Spectral::Basis >
 
struct  create_from_yaml< Spectral::Quadrature >
 
struct  create_from_yaml< std::complex< double > >
 Parse complex numbers as pairs of doubles.
 
struct  create_from_yaml< std::unique_ptr< T > >
 
struct  create_from_yaml< std::unordered_map< K, V, H, P > >
 
struct  create_from_yaml< std::variant< T... > >
 
struct  create_from_yaml< StepChoosers::Constant< StepChooserUse > >
 
struct  create_from_yaml< Triggers::And >
 
struct  create_from_yaml< Triggers::NearTimes_enums::Unit >
 
struct  create_from_yaml< Triggers::Not >
 
struct  create_from_yaml< Triggers::OnSubsteps >
 
struct  create_from_yaml< Triggers::Or >
 
struct  create_from_yaml< Triggers::Slabs >
 
struct  create_from_yaml< Triggers::Times >
 
struct  create_from_yaml< typename Triggers::NearTimes_enums::Direction >
 
struct  create_from_yaml< Verbosity >
 
struct  create_from_yaml< Xcts::Solutions::SchwarzschildCoordinates >
 
class  Option
 The type that options are passed around as. Contains YAML node data and an Context. More...
 
class  Parser
 Class that handles parsing an input file. More...
 

Typedefs

template<typename FactoryClasses , typename... NewClasses>
using add_factory_classes = typename detail::add_factory_classes< FactoryClasses, NewClasses... >::type
 Add new factory-creatable classes to the list in a factory_creation struct. More...
 
using String = const char *const
 The string used in option structs.
 

Functions

template<typename T , typename Label >
bool operator== (const Auto< T, Label > &a, const Auto< T, Label > &b)
 
template<typename T , typename Label >
bool operator!= (const Auto< T, Label > &a, const Auto< T, Label > &b)
 
template<typename T , typename Label >
std::ostreamoperator<< (std::ostream &os, const Auto< T, Label > &x)
 
std::ostreamoperator<< (std::ostream &s, const Context &c)
 

Detailed Description

Utilities for parsing input files.

Typedef Documentation

◆ add_factory_classes

template<typename FactoryClasses , typename... NewClasses>
using Options::add_factory_classes = typedef typename detail::add_factory_classes<FactoryClasses, NewClasses...>::type

Add new factory-creatable classes to the list in a factory_creation struct.

For each tmpl::pair<Base, DerivedList> in the NewClasses parameter pack, append the classes in DerivedList to the list for Base in FactoryClasses. The FactoryClasses map need not have a preexisting entry for Base.

This example adds three new derived classes, two for one base class and one for another.

using new_classes = Options::add_factory_classes<
original_classes,
tmpl::pair<Base<Label<0>>,
tmpl::list<Derived<Label<3>>, Derived<Label<4>>>>,
tmpl::pair<Base<Label<2>>, tmpl::list<Derived<Label<5>>>>>;
typename detail::add_factory_classes< FactoryClasses, NewClasses... >::type add_factory_classes
Add new factory-creatable classes to the list in a factory_creation struct.
Definition: FactoryHelpers.hpp:51
See also
Options::protocols::FactoryCreation