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

#include <nlinearstatic.h>

Inheritance diagram for oofem::NonLinearStatic:
Collaboration diagram for oofem::NonLinearStatic:

Public Member Functions

 NonLinearStatic (int i, EngngModel *master=nullptr)
virtual ~NonLinearStatic ()
FunctiongiveDtFunction ()
double giveDeltaT (int n)
void solveYourself () override
void solveYourselfAt (TimeStep *tStep) override
void terminate (TimeStep *tStep) override
void printOutputAt (FILE *file, TimeStep *tStep) override
void updateComponent (TimeStep *tStep, NumericalCmpn, Domain *d) override
void updateSolution (FloatArray &solutionVector, TimeStep *tStep, Domain *d) override
void updateMatrix (SparseMtrx &mat, TimeStep *tStep, Domain *d) override
void updateAttributes (MetaStep *mStep) override
double giveUnknownComponent (ValueModeType type, TimeStep *tStep, Domain *d, Dof *dof) override
void initializeFrom (InputRecord &ir) override
TimeStepgiveSolutionStepWhenIcApply (bool force=false) override
NumericalMethodgiveNumericalMethod (MetaStep *mStep) override
 Returns reference to receiver's numerical method.
TimeStepgiveNextStep () override
 Returns next time step (next to current step) of receiver.
double giveLoadLevel () override
 Returns the current load level.
void saveContext (DataStream &stream, ContextMode mode) override
void restoreContext (DataStream &stream, ContextMode mode) override
void updateDomainLinks () override
const char * giveClassName () const override
 Returns class name of the receiver.
fMode giveFormulation () override
int useNonlocalStiffnessOption () override
 Returns nonzero if nonlocal stiffness option activated.
int giveUnknownDictHashIndx (ValueModeType mode, TimeStep *tStep) override
 For load balancing purposes we store all values so hash is computed from mode value only.
int giveCurrentNumberOfIterations () override
void showSparseMtrxStructure (int type, oofegGraphicContext &gc, TimeStep *tStep) override
int estimateMaxPackSize (IntArray &commMap, DataStream &buff, int packUnpackType) override
LoadBalancergiveLoadBalancer () override
LoadBalancerMonitorgiveLoadBalancerMonitor () override
Public Member Functions inherited from oofem::LinearStatic
 LinearStatic (int i, EngngModel *master=nullptr)
virtual ~LinearStatic ()
virtual UnknownNumberingSchemegiveEquationNumbering ()
virtual const char * giveInputRecordName () const
Public Member Functions inherited from oofem::StructuralEngngModel
 StructuralEngngModel (int i, EngngModel *master=nullptr)
 Creates new StructuralEngngModel with number i, associated to domain d.
virtual ~StructuralEngngModel ()
 Destructor.
void updateYourself (TimeStep *tStep) override
int checkConsistency () override
void computeReaction (FloatArray &answer, TimeStep *tStep, int di)
void terminate (TimeStep *tStep) override
void buildReactionTable (IntArray &restrDofMans, IntArray &restrDofs, IntArray &eqn, TimeStep *tStep, int di)
void updateInternalRHS (FloatArray &answer, TimeStep *tStep, Domain *d, FloatArray *eNorm) override
void showSparseMtrxStructure (int type, oofegGraphicContext &gc, TimeStep *tStep) override
 EngngModel (int i, EngngModel *_master=NULL)
virtual ~EngngModel ()
 Destructor.
 EngngModel (const EngngModel &)=delete
EngngModeloperator= (const EngngModel &)=delete
DomaingiveDomain (int n)
void setDomain (int i, Domain *ptr, bool iDeallocateOld=true)
int giveNumberOfDomains ()
 Returns number of domains in problem.
const std::string & giveDescription () const
const time_t & giveStartTime ()
bool giveSuppressOutput () const
virtual ErrorEstimatorgiveDomainErrorEstimator (int n)
virtual MaterialInterfacegiveMaterialInterface (int n)
void setNumberOfEquations (int id, int neq)
FILE * giveOutputStream ()
 Returns file descriptor of output file.
std::string giveOutputBaseFileName ()
std::string giveReferenceFileName ()
void letOutputBaseFileNameBe (const std ::string &src)
ContextOutputMode giveContextOutputMode () const
int giveContextOutputStep () const
void setContextOutputMode (ContextOutputMode contextMode)
void setUDContextOutputMode (int cStep)
double giveDeltaT ()
 Returns time step size from the time step controlelr.
void setDeltaT (double dT)
 Returns time step size through the time step controlelr.
void setProblemMode (problemMode pmode)
void setParallelMode (bool newParallelFlag)
problemMode giveProblemMode () const
 Returns domain mode.
void setProblemScale (problemScale pscale)
problemScale giveProblemScale () const
 Returns scale in multiscale simulation.
virtual void setRenumberFlag ()
 Sets the renumber flag to true.
virtual void resetRenumberFlag ()
 Sets the renumber flag to false.
double giveSolutionStepTime ()
void giveAnalysisTime (int &rhrs, int &rmin, int &rsec, int &uhrs, int &umin, int &usec)
void terminateAnalysis ()
virtual void restartYourself (TimeStep *tS)
virtual void doStepOutput (TimeStep *tStep)
void saveStepContext (TimeStep *tStep, ContextMode mode)
virtual void initializeYourself (TimeStep *tStep)
virtual int initializeAdaptive (int tStepNumber)
virtual int giveNumberOfDomainEquations (int di, const UnknownNumberingScheme &num)
virtual FieldPtr giveField (FieldType key, TimeStep *)
virtual FieldPtr giveField (InternalStateType key, TimeStep *)
EngngModelgiveMasterEngngModel ()
 Returns the master engnmodel.
