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

#include <staticstructural.h>

Inheritance diagram for oofem::StaticStructural:
Collaboration diagram for oofem::StaticStructural:

Public Member Functions

 StaticStructural (int i, EngngModel *master=nullptr)
virtual ~StaticStructural ()
void initializeFrom (InputRecord &ir) override
void updateAttributes (MetaStep *mStep) override
void solveYourself () override
void solveYourselfAt (TimeStep *tStep) override
void terminate (TimeStep *tStep) override
void updateComponent (TimeStep *tStep, NumericalCmpn cmpn, Domain *d) override
void updateSolution (FloatArray &solutionVector, TimeStep *tStep, Domain *d) override
void updateInternalRHS (FloatArray &answer, TimeStep *tStep, Domain *d, FloatArray *eNorm) override
void updateMatrix (SparseMtrx &mat, TimeStep *tStep, Domain *d) override
double giveUnknownComponent (ValueModeType type, TimeStep *tStep, Domain *d, Dof *dof) override
bool newDofHandling () override
void updateDomainLinks () override
int forceEquationNumbering () override
double giveLoadLevel () override
 Returns the current load level.
double giveEndOfTimeOfInterest () override
 Returns end of time interest (time corresponding to end of time integration).
NumericalMethodgiveNumericalMethod (MetaStep *mStep) override
 Returns reference to receiver's numerical method.
bool requiresEquationRenumbering (TimeStep *tStep) override
int requiresUnknownsDictionaryUpdate () override
int giveUnknownDictHashIndx (ValueModeType mode, TimeStep *tStep) override
void computeExternalLoadReactionContribution (FloatArray &reactions, TimeStep *tStep, int di) override
const char * giveInputRecordName () const
const char * giveClassName () const override
 Returns class name of the receiver.
void saveContext (DataStream &stream, ContextMode mode) override
void restoreContext (DataStream &stream, ContextMode mode) override
int estimateMaxPackSize (IntArray &commMap, DataStream &buff, int packUnpackType) override
void restartYourself (TimeStep *tS) override
virtual TimeStepgiveCurrentStep (bool force=false) override
virtual TimeStepgivePreviousStep (bool force=false) override
void adaptTimeStep (double nIter) override
FieldPtr giveField (FieldType key, TimeStep *) override
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 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 (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)
virtual int giveCurrentNumberOfIterations ()
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 TimeStepgiveNextStep ()
 Returns next time step (next to current step) of receiver.
virtual void preInitializeNextStep ()
 Does a pre-initialization of the next time step (implement if necessarry).
virtual TimeStepgiveSolutionStepWhenIcApply (bool force=false)
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)
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 giveInitialTime ()
 return time at the begining of analysis
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 void updateDofUnknownsDictionary (DofManager *, TimeStep *)
virtual ParallelContextgiveParallelContext (int n)
virtual void initParallelContexts ()
virtual void assemble (SparseMtrx &answer, TimeStep *tStep, const MatrixAssembler &ma, const UnknownNumberingScheme &s, Domain *domain)
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)
virtual int useNonlocalStiffnessOption ()
 Returns nonzero if nonlocal stiffness option activated.
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.
virtual fMode giveFormulation ()
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)
virtual LoadBalancergiveLoadBalancer ()
virtual LoadBalancerMonitorgiveLoadBalancerMonitor ()
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).
Public Member Functions inherited from oofem::XfemSolverInterface
 XfemSolverInterface ()
virtual ~XfemSolverInterface ()
void propagateXfemInterfaces (TimeStep *tStep, StructuralEngngModel &ioEngngModel, bool iRecomputeStepAfterCrackProp)

Public Attributes

std ::unique_ptr< SparseMtrxstiffnessMatrix

Protected Attributes

