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

#include <metastep.h>

Collaboration diagram for oofem::MetaStep:

Public Member Functions

 MetaStep (int n, EngngModel *e)
 MetaStep (int n, EngngModel *e, int nsteps, InputRecord &attrib)
 MetaStep (MetaStep &&ms)=default
int giveNumber ()
 Returns receiver's number.
int giveNumberOfSteps ()
 Returns number of Steps it represent.
double giveTimeIncrement ()
 Returns time increment.
InputRecordgiveAttributesRecord ()
 Returns e-model attributes.
void initializeFrom (InputRecord &ir)
int setStepBounds (int startStepNumber)
 Sets the receiver bounds according to given solution step number, returns end index.
void setNumberOfSteps (int newNumberOfSteps)
 Sets the number of steps within the metastep.
int isStepValid (int solStepNumber)
 Tests if step number is maintained by receiver.
int giveStepRelativeNumber (int stepNumber)
 Returns the step relative number to receiver.
int giveFirstStepNumber ()
 Returns first step number.
int giveLastStepNumber ()
 Returns last step number.
const char * giveClassName () const
 Returns class name of receiver.
int giveNumberOfMaxTimeStepReductions ()
 Return maximal number of time step reductions.
double giveFinalTime ()
 Returns final time of the meta step.
void setFinalTime (double ft)
void recomputeFinalTime (int nSteps)
void setPreviousMetaStepFinalTime (double ft)
FunctiongiveDtFunction ()
double giveDeltaT ()
 Returns the time step length.
double giveDeltaT (int n, std::unique_ptr< TimeStep > &previousStep)
void setDeltaT (double dT)
 Set the time step length.
double giveMinDeltaT ()
 Return the minimal time step length set be the user.
double giveDiscreteTime (int n)
void checkDiscreteTimes ()
void reduceTimeStep ()
 Reduce the time step length in case of no convergence.
void adaptTimeStep (int nIter, double targetTime)
 Adapt the time step length based on the number of iterations.
void setTimeStepReductionFactor (double tStepRedFactor)
 Set the time step reduction factor used for reducing the time step length in case of no converfence.
TimeStepReductionStrategygiveTimeStepReductionStrategy ()

Protected Attributes

EngngModeleModel
 Engineering model of receiver.
int numberOfSteps
 Number of subsequent steps the receiver represent.
double deltaT = 1
 Intrinsic time increment.
double finalTime = 0
 final time of the metastep
std::shared_ptr< InputRecordattributes
 Engineering model attributes.
int sindex
 Start solution step number for which receiver is responsible.
int number
 Receiver number.
FloatArray prescribedTimes
 Specified times where the problem is solved.
int dtFunction = 0
 Associated time function for time step increment.
FloatArray discreteTimes
 Specified times where the problem is solved merge with prescribedTimes.
std::string timeStepReductionStrategyType = "NoReductionStrategy"
 Time step reduction strategy type - default no reduction of time step.
std ::unique_ptr< TimeStepReductionStrategytimeStepReductionStrategy
 Time step reduction strategy type.
double minDeltaT
 Minimal value of the time step.
double previousMetaStepFinalTime = 0
 final time of the previous meta step

Detailed Description

Class representing meta step. The meta step instance represent sequence of solution steps (timeSteps). The meta step role is to describe the common attributes related to solution steps it represent from the point of view of engineering model. For example, meta step may represent series of solution steps, for which particular solution control is used. The common attributes it represent depend on engineering model representation. To store these dependent attributes, the metaStep record (currently string) is read from input and is provided to engineering model upon request.

The meta step maintains its number, the total number of steps it represent, time increment and its e-model attributes.

Definition at line 73 of file metastep.h.

Constructor & Destructor Documentation

◆ MetaStep() [1/3]

oofem::MetaStep::MetaStep ( int n,
EngngModel * e )

Constructor. Creates a new meta step.

Parameters
nMeta step number.
eReference to corresponding engineering model.

Definition at line 39 of file metastep.C.

References eModel, number, and numberOfSteps.

Referenced by MetaStep().

◆ MetaStep() [2/3]

oofem::MetaStep::MetaStep ( int n,
EngngModel * e,
int nsteps,
InputRecord & attrib )

Definition at line 45 of file metastep.C.

References attributes, eModel, number, and numberOfSteps.

◆ MetaStep() [3/3]

oofem::MetaStep::MetaStep ( MetaStep && ms)
default

References MetaStep().

Member Function Documentation

◆ adaptTimeStep()

void oofem::MetaStep::adaptTimeStep ( int nIter,
double targetTime )

Adapt the time step length based on the number of iterations.

Definition at line 149 of file metastep.C.

