|
OOFEM 3.0
|
#include <timestepcontroller.h>
Public Member Functions | |
| TimeStepController (EngngModel *e) | |
| const char * | giveClassName () const |
| virtual TimeStep * | giveCurrentStep () |
| virtual TimeStep * | givePreviousStep () |
| virtual TimeStep * | giveNextStep () |
| Returns next time step (next to current step) of receiver. | |
| TimeStep * | generateNextStep () |
| void | initializeFrom (InputRecord &ir) |
| void | saveContext (DataStream &stream) |
| void | restoreContext (DataStream &stream) |
| int | giveNumberOfMetaSteps () |
| Return number of meta steps. | |
| MetaStep * | giveMetaStep (int i) |
| Returns the i-th meta step. | |
| int | instanciateDefaultMetaStep (InputRecord &ir) |
| int | instanciateMetaSteps (DataReader &dr) |
| void | initMetaStepAttributes (MetaStep *mStep) |
| int | giveMetaStepNumber () |
| void | postInitialize () |
| void | reduceTimeStep () |
| void | adaptTimeStep (int nIter) |
| int | giveNumberOfSteps () |
| int | giveFinalTime () |
| double | giveDeltaT () |
| double | giveMinDeltaT () |
| void | setDeltaT (double dT) |
| MetaStep * | giveCurrentMetaStep () |
| void | setCurrentMetaStepNumber (int smstep) |
Protected Member Functions | |
| virtual double | giveEndOfTimeOfInterest () |
| Returns end of time interest (time corresponding to end of time integration). | |
| int | giveNumberOfTimeStepWhenIcApply () |
| Returns the time step number, when initial conditions should apply. | |
Protected Attributes | |
| int | numberOfMetaSteps = 0 |
| int | currentMetaStepNumber = 0 |
| std ::unique_ptr< TimeStep > | currentStep |
| Current time step. | |
| std ::unique_ptr< TimeStep > | previousStep |
| Previous time step. | |
| EngngModel * | eModel |
| double | initT = 0. |
| Initial time from which the computation runs. Default is zero. | |
| std ::vector< MetaStep > | metaStepList |
| List of problem metasteps. | |
| double | alpha = 1.0 |
This class is responsible for controlling the time step changes during the analysis based on the information from different levels The class hold time step reduction strategy that defines how exactly is the step reduction/increa based on specific implementation. It can take into account number of global Newton's interations, convergence problems at the material or element level, etc.
Definition at line 57 of file timestepcontroller.h.
|
inline |
Creates a new solution step.
| n | Solution step number. |
| e | Reference to corresponding engng model. |
| mn | Meta step number. |
| tt | Intrinsic time. |
| dt | Intrinsic time increment. |
| counter | Solution state counter. |
| td | Time discretization. |
Definition at line 88 of file timestepcontroller.h.
References eModel.
| void oofem::TimeStepController::adaptTimeStep | ( | int | nIter | ) |
Definition at line 193 of file timestepcontroller.C.
References currentStep, giveCurrentMetaStep(), and oofem::MetaStep::giveDeltaT().
|
inline |
Definition at line 115 of file timestepcontroller.h.
|
inline |
Returns class name of receiver.
Definition at line 93 of file timestepcontroller.h.
|
inline |
Definition at line 153 of file timestepcontroller.h.
References currentMetaStepNumber, and metaStepList.
Referenced by adaptTimeStep(), giveDeltaT(), giveMinDeltaT(), giveNextStep(), giveNumberOfSteps(), reduceTimeStep(), and setDeltaT().
|
inlinevirtual |
Returns the current time step.
Definition at line 99 of file timestepcontroller.h.
References currentStep.
|
inline |
Definition at line 150 of file timestepcontroller.h.
References giveCurrentMetaStep().
Referenced by giveNextStep().
|
inlineprotectedvirtual |
Returns end of time interest (time corresponding to end of time integration).
Definition at line 69 of file timestepcontroller.h.
|
inline |
Definition at line 149 of file timestepcontroller.h.
Referenced by instanciateMetaSteps().
| MetaStep * oofem::TimeStepController::giveMetaStep | ( | int | i | ) |
Returns the i-th meta step.
Definition at line 133 of file timestepcontroller.C.
References metaStepList, numberOfMetaSteps, and OOFEM_ERROR.
|
inline |
Definition at line 141 of file timestepcontroller.h.
|
inline |
Definition at line 151 of file timestepcontroller.h.
References giveCurrentMetaStep().
|
virtual |
Returns next time step (next to current step) of receiver.
Definition at line 77 of file timestepcontroller.C.
References alpha, currentStep, eModel, giveCurrentMetaStep(), giveDeltaT(), giveNumberOfTimeStepWhenIcApply(), and previousStep.
|
inline |
Return number of meta steps.
Definition at line 134 of file timestepcontroller.h.
References numberOfMetaSteps.
|
inline |
Definition at line 146 of file timestepcontroller.h.
References giveCurrentMetaStep().
|
inlineprotected |
Returns the time step number, when initial conditions should apply.
Definition at line 71 of file timestepcontroller.h.
Referenced by giveNextStep().
|
inlinevirtual |
Returns previous time step.
| force | when set to true then previous step of receiver is returned instead of master (default) |
Definition at line 106 of file timestepcontroller.h.
References previousStep.
| void oofem::TimeStepController::initializeFrom | ( | InputRecord & | ir | ) |
Definition at line 53 of file timestepcontroller.C.
References _IFT_EngngModel_nmsteps, _IFT_TimeStepController_alpha, alpha, oofem::DataReader::giveGroupRecords(), oofem::InputRecord::giveReader(), IR_GIVE_OPTIONAL_FIELD, oofem::DataReader::IR_mstepRec, numberOfMetaSteps, oofem::InputRecord::ptr(), and oofem::DataReader::GroupRecords::size().
| void oofem::TimeStepController::initMetaStepAttributes | ( | MetaStep * | mStep | ) |
Definition at line 160 of file timestepcontroller.C.
References eModel.
| int oofem::TimeStepController::instanciateDefaultMetaStep | ( | InputRecord & | ir | ) |
Definition at line 146 of file timestepcontroller.C.
References eModel, metaStepList, and numberOfMetaSteps.
| int oofem::TimeStepController::instanciateMetaSteps | ( | DataReader & | dr | ) |
Definition at line 106 of file timestepcontroller.C.
References eModel, giveFinalTime(), oofem::DataReader::giveGroupRecords(), oofem::DataReader::IR_mstepRec, metaStepList, and numberOfMetaSteps.
| void oofem::TimeStepController::postInitialize | ( | ) |
Definition at line 171 of file timestepcontroller.C.
References eModel, and metaStepList.
| void oofem::TimeStepController::reduceTimeStep | ( | ) |
Definition at line 182 of file timestepcontroller.C.
References currentStep, giveCurrentMetaStep(), oofem::MetaStep::giveDeltaT(), and oofem::MetaStep::reduceTimeStep().
| void oofem::TimeStepController::restoreContext | ( | DataStream & | stream | ) |
Restores the receiver state previously written in stream.
Definition at line 70 of file timestepcontroller.C.
| void oofem::TimeStepController::saveContext | ( | DataStream & | stream | ) |
Stores receiver state to output stream.
| stream | Output stream. |
| ContextIOERR | If error encountered. |
Definition at line 63 of file timestepcontroller.C.
|
inline |
Definition at line 154 of file timestepcontroller.h.
References currentMetaStepNumber.
|
inline |
Definition at line 152 of file timestepcontroller.h.
References giveCurrentMetaStep().
|
protected |
Definition at line 76 of file timestepcontroller.h.
Referenced by giveNextStep(), and initializeFrom().
|
protected |
Definition at line 61 of file timestepcontroller.h.
Referenced by giveCurrentMetaStep(), and setCurrentMetaStepNumber().
|
protected |
Current time step.
Definition at line 63 of file timestepcontroller.h.
Referenced by adaptTimeStep(), giveCurrentStep(), giveNextStep(), and reduceTimeStep().
|
protected |
Definition at line 67 of file timestepcontroller.h.
Referenced by giveNextStep(), initMetaStepAttributes(), instanciateDefaultMetaStep(), instanciateMetaSteps(), postInitialize(), and TimeStepController().
|
protected |
Initial time from which the computation runs. Default is zero.
Definition at line 73 of file timestepcontroller.h.
|
protected |
List of problem metasteps.
Definition at line 75 of file timestepcontroller.h.
Referenced by giveCurrentMetaStep(), giveMetaStep(), instanciateDefaultMetaStep(), instanciateMetaSteps(), and postInitialize().
|
protected |
Definition at line 60 of file timestepcontroller.h.
Referenced by giveMetaStep(), giveNumberOfMetaSteps(), initializeFrom(), instanciateDefaultMetaStep(), and instanciateMetaSteps().
|
protected |
Previous time step.
Definition at line 65 of file timestepcontroller.h.
Referenced by giveNextStep(), and givePreviousStep().