FloatArray solution
FloatArray solution_old
FloatArray internalForces
FloatArray eNorm
FloatArray referenceForces
FloatArray externalForces
std ::unique_ptr< DofDistributedPrimaryField > field
SparseMtrxType sparseMtrxType
std ::unique_ptr< SparseNonLinearSystemNMnMethod
std::string solverType
MatResponseMode stiffMode
double loadLevel
double deltaT
FloatArray prescribedTimes
InitialGuess initialGuessType
bool mRecomputeStepAfterPropagation
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
Protected Attributes inherited from oofem::XfemSolverInterface
bool mNeedsVariableMapping

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...
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
virtual void packMigratingData (TimeStep *tStep)
virtual void unpackMigratingData (TimeStep *tStep)

Detailed Description

Solves a static structural problem.

Author
Mikael Öhman

Definition at line 60 of file staticstructural.h.

Constructor & Destructor Documentation

◆ StaticStructural()

◆ ~StaticStructural()

oofem::StaticStructural::~StaticStructural ( )
virtual

Definition at line 82 of file staticstructural.C.

Member Function Documentation

◆ adaptTimeStep()

void oofem::StaticStructural::adaptTimeStep ( double nIter)
inlineoverridevirtual

Adapt time step according to the number of iterations in the previous step

Reimplemented from oofem::EngngModel.

Definition at line 157 of file staticstructural.h.

References oofem::EngngModel::timeStepController.

◆ computeExternalLoadReactionContribution()

void oofem::StaticStructural::computeExternalLoadReactionContribution ( FloatArray & reactions,
TimeStep * tStep,
int di )
overridevirtual

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 445 of file staticstructural.C.

References oofem::EngngModel::assembleVector(), giveCurrentStep(), oofem::EngngModel::giveDomain(), oofem::EngngModel::giveNumberOfDomainEquations(), loadLevel, OOFEM_ERROR, oofem::FloatArray::resize(), oofem::FloatArray::times(), and oofem::FloatArray::zero().

◆ estimateMaxPackSize()

int oofem::StaticStructural::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

Reimplemented from oofem::EngngModel.

Definition at line 515 of file staticstructural.C.

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

◆ forceEquationNumbering()

int oofem::StaticStructural::forceEquationNumbering ( )
overridevirtual

Forces equation renumbering on all domains associated to engng model. All equation numbers in all domains for all dofManagers are invalidated, and new equation numbers are generated starting from 1 on each domain. It will update numberOfEquations variable accordingly. Should be used at startup to force equation numbering and therefore sets numberOfEquations. Must be used if model supports changes of static system to assign new valid equation numbers to dofManagers.

Reimplemented from oofem::EngngModel.

Definition at line 485 of file staticstructural.C.

References oofem::EngngModel::forceEquationNumbering(), and stiffnessMatrix.

◆ giveClassName()

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

Returns class name of the receiver.

Implements oofem::EngngModel.

Definition at line 125 of file staticstructural.h.

◆ giveCurrentStep()

virtual TimeStep * oofem::StaticStructural::giveCurrentStep ( bool force = false)
inlineoverridevirtual

Returns current time step.

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

Reimplemented from oofem::EngngModel.

Definition at line 135 of file staticstructural.h.

References oofem::EngngModel::master, and oofem::EngngModel::timeStepController.

Referenced by computeExternalLoadReactionContribution(), and giveField().

◆ giveEndOfTimeOfInterest()

double oofem::StaticStructural::giveEndOfTimeOfInterest ( )
overridevirtual

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

Reimplemented from oofem::EngngModel.

Definition at line 192 of file staticstructural.C.

References deltaT, oofem::EngngModel::giveNumberOfSteps(), and prescribedTimes.

◆ giveField()

FieldPtr oofem::StaticStructural::giveField ( FieldType key,
TimeStep *  )
overridevirtual

Returns the smart pointer to requested field, Null otherwise. The return value uses shared_ptr, as some registered fields may be owned (and maintained) by emodel, while some may be created on demand and thus reliable reference counting mechanism is essential.

Reimplemented from oofem::EngngModel.

Definition at line 550 of file staticstructural.C.

References field, giveCurrentStep(), and OOFEM_ERROR.

◆ giveInputRecordName()

const char * oofem::StaticStructural::giveInputRecordName ( ) const
inline