References deltaT, finalTime, OOFEM_WARNING, and timeStepReductionStrategy.

◆ checkDiscreteTimes()

void oofem::MetaStep::checkDiscreteTimes ( )
inline

Definition at line 174 of file metastep.h.

◆ giveAttributesRecord()

◆ giveClassName()

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

Returns class name of receiver.

Definition at line 140 of file metastep.h.

◆ giveDeltaT() [1/2]

double oofem::MetaStep::giveDeltaT ( )
inline

Returns the time step length.

Definition at line 160 of file metastep.h.

Referenced by oofem::TimeStepController::adaptTimeStep(), and oofem::TimeStepController::reduceTimeStep().

◆ giveDeltaT() [2/2]

double oofem::MetaStep::giveDeltaT ( int n,
std::unique_ptr< TimeStep > & previousStep )

Definition at line 118 of file metastep.C.

References deltaT, discreteTimes, giveDiscreteTime(), giveDtFunction(), and prescribedTimes.

◆ giveDiscreteTime()

double oofem::MetaStep::giveDiscreteTime ( int n)
inline

Returns time for time step number n (array discreteTimes must be specified)

Definition at line 173 of file metastep.h.

References discreteTimes.

Referenced by giveDeltaT().

◆ giveDtFunction()

Function * oofem::MetaStep::giveDtFunction ( )
inline

Returns time function for time step increment. Used time function should provide step lengths as function of step number. Initial step with number 0 is considered as [ -dt(0), 0 ], first step is [ 0, dt(1) ], ...

Definition at line 156 of file metastep.h.

Referenced by giveDeltaT().

◆ giveFinalTime()

double oofem::MetaStep::giveFinalTime ( )
inline

Returns final time of the meta step.

Definition at line 144 of file metastep.h.

References finalTime.

Referenced by oofem::NonLinearStatic::updateLoadVectors().

◆ giveFirstStepNumber()

int oofem::MetaStep::giveFirstStepNumber ( )
inline

Returns first step number.

Definition at line 136 of file metastep.h.

References sindex.

◆ giveLastStepNumber()

int oofem::MetaStep::giveLastStepNumber ( )
inline

Returns last step number.

Definition at line 138 of file metastep.h.

References numberOfSteps, and sindex.

◆ giveMinDeltaT()

double oofem::MetaStep::giveMinDeltaT ( )
inline

Return the minimal time step length set be the user.

Definition at line 168 of file metastep.h.

Referenced by oofem::NonLinearStatic::updateLoadVectors().

◆ giveNumber()

int oofem::MetaStep::giveNumber ( )
inline

Returns receiver's number.

Definition at line 116 of file metastep.h.

References number.

Referenced by oofem::EngngModel::updateAttributes(), oofem::NonLinearStatic::updateAttributes(), and oofem::StaticStructural::updateAttributes().

◆ giveNumberOfMaxTimeStepReductions()

int oofem::MetaStep::giveNumberOfMaxTimeStepReductions ( )
inline

Return maximal number of time step reductions.

Definition at line 142 of file metastep.h.

References timeStepReductionStrategy.

◆ giveNumberOfSteps()

int oofem::MetaStep::giveNumberOfSteps ( )
inline

◆ giveStepRelativeNumber()

int oofem::MetaStep::giveStepRelativeNumber ( int stepNumber)
inline

Returns the step relative number to receiver.

Definition at line 134 of file metastep.h.

References sindex.

Referenced by oofem::AdditiveManufacturingProblem::solveYourself(), and oofem::StaggeredProblem::solveYourself().

◆ giveTimeIncrement()

double oofem::MetaStep::giveTimeIncrement ( )
inline

Returns time increment.

Definition at line 120 of file metastep.h.

◆ giveTimeStepReductionStrategy()

TimeStepReductionStrategy * oofem::MetaStep::giveTimeStepReductionStrategy ( )
inline

Definition at line 182 of file metastep.h.

References timeStepReductionStrategy.

◆ initializeFrom()

◆ isStepValid()

int oofem::MetaStep::isStepValid ( int solStepNumber)

Tests if step number is maintained by receiver.

Definition at line 111 of file metastep.C.

References numberOfSteps, and sindex.

◆ recomputeFinalTime()

void oofem::MetaStep::recomputeFinalTime ( int nSteps)
inline

Definition at line 146 of file metastep.h.

References deltaT, and finalTime.

◆ reduceTimeStep()

void oofem::MetaStep::reduceTimeStep ( )

Reduce the time step length in case of no convergence.

Definition at line 138 of file metastep.C.

References deltaT, OOFEM_ERROR, and timeStepReductionStrategy.

