IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
ippl::ParameterList Class Reference

#include <ParameterList.h>

Collaboration diagram for ippl::ParameterList:

Public Types

using variant_t

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)
ParameterListoperator= (const ParameterList &other)

Protected Attributes

std::map< std::string, variant_tparams_m

Friends

template<class Stream>
Stream & operator<< (Stream &stream, const ParameterList &sp)
std::ostream & operator<< (std::ostream &os, const ParameterList &sp)

Detailed Description

Definition at line 29 of file ParameterList.h.

Member Typedef Documentation

◆ variant_t

Initial value:

Definition at line 32 of file ParameterList.h.

Constructor & Destructor Documentation

◆ ParameterList() [1/2]

ippl::ParameterList::ParameterList ( )
default

Referenced by merge(), operator<<, operator<<, operator=(), ParameterList(), and update().

Here is the caller graph for this function:

◆ ParameterList() [2/2]

ippl::ParameterList::ParameterList ( const ParameterList & )
default

References ParameterList().

Here is the call graph for this function:

Member Function Documentation

◆ add()

template<typename T>
void ippl::ParameterList::add ( const std::string & key,
const T & value )
inline

Add a single parameter to this list.

Parameters
keyis the name of the parameter
valueis the parameter value

Definition at line 44 of file ParameterList.h.

References params_m.

Referenced by ChargedParticles< PLayout, T, Dim >::initCGSolver(), FieldSolver< T, Dim >::initCGSolver(), ChargedParticles< PLayout, T, Dim >::initFFTSolver(), FieldSolver< T, Dim >::initFFTSolver(), ChargedParticles< PLayout, T, Dim >::initOpenSolver(), FieldSolver< T, Dim >::initOpenSolver(), FieldSolver< T, Dim >::initPCGSolver(), ChargedParticles< PLayout, T, Dim >::initTGSolver(), FieldSolver< T, Dim >::initTGSolver(), main(), and ippl::Poisson< FieldLHS, FieldRHS >::setDefaultParameters().

Here is the caller graph for this function:

◆ get() [1/2]

template<typename T>
T ippl::ParameterList::get ( const std::string & key) const
inline

Obtain the value of a parameter. This function throws an error if the key is not contained.

Parameters
keythe name of the parameter
Returns
the value of a parameter

Definition at line 59 of file ParameterList.h.

References std::get(), and params_m.

Referenced by ChargedParticles< PLayout, T, Dim >::initCGSolver(), ippl::CG< FEMVector< T >, FEMVector< T >, FEMVector< T >, FEMVector< T >, FEMVector< T >, FEMVector< T >, FEMVector< T > >::operator()(), ippl::CG< OperatorRet, LowerRet, UpperRet, UpperLowerRet, InverseDiagRet, FEMVector< T >, FEMVector< T > >::operator()(), ippl::PCG< lhs_type, lhs_type, lhs_type, lhs_type, lhs_type, FieldLHS, FieldRHS >::operator()(), and ippl::FFTBase< Field, FFT, Backend, BufferType >::setup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get() [2/2]

template<typename T>
T ippl::ParameterList::get ( const std::string & key,
const T & defval ) const
inline

Obtain the value of a parameter. If the key is not contained, the default value is returned.

Parameters
keythe name of the parameter
defvalthe default value of the parameter
Returns
the value of a parameter

Definition at line 75 of file ParameterList.h.

References std::get(), and params_m.

Here is the call graph for this function:

◆ merge()

void ippl::ParameterList::merge ( const ParameterList & p)
inlinenoexcept

Merge a parameter list into this parameter list.

Parameters
pthe parameter list to merge into this

Definition at line 86 of file ParameterList.h.

References ParameterList(), and params_m.

Referenced by ChargedParticles< PLayout, T, Dim >::initCGSolver().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

ParameterList & ippl::ParameterList::operator= ( const ParameterList & other)
inline

Definition at line 164 of file ParameterList.h.

References ParameterList(), and params_m.

Here is the call graph for this function:

◆ update() [1/2]

void ippl::ParameterList::update ( const ParameterList & p)
inlinenoexcept

Update the parameter values of this list with the values provided in the input parameter list.

Parameters
pthe input parameter list with update parameter values

Definition at line 97 of file ParameterList.h.

References ParameterList(), and params_m.

Here is the call graph for this function:

◆ update() [2/2]

template<typename T>
void ippl::ParameterList::update ( const std::string & key,
const T & value )
inline

Update the single parameter value of this list.

Parameters
keyis the name of the parameter
valueis the parameter value

Definition at line 111 of file ParameterList.h.

References params_m.

◆ operator<< [1/2]

std::ostream & operator<< ( std::ostream & os,
const ParameterList & sp )
friend

Print this parameter list.

Definition at line 137 of file ParameterList.h.

References ParameterList(), and params_m.

◆ operator<< [2/2]

template<class Stream>
Stream & operator<< ( Stream & stream,
const ParameterList & sp )
friend

Definition at line 120 of file ParameterList.h.

References ParameterList(), and params_m.

Member Data Documentation

◆ params_m

std::map<std::string, variant_t> ippl::ParameterList::params_m
protected

Definition at line 173 of file ParameterList.h.

Referenced by add(), get(), get(), merge(), operator<<, operator<<, operator=(), update(), and update().


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