Definition at line 124 of file staticstructural.h.

References _IFT_StaticStructural_Name.

◆ giveLoadLevel()

double oofem::StaticStructural::giveLoadLevel ( )
inlineoverridevirtual

Returns the current load level.

Reimplemented from oofem::EngngModel.

Definition at line 112 of file staticstructural.h.

References loadLevel.

◆ giveNumericalMethod()

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

Returns reference to receiver's numerical method.

Reimplemented from oofem::EngngModel.

Definition at line 87 of file staticstructural.C.

References oofem::classFactory, nMethod, OOFEM_ERROR, and solverType.

Referenced by updateDomainLinks().

◆ givePreviousStep()

virtual TimeStep * oofem::StaticStructural::givePreviousStep ( bool force = false)
inlineoverridevirtual

Returns previous time step.

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

Reimplemented from oofem::EngngModel.

Definition at line 149 of file staticstructural.h.

References oofem::EngngModel::master, and oofem::EngngModel::timeStepController.

◆ giveUnknownComponent()

double oofem::StaticStructural::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::EngngModel.

Definition at line 381 of file staticstructural.C.

References oofem::Dof::__giveEquationNumber(), externalForces, field, internalForces, loadLevel, and referenceForces.

◆ giveUnknownDictHashIndx()

int oofem::StaticStructural::giveUnknownDictHashIndx ( ValueModeType mode,
TimeStep * tStep )
overridevirtual

This method is responsible for computing unique dictionary id (ie hash value) from given valueModeType and time step. This function is used by particular dofs to access unknown identified by given parameters from its dictionary using computed index. Usually the hash algorithm should produce index that depend on time step relatively to actual one to avoid storage of complete history.

Reimplemented from oofem::EngngModel.

Definition at line 99 of file staticstructural.C.

References oofem::TimeStep::giveNumber().

◆ initializeFrom()

◆ newDofHandling()

bool oofem::StaticStructural::newDofHandling ( )
inlineoverridevirtual

Temporary method for allowing code to seamlessly convert from the old to new way of handling DOF values. (the new way expects the field to store all values, regardless of if they are computed, from BC, or IC.) This is used by MasterDof

Todo
When all models have converted to using a field, this should be removed.

Reimplemented from oofem::EngngModel.

Definition at line 106 of file staticstructural.h.

◆ requiresEquationRenumbering()

bool oofem::StaticStructural::requiresEquationRenumbering ( TimeStep * tStep)
overridevirtual

Returns true if equation renumbering is required for given solution step. This may of course change the number of equation and in general there is no guarantee that for a certain dof the same equation will be assigned. So the use of DOF unknowns dictionaries is generally recommended.

Reimplemented from oofem::EngngModel.

Definition at line 493 of file staticstructural.C.

References oofem::Domain::giveBcs(), oofem::EngngModel::giveDomain(), oofem::GeneralBoundaryCondition::giveNumberOfInternalDofManagers(), oofem::TimeStep::givePreviousStep(), oofem::TimeStep::isTheFirstStep(), and oofem::ActiveBoundaryCondition::requiresActiveDofs().

◆ requiresUnknownsDictionaryUpdate()

int oofem::StaticStructural::requiresUnknownsDictionaryUpdate ( )
inlineoverridevirtual

Indicates if EngngModel requires Dofs dictionaries to be updated. If EngngModel does not support changes of static system, the dof forwards the requests for its unknowns to EngngModel, where unknowns are naturally kept. This is possible, because dof equation number is same during whole solution. But when changes of static system are allowed, several problem arise. For example by solving simple incremental static with allowed static changes, the incremental displacement vector of structure can not be added to total displacement vector of structure, because equation numbers may have changed, and one can not simply add these vector to obtain new total displacement vector, because incompatible displacement will be added. To solve this problem, unknown dictionary at dof level has been assumed. Dof then keeps its unknowns in its own private dictionary. After computing increment of solution, engngModel updates for each dof its unknowns in its dictionary (using updateUnknownsDictionary function). For aforementioned example engngModel updates incremental values but also total value by asking dof for previous total value (dof will use its dictionary, does not asks back EngngModel) adds corresponding increment and updates total value in dictionary.