Referenced by oofem::TimeStepController::reduceTimeStep().

◆ setDeltaT()

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

Set the time step length.

Definition at line 164 of file metastep.h.

◆ setFinalTime()

void oofem::MetaStep::setFinalTime ( double ft)
inline

Definition at line 145 of file metastep.h.

References finalTime.

◆ setNumberOfSteps()

void oofem::MetaStep::setNumberOfSteps ( int newNumberOfSteps)

Sets the number of steps within the metastep.

Definition at line 105 of file metastep.C.

References numberOfSteps.

Referenced by oofem::MicroMaterial::setMacroProperties().

◆ setPreviousMetaStepFinalTime()

void oofem::MetaStep::setPreviousMetaStepFinalTime ( double ft)
inline

Definition at line 147 of file metastep.h.

References previousMetaStepFinalTime.

◆ setStepBounds()

int oofem::MetaStep::setStepBounds ( int startStepNumber)

Sets the receiver bounds according to given solution step number, returns end index.

Definition at line 97 of file metastep.C.

References numberOfSteps, and sindex.

◆ setTimeStepReductionFactor()

void oofem::MetaStep::setTimeStepReductionFactor ( double tStepRedFactor)

Set the time step reduction factor used for reducing the time step length in case of no converfence.

Definition at line 188 of file metastep.C.

References timeStepReductionStrategy.

Member Data Documentation

◆ attributes

std::shared_ptr<InputRecord> oofem::MetaStep::attributes
protected

Engineering model attributes.

Definition at line 85 of file metastep.h.

Referenced by initializeFrom(), and MetaStep().

◆ deltaT

double oofem::MetaStep::deltaT = 1
protected

Intrinsic time increment.

Definition at line 81 of file metastep.h.

Referenced by adaptTimeStep(), giveDeltaT(), initializeFrom(), recomputeFinalTime(), and reduceTimeStep().

◆ discreteTimes

FloatArray oofem::MetaStep::discreteTimes
protected

Specified times where the problem is solved merge with prescribedTimes.

Definition at line 95 of file metastep.h.

Referenced by giveDeltaT(), and giveDiscreteTime().

◆ dtFunction

int oofem::MetaStep::dtFunction = 0
protected

Associated time function for time step increment.

Definition at line 93 of file metastep.h.

Referenced by initializeFrom().

◆ eModel

EngngModel* oofem::MetaStep::eModel
protected

Engineering model of receiver.

Definition at line 77 of file metastep.h.

Referenced by MetaStep(), and MetaStep().

◆ finalTime

double oofem::MetaStep::finalTime = 0
protected

final time of the metastep

Definition at line 83 of file metastep.h.

Referenced by adaptTimeStep(), giveFinalTime(), initializeFrom(), recomputeFinalTime(), and setFinalTime().

◆ minDeltaT

double oofem::MetaStep::minDeltaT
protected

Minimal value of the time step.

Definition at line 101 of file metastep.h.

Referenced by initializeFrom().

◆ number

int oofem::MetaStep::number
protected

Receiver number.

Definition at line 89 of file metastep.h.

Referenced by giveNumber(), MetaStep(), and MetaStep().

◆ numberOfSteps

int oofem::MetaStep::numberOfSteps
protected

Number of subsequent steps the receiver represent.

Definition at line 79 of file metastep.h.

Referenced by giveLastStepNumber(), initializeFrom(), isStepValid(), MetaStep(), MetaStep(), setNumberOfSteps(), and setStepBounds().

◆ prescribedTimes

FloatArray oofem::MetaStep::prescribedTimes
protected

Specified times where the problem is solved.

Definition at line 91 of file metastep.h.

Referenced by giveDeltaT(), and initializeFrom().

◆ previousMetaStepFinalTime

double oofem::MetaStep::previousMetaStepFinalTime = 0
protected

final time of the previous meta step

Definition at line 103 of file metastep.h.

Referenced by initializeFrom(), and setPreviousMetaStepFinalTime().

◆ sindex

int oofem::MetaStep::sindex
protected

Start solution step number for which receiver is responsible.

Definition at line 87 of file metastep.h.

Referenced by giveFirstStepNumber(), giveLastStepNumber(), giveStepRelativeNumber(), isStepValid(), and setStepBounds().

◆ timeStepReductionStrategy

std :: unique_ptr<TimeStepReductionStrategy> oofem::MetaStep::timeStepReductionStrategy
protected

◆ timeStepReductionStrategyType

std::string oofem::MetaStep::timeStepReductionStrategyType = "NoReductionStrategy"
protected

Time step reduction strategy type - default no reduction of time step.

Definition at line 97 of file metastep.h.

Referenced by initializeFrom().


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