virtual double giveEigenValue (int eigNum)
 Only relevant for eigen value analysis. Otherwise returns zero.
virtual void setActiveVector (int i)
 Only relevant for eigen value analysis. Otherwise does noting.
int updateSharedDofManagers (FloatArray &answer, const UnknownNumberingScheme &s, int ExchangeTag)
int exchangeRemoteElementData (int ExchangeTag)
MPI_Comm giveParallelComm ()
 Returns the communication object of reciever.
int packRemoteElementData (ProcessCommunicator &processComm)
int unpackRemoteElementData (ProcessCommunicator &processComm)
int packDofManagers (ArrayWithNumbering *src, ProcessCommunicator &processComm)
int unpackDofManagers (ArrayWithNumbering *dest, ProcessCommunicator &processComm)
ProblemCommunicatorgiveProblemCommunicator (EngngModelCommType t)
void initializeCommMaps (bool forceInit=false)
virtual int instanciateYourself (DataReader &dr, InputRecord &ir, const char *outFileName, const char *desc)
void Instanciate_init ()
int instanciateDomains (DataReader &dr)
 Instanciate problem domains by calling their instanciateYourself() service.
int instanciateMetaSteps (DataReader &dr)
 Instanciate problem meta steps by calling their instanciateYourself() service.
virtual int instanciateDefaultMetaStep (InputRecord &ir)
 Instanciate default metastep, if nmsteps is zero.
void initMetaStepAttributes (MetaStep *mStep)
MetaStepgiveCurrentMetaStep ()
 Returns current meta step.
virtual TimeStepgiveCurrentStep (bool force=false)
virtual void adaptTimeStep (double nIter)
virtual TimeStepgivePreviousStep (bool force=false)
virtual void preInitializeNextStep ()
 Does a pre-initialization of the next time step (implement if necessarry).
virtual int giveNumberOfFirstStep (bool force=false)
int giveNumberOfMetaSteps ()
 Return number of meta steps.
MetaStepgiveMetaStep (int i)
 Returns the i-th meta step.
int giveNumberOfSteps (bool force=false)
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.
ExportModuleManagergiveExportModuleManager ()
 Returns receiver's export module manager.
EngngModelTimergiveTimer ()
 Returns reference to receiver timer (EngngModelTimer).
