OOFEM 3.0
Loading...
Searching...
No Matches
oofem::TimeStepController Class Reference

#include <timestepcontroller.h>

Collaboration diagram for oofem::TimeStepController:

Public Member Functions

 TimeStepController (EngngModel *e)
const char * giveClassName () const
virtual TimeStepgiveCurrentStep ()
virtual TimeStepgivePreviousStep ()
virtual TimeStepgiveNextStep ()
 Returns next time step (next to current step) of receiver.
TimeStepgenerateNextStep ()
void initializeFrom (InputRecord &ir)
void saveContext (DataStream &stream)
void restoreContext (DataStream &stream)
int giveNumberOfMetaSteps ()
 Return number of meta steps.
MetaStepgiveMetaStep (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)
MetaStepgiveCurrentMetaStep ()
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< TimeStepcurrentStep
 Current time step.
std ::unique_ptr< TimeSteppreviousStep
 Previous time step.
EngngModeleModel
double initT = 0.
 Initial time from which the computation runs. Default is zero.
std ::vector< MetaStepmetaStepList
 List of problem metasteps.
double alpha = 1.0

Detailed Description

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.

Constructor & Destructor Documentation

◆ TimeStepController()

oofem::TimeStepController::TimeStepController ( EngngModel * e)
inline

Creates a new solution step.

Parameters
nSolution step number.
eReference to corresponding engng model.
mnMeta step number.
ttIntrinsic time.
dtIntrinsic time increment.
counterSolution state counter.
tdTime discretization.

Definition at line 88 of file timestepcontroller.h.

References eModel.

Member Function Documentation

◆ adaptTimeStep()

void oofem::TimeStepController::adaptTimeStep ( int nIter)

◆ generateNextStep()

TimeStep * oofem::TimeStepController::generateNextStep ( )
inline

Definition at line 115 of file timestepcontroller.h.

◆ giveClassName()

const char * oofem::TimeStepController::giveClassName ( ) const
inline

Returns class name of receiver.

Returns
Pointer to s parameter filled with name.

Definition at line 93 of file timestepcontroller.h.

◆ giveCurrentMetaStep()

MetaStep * oofem::TimeStepController::giveCurrentMetaStep ( )
inline

◆ giveCurrentStep()

virtual TimeStep * oofem::TimeStepController::giveCurrentStep ( )
inlinevirtual

Returns the current time step.

Definition at line 99 of file timestepcontroller.h.

References currentStep.

◆ giveDeltaT()

double oofem::TimeStepController::giveDeltaT ( )
inline

Definition at line 150 of file timestepcontroller.h.

References giveCurrentMetaStep().

Referenced by giveNextStep().

◆ giveEndOfTimeOfInterest()

virtual double oofem::TimeStepController::giveEndOfTimeOfInterest ( )
inlineprotectedvirtual

Returns end of time interest (time corresponding to end of time integration).

Definition at line 69 of file timestepcontroller.h.

◆ giveFinalTime()

int oofem::TimeStepController::giveFinalTime ( )
inline

Definition at line 149 of file timestepcontroller.h.

Referenced by instanciateMetaSteps().

◆ giveMetaStep()

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.

◆ giveMetaStepNumber()

int oofem::TimeStepController::giveMetaStepNumber ( )
inline

Definition at line 141 of file timestepcontroller.h.

◆ giveMinDeltaT()

double oofem::TimeStepController::giveMinDeltaT ( )
inline

Definition at line 151 of file timestepcontroller.h.

References giveCurrentMetaStep().

◆ giveNextStep()

TimeStep * oofem::TimeStepController::giveNextStep ( )
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.

◆ giveNumberOfMetaSteps()

int oofem::TimeStepController::giveNumberOfMetaSteps ( )
inline

Return number of meta steps.

Definition at line 134 of file timestepcontroller.h.

References numberOfMetaSteps.

◆ giveNumberOfSteps()

int oofem::TimeStepController::giveNumberOfSteps ( )
inline

Definition at line 146 of file timestepcontroller.h.

References giveCurrentMetaStep().

