Aggregate condensing parameters concerning adaptive ODE evolution (cf. Adaptive::Adaptive()) in the style of a parameters::ParameterTable. More...
#include <ParsTrajectory.h>
Inheritance diagram for trajectory::ParsEvolved:Public Member Functions | |
| ParsEvolved (parameters::ParameterTable &, const std::string &mod="") | |
All Pars… classes are constructed taking a parameters::ParameterTable, to register the parameters on. More... | |
Public Attributes | |
| double & | epsRel |
| relative precision of ODE stepping (cf. evolved::TimeStepBookkeeper) | |
| double & | epsAbs |
| absolute precision ” | |
| evolved::SteppingFunction & | sf |
| stepping-function type | |
| double & | nextDtTryCorrectionFactor |
| cf. evolved::MakerGSL::MakerGSL() | |
Static Public Attributes | |
| static const double | epsRelDefault |
| The ultimate default of epsRel in the framework. | |
| static const double | epsAbsDefault |
| ” for epsAbs | |
Aggregate condensing parameters concerning adaptive ODE evolution (cf. Adaptive::Adaptive()) in the style of a parameters::ParameterTable.
The suit of ParsEvolved, ParsRun, ParsStochastic demonstrates a technique to facilitate reading parameters from command line and using them to initialize a (hierarchy of) class(es).
The same technique is to be used in elements when there is a detailed hierarchy of elements.
In principle the use of such Pars… classes could be avoided by initializing classes with a parameters::ParameterTable. E.g.
class X {
double& y1;
double& y2;
public:
X(Pars::ParameterTable& p) : y1(p.add("y1","y1 description",y1default)), y2(p.add("y2","y2 description",y2default)) {}
};
Avoiding this technique is a design decision: its drawback would be that too many things (virtually everything) would depend on the parameter-bundle, and every parameter inside classes has to be declared as reference, which then makes it difficult to initialize the class in any other way than with a parameters::ParameterTable.
Definition at line 38 of file ParsTrajectory.h.
| trajectory::ParsEvolved::ParsEvolved | ( | parameters::ParameterTable & | , |
| const std::string & | mod = "" |
||
| ) |
All Pars… classes are constructed taking a parameters::ParameterTable, to register the parameters on.
This occurs via the parameters::ParameterTable::addMod member function returning a reference to the registered parameter wherewith the public attributes (like ParsEvolved::epsRel) get initialized.
| [in] | mod | possible modifier suffix |