Reimplemented from oofem::EngngModel.

Definition at line 120 of file staticstructural.h.

◆ restartYourself()

void oofem::StaticStructural::restartYourself ( TimeStep * tS)
overridevirtual

This method is called when the restart of the analysis is perfomed, e.g., du to the convergence problems, and does all the necesary steps for the restart. These steps are handled by the individual engineering models

Reimplemented from oofem::EngngModel.

Definition at line 374 of file staticstructural.C.

References field, solution, and solution_old.

◆ restoreContext()

void oofem::StaticStructural::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::EngngModel.

Definition at line 469 of file staticstructural.C.

References field.

◆ saveContext()

void oofem::StaticStructural::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::EngngModel.

Definition at line 462 of file staticstructural.C.

References field.

◆ solveYourself()

void oofem::StaticStructural::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).

Todo
Generalize this to engngmodel?

Reimplemented from oofem::EngngModel.

Definition at line 201 of file staticstructural.C.

References oofem::EngngModel::communicator, oofem::EngngModel::giveNumberOfDomainEquations(), oofem::EngngModel::giveRank(), oofem::EngngModel::isParallel(), oofem::EngngModel::nonlocalExt, oofem::EngngModel::nonlocCommunicator, and OOFEM_LOG_INFO.

◆ solveYourselfAt()

void oofem::StaticStructural::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.

Todo
Need to find a general way to support this before enabling it by default.

Reimplemented from oofem::EngngModel.

Definition at line 224 of file staticstructural.C.

References oofem::EngngModel::assembleExtrapolatedForces(), oofem::EngngModel::assembleVector(), oofem::EngngModel::assembleVectorFromElements(), oofem::classFactory, oofem::FloatArray::computeNorm(), oofem::TimeStep::convergedReason, oofem::CR_CONVERGED, eNorm, externalForces, field, oofem::EngngModel::giveDomain(), oofem::TimeStep::giveIntrinsicTime(), oofem::TimeStep::giveMetaStepNumber(), oofem::TimeStep::giveNumber(), oofem::EngngModel::giveNumberOfDomainEquations(), oofem::EngngModel::giveProblemScale(), oofem::TimeStep::giveTimeIncrement(), oofem::EngngModel::IG_None, oofem::EngngModel::IG_Tangent, oofem::EngngModel::initForNewIteration(), initialGuessType, internalForces, oofem::EngngModel::LoadExchangeTag, loadLevel, oofem::macroScale, oofem::FloatArray::negated(), nMethod, oofem::TimeStep::numberOfIterations, OOFEM_ERROR, OOFEM_LOG_INFO, OOFEM_LOG_RELEVANT, OOFEM_WARNING, oofem::FloatArray::printYourself(), referenceForces, solution, solution_old, oofem::SparseLinearSystemNM::solve(), sparseMtrxType, stiffnessMatrix, updateMatrix(), oofem::EngngModel::updateSharedDofManagers(), updateSolution(), and oofem::FloatArray::zero().

◆ terminate()

void oofem::StaticStructural::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 360 of file staticstructural.C.

References mRecomputeStepAfterPropagation, oofem::XfemSolverInterface::propagateXfemInterfaces(), and oofem::StructuralEngngModel::terminate().

◆ updateAttributes()

void oofem::StaticStructural::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.

Reimplemented from oofem::EngngModel.

Definition at line 159 of file staticstructural.C.

References _IFT_EngngModel_initialGuess, _IFT_EngngModel_smtype, _IFT_StaticStructural_recomputeaftercrackpropagation, _IFT_StaticStructural_solvertype, _IFT_StaticStructural_stiffmode, oofem::MetaStep::giveAttributesRecord(), oofem::EngngModel::giveMetaStep(), oofem::MetaStep::giveNumber(), oofem::EngngModel::IG_Tangent, initialGuessType, IR_GIVE_OPTIONAL_FIELD, mRecomputeStepAfterPropagation, nMethod, prescribedTimes, oofem::SMT_Skyline, solverType, sparseMtrxType, and stiffMode.