virtual double giveFinalTime ()
virtual int giveNewEquationNumber (int domain, DofIDItem)
virtual int giveNewPrescribedEquationNumber (int domain, DofIDItem)
std::string giveContextFileName (int tStepNumber, int stepVersion) const
std::string giveDomainFileName (int domainNum, int domainSerNum) const
virtual void initForNewIteration (Domain *d, TimeStep *tStep, int iterationNumber, const FloatArray &solution)
virtual void initStepIncrements ()
virtual int forceEquationNumbering (int i)
virtual int forceEquationNumbering ()
virtual int requiresUnknownsDictionaryUpdate ()
virtual bool requiresEquationRenumbering (TimeStep *tStep)
virtual void updateDofUnknownsDictionary (DofManager *, TimeStep *)
virtual bool newDofHandling ()
virtual ParallelContextgiveParallelContext (int n)
virtual void initParallelContexts ()
virtual void assemble (SparseMtrx &answer, TimeStep *tStep, const MatrixAssembler &ma, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, Domain *domain)
void assembleVector (FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
void assembleVectorFromDofManagers (FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
void assembleVectorFromElements (FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
void assembleVectorFromBC (FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
void assembleExtrapolatedForces (FloatArray &answer, TimeStep *tStep, CharType type, Domain *domain)
void assemblePrescribedExtrapolatedForces (FloatArray &answer, TimeStep *tStep, CharType type, Domain *domain)
virtual int checkProblemConsistency ()
virtual void init ()
virtual void postInitialize ()
virtual void printOutputAt (FILE *file, TimeStep *tStep, const IntArray &nodeSets, const IntArray &elementSets)
void outputNodes (FILE *file, Domain &domain, TimeStep *tStep, int setNum)
void outputElements (FILE *file, Domain &domain, TimeStep *tStep, int setNum)
void printYourself ()
 Prints state of receiver. Useful for debugging.
virtual void printDofOutputAt (FILE *stream, Dof *iDof, TimeStep *tStep)
bool isParallel () const
 Returns true if receiver in parallel mode.
int giveRank () const
 Returns domain rank in a group of collaborating processes (0..groupSize-1).
int giveNumberOfProcesses () const
 Returns the number of collaborating processes.
EngngModelContextgiveContext ()
 Context requesting service.
virtual int giveNumberOfSlaveProblems ()
 Returns number of slave problems.
virtual EngngModelgiveSlaveProblem (int i)
 Returns i-th slave problem.
virtual bool giveEquationScalingFlag ()
 Returns the Equation scaling flag, which is used to indicate that governing equation(s) are scaled, or non-dimensionalized.
virtual double giveVariableScale (VarScaleType varId)
 Returns the scale factor for given variable type.
virtual void balanceLoad (TimeStep *tStep)
void initParallel ()
 Request domain rank and problem size.
EngngModelgiveEngngModel ()
 Returns reference to itself -> required by communicator.h.
virtual bool isElementActivated (int elemNum)
virtual bool isElementActivated (Element *e)
TimeStepControllergiveTimeStepController ()
 Returns the time step controller.
virtual void drawYourself (oofegGraphicContext &gc)
virtual void drawElements (oofegGraphicContext &gc)
virtual void drawNodes (oofegGraphicContext &gc)
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros).

Protected Member Functions

void assemble (SparseMtrx &answer, TimeStep *tStep, const MatrixAssembler &ma, const UnknownNumberingScheme &, Domain *domain) override
void proceedStep (int di, TimeStep *tStep)
virtual void updateLoadVectors (TimeStep *tStep)
void computeExternalLoadReactionContribution (FloatArray &reactions, TimeStep *tStep, int di) override
void assembleIncrementalReferenceLoadVectors (FloatArray &_incrementalLoadVector, FloatArray &_incrementalLoadVectorOfPrescribed, SparseNonLinearSystemNM ::referenceLoadInputModeType _refMode, Domain *sourceDomain, TimeStep *tStep)
void packMigratingData (TimeStep *tStep) override
void unpackMigratingData (TimeStep *tStep) override
double giveInitialTime () override
 return time at the begining of analysis
Protected Member Functions inherited from oofem::StructuralEngngModel
void printReactionForces (TimeStep *tStep, int id, FILE *out)
void updateInternalState (TimeStep *tStep)
void printOutputAt (FILE *file, TimeStep *tStep) override

Protected Attributes

double prevStepLength
double currentStepLength
FloatArray totalDisplacement
FloatArray incrementOfDisplacement
FloatArray internalForces
FloatArray initialLoadVector
 A load vector already applied, which does not scales.
FloatArray incrementalLoadVector
FloatArray initialLoadVectorOfPrescribed
 A load vector which does not scale for prescribed DOFs.
FloatArray incrementalLoadVectorOfPrescribed
 Incremental Load Vector for prescribed DOFs.
double loadLevel
double cumulatedLoadLevel
bool mstepCumulateLoadLevelFlag
int currentIterations
NonLinearStatic_stiffnessMode stiffMode
int loadInitFlag
int nonlocalStiffnessFlag
bool updateElasticStiffnessFlag
ConvergedReason numMetStatus
SparseNonLinearSystemNMnMethod
 Numerical method used to solve the problem.
NonLinearStatic_controlType controlMode
 Characterizes the type of control used.
double deltaT
 Intrinsic time increment.
int dtFunction
 Associated time function for time step increment.
SparseNonLinearSystemNM::referenceLoadInputModeType refLoadInputMode
InitialGuess initialGuessType
 The initial guess type to use before starting the nonlinear solver.
Protected Attributes inherited from oofem::LinearStatic
std ::unique_ptr< SparseMtrxstiffnessMatrix
FloatArray loadVector
FloatArray displacementVector
LinSystSolverType solverType
SparseMtrxType sparseMtrxType
std ::unique_ptr< SparseLinearSystemNMnMethod
 Numerical method used to solve the problem.
int initFlag
EModelDefaultEquationNumbering equationNumbering
Protected Attributes inherited from oofem::StructuralEngngModel
StateCounterType internalVarUpdateStamp
FloatArray internalForcesEBENorm
 Norm of nodal internal forces evaluated on element by element basis (squared).
Protected Attributes inherited from oofem::EngngModel
int ndomains
 Number of receiver domains.
std ::vector< std ::unique_ptr< Domain > > domainList
 List of problem domains.
int numberOfSteps
 Total number of time steps.
int numberOfEquations
 Total number of equation in current time step.
int numberOfPrescribedEquations
 Total number or prescribed equations in current time step.
IntArray domainNeqs
 Number of equations per domain.
IntArray domainPrescribedNeqs
 Number of prescribed equations per domain.
bool renumberFlag
 Renumbering flag (renumbers equations after each step, necessary if Dirichlet BCs change).
bool profileOpt
 Profile optimized numbering flag (using Sloan's algorithm).
int equationNumberingCompleted
 Equation numbering completed flag.
int nMetaSteps
 Number of meta steps.
std ::vector< MetaStepmetaStepList
 List of problem metasteps.
std ::unique_ptr< TimeStepstepWhenIcApply
 Solution step when IC (initial conditions) apply.
std ::unique_ptr< TimeStepcurrentStep
 Current time step.
std ::unique_ptr< TimeSteppreviousStep
 Previous time step.
int number
 Receivers id.
std::string dataOutputFileName
 Path to output stream.
std::string coreOutputFileName
 String with core output file name.
FILE * outputStream
 Output stream.
std::string referenceFileName
 String with reference file name.
ContextOutputMode contextOutputMode
 Domain context output mode.
int contextOutputStep
ExportModuleManager exportModuleManager
 Export module manager.
InitModuleManager initModuleManager
 Initialization module manager.
MonitorManager monitorManager
 Monitor manager.
problemMode pMode
 Domain mode.
problemScale pScale
 Multiscale mode.
time_t startTime
 Solution start time.
EngngModelmaster
 Master e-model; if defined receiver is in maintained (slave) mode.
EngngModelContextcontext
 Context.
EngngModelTimer timer
 E-model timer.
int parallelFlag
 Flag indicating that the receiver runs in parallel.
enum fMode nonLinFormulation
 Type of non linear formulation (total or updated formulation).
std::unique_ptr< ErrorEstimatordefaultErrEstimator
 Error estimator. Useful for adaptivity, or simply printing errors output.
std::unique_ptr< TimeStepControllertimeStepController
 Time Step controller is responsible for collecting data from analysis, elements, and materials, and select the appropriate timestep size for the next step, or reduce the step in case of convergence problems.
int rank
 Domain rank in a group of collaborating processes (0..groupSize-1).
int numProcs
 Total number of collaborating processes.
int nonlocalExt
 Flag indicating if nonlocal extension active, which will cause data to be sent between shared elements before computing the internal forces.
char processor_name [PROCESSOR_NAME_LENGTH]
 Processor name.
MPI_Comm comm
 Communication object for this engineering model.
std::unique_ptr< LoadBalancerlb
 Load Balancer.
std::unique_ptr< LoadBalancerMonitorlbm
bool loadBalancingFlag
 If set to true, load balancing is active.
bool force_load_rebalance_in_first_step
 Debug flag forcing load balancing after first step.
CommunicatorBuffcommBuff
 Common Communicator buffer.
ProblemCommunicatorcommunicator
 Communicator.
ProblemCommunicatornonlocCommunicator
 NonLocal Communicator. Necessary when nonlocal constitutive models are used.
std ::vector< ParallelContextparallelContextList
 List where parallel contexts are stored.
bool suppressOutput
 Flag for suppressing output to file.
std::string simulationDescription

Additional Inherited Members

Public Types inherited from oofem::EngngModel
enum  EngngModel_UpdateMode { EngngModel_Unknown_Mode , EngngModel_SUMM_Mode , EngngModel_SET_Mode }
enum  EngngModelCommType { PC_default , PC_nonlocal }
enum  InitialGuess { IG_None = 0 , IG_Tangent = 1 }
Protected Types inherited from oofem::EngngModel
enum  {
  InternalForcesExchangeTag , MassExchangeTag , LoadExchangeTag , ReactionExchangeTag ,
  RemoteElementExchangeTag
}
 Message tags. More...

Detailed Description

This class implements nonlinear static engineering problem. Solution of this problem is performed as a series of increments (loading or displacement). At start of Each increment we assemble new tangent stiffness, and iteratively trying to fulfill balance of external and real internal forces at end of load step (see numerical method ). The loading applied can bo of two types:

  • proportional incremental loading
  • non-proportional fixed loading, reflecting the previous history, but could not be scaled (like dead weight).

Tasks:

  • Creating Numerical method for solving nonlinear problem.
  • Assembling tangent stiffness matrix.
  • Interfacing Numerical method to Elements.
  • Managing time steps.

Definition at line 90 of file nlinearstatic.h.

Constructor & Destructor Documentation

◆ NonLinearStatic()

◆ ~NonLinearStatic()

oofem::NonLinearStatic::~NonLinearStatic ( )
virtual

Definition at line 92 of file nlinearstatic.C.

References nMethod.

Member Function Documentation

◆ assemble()

void oofem::NonLinearStatic::assemble ( SparseMtrx & answer,
TimeStep * tStep,
const MatrixAssembler & ma,
const UnknownNumberingScheme & s,
Domain * domain )
overrideprotectedvirtual

Assembles characteristic matrix of required type into given sparse matrix.

Parameters
answerAssembled matrix.
tStepTime step, when answer is assembled.
sDetermines the equation numbering scheme.
typeCharacteristic components of type type are requested from elements and assembled.
domainSource domain.
Todo
This rotation matrix is not flexible enough.. it can only work with full size matrices and doesn't allow for flexibility in the matrixassembler.
Note
: Some active bcs still make changes even when they are not applied We should probably reconsider this approach, so that they e.g. just prescribe their lagrange mult. instead.

Reimplemented from oofem::EngngModel.

Definition at line 789 of file nlinearstatic.C.

References oofem::StructuralElement::addNonlocalStiffnessContributions(), oofem::Timer::getUtime(), oofem::Domain::giveElements(), nonlocalStiffnessFlag, OOFEM_LOG_DEBUG, oofem::SparseMtrx::printStatistics(), oofem::Timer::startTimer(), and oofem::Timer::stopTimer().

◆ assembleIncrementalReferenceLoadVectors()

void oofem::NonLinearStatic::assembleIncrementalReferenceLoadVectors ( FloatArray & _incrementalLoadVector,
FloatArray & _incrementalLoadVectorOfPrescribed,
SparseNonLinearSystemNM ::referenceLoadInputModeType _refMode,
Domain * sourceDomain,
TimeStep * tStep )
protected

◆ computeExternalLoadReactionContribution()

void oofem::NonLinearStatic::computeExternalLoadReactionContribution ( FloatArray & reactions,
TimeStep * tStep,
int di )
overrideprotectedvirtual

Computes the contribution external loading to reaction forces in given domain. Default implementations adds the contribution from computeElementLoadReactionContribution and computeElementLoadReactionContribution methods.

Parameters
reactionsContains the computed contributions.
tStepSolution step.
diDomain number.

Reimplemented from oofem::StructuralEngngModel.

Definition at line 847 of file nlinearstatic.C.

References oofem::FloatArray::add(), oofem::EngngModel::giveCurrentStep(), incrementalLoadVectorOfPrescribed, initialLoadVectorOfPrescribed, loadLevel, and OOFEM_ERROR.

◆ estimateMaxPackSize()

int oofem::NonLinearStatic::estimateMaxPackSize ( IntArray & commMap,
DataStream & buff,
int packUnpackType )
overridevirtual

Determines the space necessary for send/receive buffer. It uses related communication map pattern to determine the maximum size needed.

Parameters
commMapCommunication map used to send/receive messages.
buffCommunication buffer.
packUnpackTypeDetermines the type of packed quantity, used by receiver to estimate the size of pack/unpack buffer accordingly.
Returns
Upper bound of space needed.
Todo
Fix this old ProblemCommMode__NODE_CUT value
Todo
Fix this old ProblemCommMode__NODE_CUT value

Reimplemented from oofem::LinearStatic.

Definition at line 889 of file nlinearstatic.C.

References oofem::Element::estimatePackSize(), oofem::Domain::giveDofManager(), oofem::EngngModel::giveDomain(), oofem::Domain::giveElement(), oofem::DataStream::givePackSizeOfDouble(), and oofem::max().

◆ giveClassName()

const char * oofem::NonLinearStatic::giveClassName ( ) const
inlineoverridevirtual

Returns class name of the receiver.

Reimplemented from oofem::LinearStatic.

Definition at line 170 of file nlinearstatic.h.

◆ giveCurrentNumberOfIterations()

int oofem::NonLinearStatic::giveCurrentNumberOfIterations ( )
inlineoverridevirtual

Returns number of iterations that was required to reach equilibrium - used for adaptive step length in staggered problem

Reimplemented from oofem::EngngModel.

Definition at line 175 of file nlinearstatic.h.

References currentIterations.

◆ giveDeltaT()

double oofem::NonLinearStatic::giveDeltaT ( int n)

Definition at line 345 of file nlinearstatic.C.

References deltaT, giveDtFunction(), oofem::microScale, and oofem::EngngModel::pScale.

Referenced by giveNextStep().

◆ giveDtFunction()

Function * oofem::NonLinearStatic::giveDtFunction ( )

Definition at line 333 of file nlinearstatic.C.

References dtFunction, and oofem::EngngModel::giveDomain().

Referenced by giveDeltaT().

◆ giveFormulation()

fMode oofem::NonLinearStatic::giveFormulation ( )
inlineoverridevirtual

Indicates type of non linear computation (total or updated formulation). This is used for example on Nodal level to update coordinates if updated formulation is done, or on element level, when non linear contributions are computed.

Reimplemented from oofem::LinearStatic.

Definition at line 171 of file nlinearstatic.h.

References oofem::EngngModel::nonLinFormulation.

◆ giveInitialTime()

double oofem::NonLinearStatic::giveInitialTime ( )
inlineoverrideprotectedvirtual

return time at the begining of analysis

Reimplemented from oofem::EngngModel.

Definition at line 201 of file nlinearstatic.h.

Referenced by updateLoadVectors().

◆ giveLoadBalancer()

LoadBalancer * oofem::NonLinearStatic::giveLoadBalancer ( )
overridevirtual

Returns reference to receiver's load balancer.

Todo
Make the name possibly optional (but currently, there is just one choice, "parmetis")

Reimplemented from oofem::EngngModel.

Definition at line 922 of file nlinearstatic.C.

References oofem::classFactory, oofem::EngngModel::giveDomain(), oofem::EngngModel::lb, and oofem::EngngModel::loadBalancingFlag.

Referenced by updateDomainLinks().

◆ giveLoadBalancerMonitor()

LoadBalancerMonitor * oofem::NonLinearStatic::giveLoadBalancerMonitor ( )
overridevirtual

Returns reference to receiver's load balancer monitor.

Reimplemented from oofem::EngngModel.

Definition at line 939 of file nlinearstatic.C.

References oofem::classFactory, oofem::EngngModel::lbm, and oofem::EngngModel::loadBalancingFlag.

◆ giveLoadLevel()

double oofem::NonLinearStatic::giveLoadLevel ( )
inlineoverridevirtual

Returns the current load level.

Reimplemented from oofem::EngngModel.

Definition at line 162 of file nlinearstatic.h.

References cumulatedLoadLevel, and loadLevel.

◆ giveNextStep()

TimeStep * oofem::NonLinearStatic::giveNextStep ( )
overridevirtual

Returns next time step (next to current step) of receiver.

Reimplemented from oofem::LinearStatic.

Definition at line 295 of file nlinearstatic.C.

References oofem::EngngModel::currentStep, giveDeltaT(), oofem::EngngModel::giveNumberOfFirstStep(), giveSolutionStepWhenIcApply(), and oofem::EngngModel::previousStep.

◆ giveNumericalMethod()

NumericalMethod * oofem::NonLinearStatic::giveNumericalMethod ( MetaStep * mStep)
overridevirtual

Returns reference to receiver's numerical method.

Todo
If there is ever a major version change, remove this (for backward compatibility)

Reimplemented from oofem::LinearStatic.

Definition at line 98 of file nlinearstatic.C.

References _IFT_NonLinearStatic_controlmode, oofem::MetaStep::giveAttributesRecord(), oofem::EngngModel::giveDomain(), IR_GIVE_OPTIONAL_FIELD, oofem::nls_directControl, oofem::nls_indirectControl, nMethod, and OOFEM_ERROR.

Referenced by proceedStep(), and updateDomainLinks().

◆ giveSolutionStepWhenIcApply()

TimeStep * oofem::NonLinearStatic::giveSolutionStepWhenIcApply ( bool force = false)
overridevirtual

Returns the solution step when Initial Conditions (IC) apply.

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

Reimplemented from oofem::EngngModel.

Definition at line 279 of file nlinearstatic.C.

References deltaT, oofem::EngngModel::giveNumberOfTimeStepWhenIcApply(), oofem::EngngModel::master, and oofem::EngngModel::stepWhenIcApply.

Referenced by giveNextStep().

◆ giveUnknownComponent()

double oofem::NonLinearStatic::giveUnknownComponent ( ValueModeType ,
TimeStep * ,
Domain * ,
Dof *  )
overridevirtual

Returns requested unknown. Unknown at give time step is characterized by its type and mode and by its equation number. This function is used by Dofs, when they are requested for their associated unknowns.

See also
Dof::giveUnknown

Reimplemented from oofem::LinearStatic.

Definition at line 223 of file nlinearstatic.C.

References oofem::Dof::__giveEquationNumber(), oofem::EngngModel::giveCurrentStep(), oofem::TimeStep::giveTimeIncrement(), incrementalLoadVector, incrementOfDisplacement, initialLoadVector, internalForces, loadLevel, OOFEM_ERROR, and totalDisplacement.

◆ giveUnknownDictHashIndx()

int oofem::NonLinearStatic::giveUnknownDictHashIndx ( ValueModeType mode,
TimeStep * tStep )
inlineoverridevirtual

For load balancing purposes we store all values so hash is computed from mode value only.

Reimplemented from oofem::EngngModel.

Definition at line 174 of file nlinearstatic.h.

◆ initializeFrom()

void oofem::NonLinearStatic::initializeFrom ( InputRecord & ir)
overridevirtual

Initializes receiver according to object description in input reader. InitString can be imagined as data record in component database belonging to receiver. Receiver may use value-name extracting functions to extract particular field from record.

Reimplemented from oofem::LinearStatic.

Definition at line 194 of file nlinearstatic.C.

References _IFT_NonLinearStatic_nonlocalext, _IFT_NonLinearStatic_nonlocstiff, _IFT_NonLinearStatic_updateElasticStiffnessFlag, oofem::CBT_static, oofem::EngngModel::commBuff, oofem::EngngModel::communicator, oofem::EngngModel::giveNumberOfProcesses(), oofem::EngngModel::giveRank(), oofem::InputRecord::hasField(), IR_GIVE_OPTIONAL_FIELD, oofem::EngngModel::isParallel(), oofem::EngngModel::nonlocalExt, nonlocalStiffnessFlag, oofem::EngngModel::nonlocCommunicator, and updateElasticStiffnessFlag.

◆ packMigratingData()

void oofem::NonLinearStatic::packMigratingData ( TimeStep * tStep)
overrideprotectedvirtual

Packs receiver data when rebalancing load. When rebalancing happens, the local numbering will be lost on majority of processors. Instead of identifying values of solution vectors that have to be send/received and then performing renumbering, all solution vectors are assumed to be stored in dof dictionaries before data migration. Then dofs will take care themselves for packing and unpacking. After data migration and local renumbering, the solution vectors will be restored from dof dictionary data back.

Reimplemented from oofem::EngngModel.

Definition at line 955 of file nlinearstatic.C.

References oofem::Domain::giveDofManager(), oofem::EngngModel::giveDomain(), oofem::Domain::giveNumberOfDofManagers(), incrementalLoadVector, incrementalLoadVectorOfPrescribed, initialLoadVector, initialLoadVectorOfPrescribed, and totalDisplacement.

◆ printOutputAt()

void oofem::NonLinearStatic::printOutputAt ( FILE * file,
TimeStep * tStep )
overridevirtual

Prints output of receiver to output domain stream, for given time step. Corresponding function for element gauss points is invoked (gaussPoint::printOutputAt).

Reimplemented from oofem::EngngModel.

Definition at line 674 of file nlinearstatic.C.

References cumulatedLoadLevel, currentIterations, oofem::EngngModel::giveDomain(), oofem::TimeStep::giveNumber(), oofem::TimeStep::giveTargetTime(), loadLevel, nMethod, and oofem::StructuralEngngModel::printReactionForces().

Referenced by oofem::AdaptiveNonLinearStatic::adaptiveRemap(), and oofem::AdaptiveNonLinearStatic::initializeAdaptiveFrom().

◆ proceedStep()

◆ restoreContext()

void oofem::NonLinearStatic::restoreContext ( DataStream & stream,
ContextMode mode )
overridevirtual

Restores the state of model from output stream. Restores not only the receiver state, but also same function is invoked for all DofManagers and Elements in associated domain. Note that by restoring element context also contexts of all associated integration points (and material statuses) are restored. Each context is associated with unique time step. Only one context per time step is allowed. Restore context function will restore such context, which is related (through its step number) to time step number and version given in obj parameter. Restoring context will change current time step in order to correspond to newly restored context.

Parameters
streamContext file.
modeDetermines amount of info in stream.
Exceptions
ContextIOERRexception if error encountered.

Reimplemented from oofem::LinearStatic.

Definition at line 731 of file nlinearstatic.C.

References oofem::CIO_IOERR, oofem::CIO_OK, controlMode, cumulatedLoadLevel, incrementOfDisplacement, initialLoadVector, initialLoadVectorOfPrescribed, loadLevel, oofem::DataStream::read(), THROW_CIOERR, and totalDisplacement.

◆ saveContext()

void oofem::NonLinearStatic::saveContext ( DataStream & stream,
ContextMode mode )
overridevirtual

Stores the state of model to output stream. Stores not only the receiver state, but also same function is invoked for all DofManagers and Elements in associated domain. Note that by storing element context also contexts of all associated integration points (and material statuses) are stored.

Parameters
streamContext stream.
modeDetermines amount of info in stream.
Exceptions
ContextIOERRIf error encountered.

Reimplemented from oofem::LinearStatic.

Definition at line 693 of file nlinearstatic.C.

References oofem::CIO_IOERR, oofem::CIO_OK, controlMode, cumulatedLoadLevel, incrementOfDisplacement, initialLoadVector, initialLoadVectorOfPrescribed, loadLevel, THROW_CIOERR, totalDisplacement, and oofem::DataStream::write().

◆ showSparseMtrxStructure()

void oofem::NonLinearStatic::showSparseMtrxStructure ( int type,
oofegGraphicContext & gc,
TimeStep * tStep )
overridevirtual

Shows the sparse structure of required matrix, type == 1 stiffness.

Reimplemented from oofem::EngngModel.

Definition at line 818 of file nlinearstatic.C.

References gc, oofem::EngngModel::giveDomain(), oofem::Domain::giveElements(), oofem::nls_secantStiffness, oofem::nls_tangentStiffness, and stiffMode.

◆ solveYourself()

void oofem::NonLinearStatic::solveYourself ( )
overridevirtual

Starts solution process. Implementation should invoke for each time step solveYourselfAt function with time step as parameter. Time steps are created using giveNextStep function (this will set current time step to newly created, and updates previous step).

Reimplemented from oofem::LinearStatic.

Definition at line 361 of file nlinearstatic.C.

References oofem::EngngModel::giveNumberOfDomainEquations(), oofem::EngngModel::giveRank(), oofem::EngngModel::initializeCommMaps(), oofem::EngngModel::isParallel(), and OOFEM_LOG_INFO.

◆ solveYourselfAt()

void oofem::NonLinearStatic::solveYourselfAt ( TimeStep * tStep)
overridevirtual

Solves problem for given time step. Should assemble characteristic matrices and vectors if necessary and solve problem using appropriate numerical method. After finishing solution, this->updateYourself function for updating solution state and then this->terminate function (for updating nodal and element values) should be called.

Reimplemented from oofem::LinearStatic.

Definition at line 380 of file nlinearstatic.C.

References proceedStep().

◆ terminate()

void oofem::NonLinearStatic::terminate ( TimeStep * tStep)
overridevirtual

Terminates the solution of time step. Default implementation calls prinOutput() service and if specified, context of whole domain is stored and output for given time step is printed.

Reimplemented from oofem::EngngModel.

Definition at line 387 of file nlinearstatic.C.

References CM_Definition, CM_State, oofem::EngngModel::doStepOutput(), oofem::EngngModel::saveStepContext(), and updateLoadVectors().

Referenced by oofem::AdaptiveNonLinearStatic::adaptiveRemap(), oofem::AdaptiveNonLinearStatic::initializeAdaptiveFrom(), and oofem::AdaptiveNonLinearStatic::solveYourselfAt().

◆ unpackMigratingData()

void oofem::NonLinearStatic::unpackMigratingData ( TimeStep * tStep)
overrideprotectedvirtual

Unpacks receiver data when rebalancing load. When rebalancing happens, the local numbering will be lost on majority of processors. Instead of identifying values of solution vectors that have to be send/received and then performing renumbering, all solution vectors are assumed to be stored in dof dictionaries before data migration. Then dofs will take care themselves for packing and unpacking. After data migration and local renumbering, the solution vectors will be restored from dof dictionary data back.

Reimplemented from oofem::EngngModel.

Definition at line 994 of file nlinearstatic.C.

References oofem::DofManager_shared, oofem::Domain::giveDofManager(), oofem::EngngModel::giveDomain(), oofem::EngngModel::giveDomainErrorEstimator(), oofem::Domain::giveNumberOfDofManagers(), oofem::EngngModel::giveNumberOfDomainEquations(), oofem::DofManager::giveParallelMode(), incrementalLoadVector, incrementalLoadVectorOfPrescribed, incrementOfDisplacement, oofem::LinearStatic::initFlag, oofem::EngngModel::initializeCommMaps(), initialLoadVector, initialLoadVectorOfPrescribed, nMethod, and totalDisplacement.

◆ updateAttributes()

void oofem::NonLinearStatic::updateAttributes ( MetaStep * mStep)
overridevirtual

Update receiver attributes according to step metaStep attributes. Allows the certain parameters or attributes to be updated for particular metastep. The metastep provides the attributes record, from which the corresponding attributes can be read. The service takes a MetaStep parameter. It is recommended, to implement this service in such way, that multiple calls for steps belonging to same MetaStep does not change response. The default implementation updates the numerical method attributes.

Parameters
mStepMeta step.
Todo
If there is ever a major version change, remove this (for backward compatibility)

Reimplemented from oofem::EngngModel.

Definition at line 138 of file nlinearstatic.C.

References _IFT_EngngModel_initialGuess, _IFT_NonLinearStatic_controlmode, _IFT_NonLinearStatic_deltat, _IFT_NonLinearStatic_deltatfunction, _IFT_NonLinearStatic_donotfixload, _IFT_NonLinearStatic_keepll, _IFT_NonLinearStatic_refloadmode, _IFT_NonLinearStatic_stiffmode, controlMode, deltaT, dtFunction, oofem::MetaStep::giveAttributesRecord(), oofem::EngngModel::giveMetaStep(), oofem::MetaStep::giveNumber(), oofem::EngngModel::IG_None, initialGuessType, IR_GIVE_OPTIONAL_FIELD, mstepCumulateLoadLevelFlag, oofem::nls_indirectControl, oofem::nls_tangentStiffness, OOFEM_ERROR, refLoadInputMode, and stiffMode.

Referenced by oofem::AdaptiveNonLinearStatic::adaptiveRemap(), and oofem::AdaptiveNonLinearStatic::initializeAdaptiveFrom().

◆ updateComponent()

◆ updateDomainLinks()

void oofem::NonLinearStatic::updateDomainLinks ( )
overridevirtual

Updates domain links after the domains of receiver have changed. Used mainly after restoring context - the domains may change and this service is then used to update domain variables in all components belonging to receiver like error estimators, solvers, etc, having domains as attributes.

Reimplemented from oofem::LinearStatic.

Definition at line 774 of file nlinearstatic.C.

References oofem::EngngModel::giveCurrentMetaStep(), oofem::EngngModel::giveDomain(), giveLoadBalancer(), and giveNumericalMethod().

◆ updateLoadVectors()

◆ updateMatrix()

void oofem::NonLinearStatic::updateMatrix ( SparseMtrx & mat,
TimeStep * tStep,
Domain * d )
overridevirtual

Updates the solution (guess) according to the new values. Callback for nonlinear solvers (e.g. Newton-Raphson).

Note
For performance, the matrix should keep it's non-zero structure between calls, so the caller should make sure not to clear the matrix object before called.
Parameters
solutionVectorNew solution.
tStepTime when component is updated.
dDomain.

Reimplemented from oofem::EngngModel.

Definition at line 576 of file nlinearstatic.C.

References oofem::assemble(), oofem::EngngModel::giveMetaStep(), oofem::TimeStep::giveMetaStepNumber(), oofem::TimeStep::giveNumber(), oofem::LinearStatic::initFlag, oofem::nls_elasticStiffness, oofem::nls_secantInitialStiffness, oofem::nls_secantStiffness, oofem::nls_tangentStiffness, OOFEM_LOG_DEBUG, stiffMode, updateElasticStiffnessFlag, and oofem::SparseMtrx::zero().

Referenced by proceedStep().

◆ updateSolution()

void oofem::NonLinearStatic::updateSolution ( FloatArray & solutionVector,
TimeStep * tStep,
Domain * d )
overridevirtual

Updates the solution (guess) according to the new values. Callback for nonlinear solvers (e.g. Newton-Raphson), and are called before new internal forces are computed.

Parameters
solutionVectorNew solution.
tStepTime when component is updated.
dDomain.

Reimplemented from oofem::EngngModel.

Definition at line 569 of file nlinearstatic.C.

◆ useNonlocalStiffnessOption()

int oofem::NonLinearStatic::useNonlocalStiffnessOption ( )
inlineoverridevirtual

Returns nonzero if nonlocal stiffness option activated.

Reimplemented from oofem::EngngModel.

Definition at line 172 of file nlinearstatic.h.

Member Data Documentation

◆ controlMode

NonLinearStatic_controlType oofem::NonLinearStatic::controlMode
protected

Characterizes the type of control used.

Definition at line 120 of file nlinearstatic.h.

Referenced by NonLinearStatic(), proceedStep(), restoreContext(), saveContext(), updateAttributes(), and updateLoadVectors().

◆ cumulatedLoadLevel

double oofem::NonLinearStatic::cumulatedLoadLevel
protected

◆ currentIterations

◆ currentStepLength

double oofem::NonLinearStatic::currentStepLength
protected

Definition at line 93 of file nlinearstatic.h.

Referenced by NonLinearStatic(), and proceedStep().

◆ deltaT

double oofem::NonLinearStatic::deltaT
protected

◆ dtFunction

int oofem::NonLinearStatic::dtFunction
protected

Associated time function for time step increment.

Definition at line 124 of file nlinearstatic.h.

Referenced by giveDtFunction(), NonLinearStatic(), and updateAttributes().

◆ incrementalLoadVector

FloatArray oofem::NonLinearStatic::incrementalLoadVector
protected

Incremental load vector which is applied in loading step (as a whole for direct control or proportionally for indirect control).

Definition at line 103 of file nlinearstatic.h.

Referenced by oofem::AdaptiveNonLinearStatic::adaptiveRemap(), giveUnknownComponent(), oofem::AdaptiveNonLinearStatic::initializeAdaptiveFrom(), NonLinearStatic(), packMigratingData(), proceedStep(), unpackMigratingData(), updateComponent(), and updateLoadVectors().

◆ incrementalLoadVectorOfPrescribed

◆ incrementOfDisplacement

◆ initialGuessType

InitialGuess oofem::NonLinearStatic::initialGuessType
protected

The initial guess type to use before starting the nonlinear solver.

Definition at line 138 of file nlinearstatic.h.

Referenced by NonLinearStatic(), proceedStep(), and updateAttributes().

◆ initialLoadVector

◆ initialLoadVectorOfPrescribed

FloatArray oofem::NonLinearStatic::initialLoadVectorOfPrescribed
protected

◆ internalForces

◆ loadInitFlag

int oofem::NonLinearStatic::loadInitFlag
protected

Definition at line 113 of file nlinearstatic.h.

Referenced by NonLinearStatic(), proceedStep(), and updateLoadVectors().

◆ loadLevel

◆ mstepCumulateLoadLevelFlag

bool oofem::NonLinearStatic::mstepCumulateLoadLevelFlag
protected

Definition at line 110 of file nlinearstatic.h.

Referenced by NonLinearStatic(), proceedStep(), updateAttributes(), and updateLoadVectors().

◆ nMethod

◆ nonlocalStiffnessFlag

int oofem::NonLinearStatic::nonlocalStiffnessFlag
protected

◆ numMetStatus

◆ prevStepLength

double oofem::NonLinearStatic::prevStepLength
protected

Definition at line 93 of file nlinearstatic.h.

Referenced by NonLinearStatic(), and proceedStep().

◆ refLoadInputMode

SparseNonLinearSystemNM::referenceLoadInputModeType oofem::NonLinearStatic::refLoadInputMode
protected

The following parameter allows to specify how the reference load vector is obtained from given totalLoadVector and initialLoadVector. The initialLoadVector desribes the part of loading which does not scale. If refLoadInputMode is rlm_total (default) then the reference incremental load vector is defined as totalLoadVector assembled at given time. If refLoadInputMode is rlm_inceremental then the reference load vector is obtained as incremental load vector at given time.

Definition at line 135 of file nlinearstatic.h.

Referenced by oofem::AdaptiveNonLinearStatic::adaptiveRemap(), oofem::AdaptiveNonLinearStatic::initializeAdaptiveFrom(), NonLinearStatic(), proceedStep(), updateAttributes(), and updateComponent().

◆ stiffMode

◆ totalDisplacement

◆ updateElasticStiffnessFlag

bool oofem::NonLinearStatic::updateElasticStiffnessFlag
protected

Definition at line 115 of file nlinearstatic.h.

Referenced by initializeFrom(), updateComponent(), and updateMatrix().


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