31#include "UnsteadyProblem.H"
39 scalar diffnow = mag(
nextWrite - atof(timeObject.timeName().c_str()));
40 scalar diffnext = mag(
nextWrite - atof(timeObject.timeName().c_str()) -
41 timeObject.deltaTValue());
43 if ( diffnow < diffnext)
53void UnsteadyProblem::setTimes(Time& timeObject)
56 startTime = para->ITHACAdict->lookupOrDefault<scalar>(
"startTime",
57 timeObject.startTime().value());
58 finalTime = para->ITHACAdict->lookupOrDefault<scalar>(
"finalTime",
59 timeObject.endTime().value());
60 timeStep = para->ITHACAdict->lookupOrDefault<scalar>(
"timeStep",
61 timeObject.deltaT().value());
64 "The finalTime needs to be bigger than the startTime");
66 "The timeStep needs to be bigger than the entire simulation Time");
68 "The writeEvery needs to larger or equal to the timeStep");
Class for the definition of some general parameters, the parameters must be defined from the file ITH...
static ITHACAparameters * getInstance(const fvMesh &mesh, Time &localTime)
Gets an instance of ITHACAparameters, to be used if the instance is not existing.
bool checkWrite(Time &timeObject)
Function to check if the solution must be exported.
scalar startTime
Start Time (initial time to start storing the snapshots).
scalar writeEvery
Time step of the writing procedure.
scalar timeStep
Time step of the simulation.
scalar nextWrite
Auxiliary variable to store the next writing instant.
scalar finalTime
Final time (final time of the simulation and consequently of the acquisition of the snapshots).