|
OPALX (Object Oriented Parallel Accelerator Library for Exascale) MINIorX
OPALX
|
#include <ParameterList.h>

Public Types | |
| using | variant_t = std::variant< double, float, bool, std::string, unsigned int, int, ParameterList > |
Public Member Functions | |
| ParameterList ()=default | |
| ParameterList (const ParameterList &)=default | |
| template<typename T > | |
| void | add (const std::string &key, const T &value) |
| template<typename T > | |
| T | get (const std::string &key) const |
| template<typename T > | |
| T | get (const std::string &key, const T &defval) const |
| void | merge (const ParameterList &p) noexcept |
| void | update (const ParameterList &p) noexcept |
| template<typename T > | |
| void | update (const std::string &key, const T &value) |
| ParameterList & | operator= (const ParameterList &other) |
Protected Attributes | |
| std::map< std::string, variant_t > | params_m |
Friends | |
| template<class Stream > | |
| Stream & | operator<< (Stream &stream, const ParameterList &sp) |
| std::ostream & | operator<< (std::ostream &os, const ParameterList &sp) |
Definition at line 29 of file ParameterList.h.
| using ippl::ParameterList::variant_t = std::variant<double, float, bool, std::string, unsigned int, int, ParameterList> |
Definition at line 32 of file ParameterList.h.
|
default |
|
default |
|
inline |
Add a single parameter to this list.
| key | is the name of the parameter |
| value | is the parameter value |
Definition at line 44 of file ParameterList.h.
References params_m.
Referenced by FieldSolver< T, Dim >::initFFTSolver(), FieldSolver< T, Dim >::initOpenSolver(), ippl::FEMMaxwellDiffusionSolver< FieldType >::setDefaultParameters(), ippl::Poisson< FieldLHS, FieldRHS >::setDefaultParameters(), ippl::FEMPoissonSolver< FieldLHS, FieldRHS, Order, QuadNumNodes >::setDefaultParameters(), ippl::FFTOpenPoissonSolver< FieldLHS, FieldRHS >::setDefaultParameters(), ippl::FFTPeriodicPoissonSolver< FieldLHS, FieldRHS >::setDefaultParameters(), ippl::FFTTruncatedGreenPeriodicPoissonSolver< FieldLHS, FieldRHS >::setDefaultParameters(), ippl::PoissonCG< FieldLHS, FieldRHS >::setDefaultParameters(), and ippl::PreconditionedFEMPoissonSolver< FieldLHS, FieldRHS >::setDefaultParameters().
Obtain the value of a parameter. This function throws an error if the key is not contained.
| key | the name of the parameter |
Definition at line 59 of file ParameterList.h.
References params_m.
Referenced by ippl::CG< OperatorRet, LowerRet, UpperRet, UpperLowerRet, InverseDiagRet, DiagRet, FieldLHS, FieldRHS >::operator()(), ippl::CG< OperatorRet, LowerRet, UpperRet, UpperLowerRet, InverseDiagRet, FEMVector< T >, FEMVector< T > >::operator()(), ippl::PCG< OperatorRet, LowerRet, UpperRet, UpperLowerRet, InverseDiagRet, DiagRet, FieldLHS, FieldRHS >::operator()(), and ippl::FFTBase< Field, FFT, Backend, BufferType >::setup().
|
inline |
Obtain the value of a parameter. If the key is not contained, the default value is returned.
| key | the name of the parameter |
| defval | the default value of the parameter |
Definition at line 75 of file ParameterList.h.
References params_m.
|
inlinenoexcept |
Merge a parameter list into this parameter list.
| p | the parameter list to merge into this |
Definition at line 86 of file ParameterList.h.
References params_m.
Referenced by ippl::FFTOpenPoissonSolver< FieldLHS, FieldRHS >::FFTOpenPoissonSolver(), ippl::FFTTruncatedGreenPeriodicPoissonSolver< FieldLHS, FieldRHS >::FFTTruncatedGreenPeriodicPoissonSolver(), ippl::ParticleInteractionBase< ParticleContainer >::mergeParameters(), ippl::Maxwell< EMField, SourceField >::mergeParameters(), ippl::Poisson< FieldLHS, FieldRHS >::mergeParameters(), and ippl::ParticleInteractionBase< ParticleContainer >::ParticleInteractionBase().
|
inline |
Definition at line 164 of file ParameterList.h.
References params_m.
|
inlinenoexcept |
Update the parameter values of this list with the values provided in the input parameter list.
| p | the input parameter list with update parameter values |
Definition at line 97 of file ParameterList.h.
References params_m.
Referenced by ippl::FFTOpenPoissonSolver< FieldLHS, FieldRHS >::FFTOpenPoissonSolver(), ippl::FFTTruncatedGreenPeriodicPoissonSolver< FieldLHS, FieldRHS >::FFTTruncatedGreenPeriodicPoissonSolver(), ippl::ParticleInteractionBase< ParticleContainer >::updateParameter(), ippl::Poisson< FieldLHS, FieldRHS >::updateParameter(), ippl::ParticleInteractionBase< ParticleContainer >::updateParameters(), and ippl::Poisson< FieldLHS, FieldRHS >::updateParameters().
|
inline |
Update the single parameter value of this list.
| key | is the name of the parameter |
| value | is the parameter value |
Definition at line 111 of file ParameterList.h.
References params_m.
|
friend |
Print this parameter list.
Definition at line 137 of file ParameterList.h.
|
friend |
Definition at line 120 of file ParameterList.h.
|
protected |
Definition at line 173 of file ParameterList.h.
Referenced by add(), get(), merge(), operator=(), and update().