◆ giveNumberOfTimeStepWhenIcApply()

int oofem::TimeStepController::giveNumberOfTimeStepWhenIcApply ( )
inlineprotected

Returns the time step number, when initial conditions should apply.

Definition at line 71 of file timestepcontroller.h.

Referenced by giveNextStep().

◆ givePreviousStep()

virtual TimeStep * oofem::TimeStepController::givePreviousStep ( )
inlinevirtual

Returns previous time step.

Parameters
forcewhen set to true then previous step of receiver is returned instead of master (default)

Definition at line 106 of file timestepcontroller.h.

References previousStep.

◆ initializeFrom()

◆ initMetaStepAttributes()

void oofem::TimeStepController::initMetaStepAttributes ( MetaStep * mStep)

Definition at line 160 of file timestepcontroller.C.

References eModel.

◆ instanciateDefaultMetaStep()

int oofem::TimeStepController::instanciateDefaultMetaStep ( InputRecord & ir)

Definition at line 146 of file timestepcontroller.C.

References eModel, metaStepList, and numberOfMetaSteps.

◆ instanciateMetaSteps()

int oofem::TimeStepController::instanciateMetaSteps ( DataReader & dr)

◆ postInitialize()

void oofem::TimeStepController::postInitialize ( )

Definition at line 171 of file timestepcontroller.C.

References eModel, and metaStepList.

◆ reduceTimeStep()

void oofem::TimeStepController::reduceTimeStep ( )

◆ restoreContext()

void oofem::TimeStepController::restoreContext ( DataStream & stream)

Restores the receiver state previously written in stream.

See also
saveContext member function.

Definition at line 70 of file timestepcontroller.C.

◆ saveContext()

void oofem::TimeStepController::saveContext ( DataStream & stream)

Stores receiver state to output stream.

Parameters
streamOutput stream.
Exceptions
ContextIOERRIf error encountered.

Definition at line 63 of file timestepcontroller.C.

◆ setCurrentMetaStepNumber()

void oofem::TimeStepController::setCurrentMetaStepNumber ( int smstep)
inline

Definition at line 154 of file timestepcontroller.h.

References currentMetaStepNumber.

◆ setDeltaT()

void oofem::TimeStepController::setDeltaT ( double dT)
inline

Definition at line 152 of file timestepcontroller.h.

References giveCurrentMetaStep().

Member Data Documentation

◆ alpha

double oofem::TimeStepController::alpha = 1.0
protected

Definition at line 76 of file timestepcontroller.h.

Referenced by giveNextStep(), and initializeFrom().

◆ currentMetaStepNumber

int oofem::TimeStepController::currentMetaStepNumber = 0
protected

Definition at line 61 of file timestepcontroller.h.

Referenced by giveCurrentMetaStep(), and setCurrentMetaStepNumber().

◆ currentStep

std :: unique_ptr< TimeStep > oofem::TimeStepController::currentStep
protected

Current time step.

Definition at line 63 of file timestepcontroller.h.

Referenced by adaptTimeStep(), giveCurrentStep(), giveNextStep(), and reduceTimeStep().

◆ eModel

EngngModel* oofem::TimeStepController::eModel
protected

◆ initT

double oofem::TimeStepController::initT = 0.
protected

Initial time from which the computation runs. Default is zero.

Definition at line 73 of file timestepcontroller.h.

◆ metaStepList

std :: vector< MetaStep > oofem::TimeStepController::metaStepList
protected

List of problem metasteps.

Definition at line 75 of file timestepcontroller.h.

Referenced by giveCurrentMetaStep(), giveMetaStep(), instanciateDefaultMetaStep(), instanciateMetaSteps(), and postInitialize().

◆ numberOfMetaSteps

int oofem::TimeStepController::numberOfMetaSteps = 0
protected

◆ previousStep

std :: unique_ptr< TimeStep > oofem::TimeStepController::previousStep
protected

Previous time step.

Definition at line 65 of file timestepcontroller.h.

Referenced by giveNextStep(), and givePreviousStep().


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

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011