23 namespace tinyxml2 {
class XMLElement; }
43 bool parse(
char* keyWord, std::istream& is);
46 bool parse(
const tinyxml2::XMLElement* elem);
55 bool reset(
int istep = 0);
67 bool serialize(std::map<std::string,std::string>& data)
const;
70 bool deSerialize(
const std::map<std::string,std::string>& data);
90 typedef std::pair<std::vector<double>,
double>
Step;
Time domain representation for time-dependent and nonlinear solvers.
Class for encapsulation of general time stepping parameters.
Definition: TimeStep.h:31
int step
Time step counter.
Definition: TimeStep.h:72
bool serialize(std::map< std::string, std::string > &data) const
Serialize internal state for restarting purposes.
Definition: TimeStep.C:355
TimeStep & operator=(const TimeStep &ts)
Assigment operator.
Definition: TimeStep.C:39
bool reset(int istep=0)
Resets the time step to the specified step.
Definition: TimeStep.C:203
bool hasReached(double t) const
Returns true if the given time t has been reached.
Definition: TimeStep.C:191
double stopTime
Stop time of simulation.
Definition: TimeStep.h:77
TimeSteps::iterator stepIt
Running iterator over the time steps.
Definition: TimeStep.h:94
double f2
Scale factor for reduced time step size.
Definition: TimeStep.h:88
double f1
Scale factor for increased time step size.
Definition: TimeStep.h:87
bool multiSteps() const
Returns true if the simulation consists of several time steps.
Definition: TimeStep.C:184
double starTime
Start time of simulation.
Definition: TimeStep.h:76
size_t lstep
Local step counter, i.e., within current *stepIt.
Definition: TimeStep.h:96
bool finished() const
Returns true if the end of the simulation has been reached.
Definition: TimeStep.C:331
int niter
Number of iterations in previous time step.
Definition: TimeStep.h:81
TimeStep(const TimeStep &ts)
Copy constructor.
Definition: TimeStep.h:36
std::pair< std::vector< double >, double > Step
Time step definition.
Definition: TimeStep.h:90
double dtMax
Maximun time increment size.
Definition: TimeStep.h:86
bool increment()
Advances the time increments one step further.
Definition: TimeStep.C:223
std::vector< Step > TimeSteps
Time step container.
Definition: TimeStep.h:91
int nInitStep
Number of fixed timesteps in the beginning.
Definition: TimeStep.h:82
TimeSteps mySteps
Time step definitions.
Definition: TimeStep.h:93
double dtMin
Minimum time increment size.
Definition: TimeStep.h:85
TimeStep()
The constructor initializes the counters to zero.
Definition: TimeStep.C:25
bool parse(char *keyWord, std::istream &is)
Parses a data section from an input stream.
Definition: TimeStep.C:62
bool deSerialize(const std::map< std::string, std::string > &data)
Set internal state from a serialized state.
Definition: TimeStep.C:371
TimeDomain time
Time domain data.
Definition: TimeStep.h:74
int & iter
Iteration counter.
Definition: TimeStep.h:73
int maxStep
Maximum number of time steps.
Definition: TimeStep.h:83
bool cutback()
Restarts current increment with a smaller step size on divergence.
Definition: TimeStep.C:303
double maxCFL
CFL restriction on time step size (0.0: no restriction)
Definition: TimeStep.h:78
Struct representing the time domain.
Definition: TimeDomain.h:23