|
OOFEM 3.0
|
#include <metastep.h>
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. | |
| InputRecord & | giveAttributesRecord () |
| 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) |
| Function * | giveDtFunction () |
| 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. | |
| TimeStepReductionStrategy * | giveTimeStepReductionStrategy () |
Protected Attributes | |
| EngngModel * | eModel |
| 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< InputRecord > | attributes |
| 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< TimeStepReductionStrategy > | timeStepReductionStrategy |
| Time step reduction strategy type. | |
| double | minDeltaT |
| Minimal value of the time step. | |
| double | previousMetaStepFinalTime = 0 |
| final time of the previous meta step | |
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.
| oofem::MetaStep::MetaStep | ( | int | n, |
| EngngModel * | e ) |
Constructor. Creates a new meta step.
| n | Meta step number. |
| e | Reference to corresponding engineering model. |
Definition at line 39 of file metastep.C.
References eModel, number, and numberOfSteps.
Referenced by MetaStep().
| 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.
|
default |
References MetaStep().
| 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.
|
inline |
Definition at line 174 of file metastep.h.
|
inline |
Returns e-model attributes.
Definition at line 122 of file metastep.h.
Referenced by oofem::NonLinearStatic::giveNumericalMethod(), oofem::HuertaErrorEstimator::setupRefinedProblemProlog(), oofem::AdditiveManufacturingProblem::updateAttributes(), oofem::EngngModel::updateAttributes(), oofem::NonLinearDynamic::updateAttributes(), oofem::NonLinearStatic::updateAttributes(), oofem::StaggeredProblem::updateAttributes(), oofem::StaticStructural::updateAttributes(), and oofem::NonLinearStatic::updateLoadVectors().
|
inline |
Returns class name of receiver.
Definition at line 140 of file metastep.h.
|
inline |
Returns the time step length.
Definition at line 160 of file metastep.h.
Referenced by oofem::TimeStepController::adaptTimeStep(), and oofem::TimeStepController::reduceTimeStep().
| 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.
|
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().
|
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().
|
inline |
Returns final time of the meta step.
Definition at line 144 of file metastep.h.
References finalTime.
Referenced by oofem::NonLinearStatic::updateLoadVectors().
|
inline |
|
inline |
Returns last step number.
Definition at line 138 of file metastep.h.
References numberOfSteps, and sindex.
|
inline |
Return the minimal time step length set be the user.
Definition at line 168 of file metastep.h.
Referenced by oofem::NonLinearStatic::updateLoadVectors().
|
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().
|
inline |
Return maximal number of time step reductions.
Definition at line 142 of file metastep.h.
References timeStepReductionStrategy.
|
inline |
Returns number of Steps it represent.
Definition at line 118 of file metastep.h.
Referenced by oofem::MicroMaterial::setMacroProperties(), oofem::HuertaErrorEstimator::setupRefinedProblemProlog(), oofem::AdditiveManufacturingProblem::solveYourself(), and oofem::StaggeredProblem::solveYourself().
|
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().
|
inline |
Returns time increment.
Definition at line 120 of file metastep.h.
|
inline |
Definition at line 182 of file metastep.h.
References timeStepReductionStrategy.
| void oofem::MetaStep::initializeFrom | ( | InputRecord & | ir | ) |
Instanciates the receiver from input record.
Definition at line 54 of file metastep.C.
References _IFT_MetaStep_deltaT, _IFT_MetaStep_dtFunction, _IFT_MetaStep_finalT, _IFT_MetaStep_nsteps, _IFT_MetaStep_prescribedTimes, _IFT_MetaStep_timeReductionStrategyType, attributes, oofem::classFactory, oofem::InputRecord::clone(), deltaT, dtFunction, finalTime, oofem::InputRecord::hasField(), IR_GIVE_FIELD, IR_GIVE_OPTIONAL_FIELD, minDeltaT, numberOfSteps, OOFEM_ERROR, prescribedTimes, previousMetaStepFinalTime, timeStepReductionStrategy, and timeStepReductionStrategyType.
| 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.
|
inline |
Definition at line 146 of file metastep.h.
| 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().
|
inline |
Set the time step length.
Definition at line 164 of file metastep.h.
|
inline |
Definition at line 145 of file metastep.h.
References finalTime.
| 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().
|
inline |
Definition at line 147 of file metastep.h.
References previousMetaStepFinalTime.
| 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.
| 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.
|
protected |
Engineering model attributes.
Definition at line 85 of file metastep.h.
Referenced by initializeFrom(), and MetaStep().
|
protected |
Intrinsic time increment.
Definition at line 81 of file metastep.h.
Referenced by adaptTimeStep(), giveDeltaT(), initializeFrom(), recomputeFinalTime(), and reduceTimeStep().
|
protected |
Specified times where the problem is solved merge with prescribedTimes.
Definition at line 95 of file metastep.h.
Referenced by giveDeltaT(), and giveDiscreteTime().
|
protected |
Associated time function for time step increment.
Definition at line 93 of file metastep.h.
Referenced by initializeFrom().
|
protected |
Engineering model of receiver.
Definition at line 77 of file metastep.h.
Referenced by MetaStep(), and MetaStep().
|
protected |
final time of the metastep
Definition at line 83 of file metastep.h.
Referenced by adaptTimeStep(), giveFinalTime(), initializeFrom(), recomputeFinalTime(), and setFinalTime().
|
protected |
Minimal value of the time step.
Definition at line 101 of file metastep.h.
Referenced by initializeFrom().
|
protected |
Receiver number.
Definition at line 89 of file metastep.h.
Referenced by giveNumber(), MetaStep(), and MetaStep().
|
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().
|
protected |
Specified times where the problem is solved.
Definition at line 91 of file metastep.h.
Referenced by giveDeltaT(), and initializeFrom().
|
protected |
final time of the previous meta step
Definition at line 103 of file metastep.h.
Referenced by initializeFrom(), and setPreviousMetaStepFinalTime().
|
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().
|
protected |
Time step reduction strategy type.
Definition at line 99 of file metastep.h.
Referenced by adaptTimeStep(), giveNumberOfMaxTimeStepReductions(), giveTimeStepReductionStrategy(), initializeFrom(), reduceTimeStep(), and setTimeStepReductionFactor().
|
protected |
Time step reduction strategy type - default no reduction of time step.
Definition at line 97 of file metastep.h.
Referenced by initializeFrom().