◆ updateComponent()

◆ updateDomainLinks()

void oofem::StaticStructural::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::EngngModel.

Definition at line 477 of file staticstructural.C.

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

◆ updateInternalRHS()

void oofem::StaticStructural::updateInternalRHS ( FloatArray & answer,
TimeStep * tStep,
Domain * d,
FloatArray * eNorm )
overridevirtual

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

Parameters
solutionVectorNew solution.
tStepTime when component is updated.
dDomain.
eNormOptional per-element norm (for normalization).

Reimplemented from oofem::EngngModel.

Definition at line 408 of file staticstructural.C.

References oofem::EngngModel::assembleVector(), eNorm, oofem::EngngModel::InternalForcesExchangeTag, oofem::EngngModel::updateSharedDofManagers(), and oofem::FloatArray::zero().

◆ updateMatrix()

void oofem::StaticStructural::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 416 of file staticstructural.C.

References oofem::assemble(), stiffMode, and oofem::SparseMtrx::zero().

Referenced by solveYourselfAt().

◆ updateSolution()

void oofem::StaticStructural::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 402 of file staticstructural.C.

References field.

Referenced by solveYourselfAt().

Member Data Documentation

◆ deltaT

double oofem::StaticStructural::deltaT
protected

Definition at line 82 of file staticstructural.h.

Referenced by giveEndOfTimeOfInterest(), initializeFrom(), and StaticStructural().

◆ eNorm

FloatArray oofem::StaticStructural::eNorm
protected

◆ externalForces

FloatArray oofem::StaticStructural::externalForces
protected

Definition at line 67 of file staticstructural.h.

Referenced by giveUnknownComponent(), and solveYourselfAt().

◆ field

std :: unique_ptr< DofDistributedPrimaryField > oofem::StaticStructural::field
protected

◆ initialGuessType

InitialGuess oofem::StaticStructural::initialGuessType
protected

Definition at line 85 of file staticstructural.h.

Referenced by initializeFrom(), solveYourselfAt(), and updateAttributes().

◆ internalForces

FloatArray oofem::StaticStructural::internalForces
protected

◆ loadLevel

double oofem::StaticStructural::loadLevel
protected

◆ mRecomputeStepAfterPropagation

bool oofem::StaticStructural::mRecomputeStepAfterPropagation
protected

Definition at line 87 of file staticstructural.h.

Referenced by initializeFrom(), StaticStructural(), terminate(), and updateAttributes().

◆ nMethod

std :: unique_ptr< SparseNonLinearSystemNM > oofem::StaticStructural::nMethod
protected

◆ prescribedTimes

FloatArray oofem::StaticStructural::prescribedTimes
protected

Definition at line 83 of file staticstructural.h.

Referenced by giveEndOfTimeOfInterest(), initializeFrom(), and updateAttributes().

◆ referenceForces

FloatArray oofem::StaticStructural::referenceForces
protected

Definition at line 67 of file staticstructural.h.

Referenced by giveUnknownComponent(), and solveYourselfAt().

◆ solution

FloatArray oofem::StaticStructural::solution
protected

Definition at line 63 of file staticstructural.h.

Referenced by restartYourself(), solveYourselfAt(), and updateComponent().

◆ solution_old

FloatArray oofem::StaticStructural::solution_old
protected

Definition at line 64 of file staticstructural.h.

Referenced by restartYourself(), and solveYourselfAt().

◆ solverType

std::string oofem::StaticStructural::solverType
protected

◆ sparseMtrxType

SparseMtrxType oofem::StaticStructural::sparseMtrxType
protected

◆ stiffMode

MatResponseMode oofem::StaticStructural::stiffMode
protected

◆ stiffnessMatrix

std :: unique_ptr< SparseMtrx > oofem::StaticStructural::stiffnessMatrix

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