35 #include "../sm/EngineeringModels/staticstructural.h" 36 #include "../sm/Elements/structuralelement.h" 37 #include "../sm/Elements/structuralelementevaluator.h" 57 #ifdef __PARALLEL_MODE 70 stiffMode(TangentStiffness),
129 int tmp = TangentStiffness;
139 #ifdef __PARALLEL_MODE 185 std :: string s =
"nrsolver";
187 if ( s.compare(this->solverType) ) {
192 int tmp = TangentStiffness;
239 #ifdef __PARALLEL_MODE 241 #ifdef __VERBOSE_PARALLEL 264 this->
field->advanceSolution(tStep);
265 this->
field->applyBoundaryCondition(tStep);
274 this->
field->applyBoundaryCondition(tStep);
337 this->
field->applyBoundaryCondition(tStep);
342 incrementOfSolution.
zero();
353 if ( this->
nMethod->referenceLoad() ) {
355 referenceForces.
resize(neq);
365 int currentIterations;
367 if ( this->
nMethod->referenceLoad() ) {
413 if ( mode == VM_Total ) {
415 }
else if ( mode == VM_Incremental ) {
422 return this->
field->giveUnknownValue(dof, mode, tStep);
432 this->
field->applyBoundaryCondition(tStep);
457 if ( ( iores = this->
field->saveContext(stream, mode) ) !=
CIO_OK ) {
473 if ( ( iores = this->
field->restoreContext(stream, mode) ) !=
CIO_OK ) {
510 for (
auto &gbc : d->
giveBcs() ) {
527 int count = 0, pcount = 0;
530 if ( packUnpackType == 0 ) {
531 for (
int map: commMap ) {
533 for (
Dof *dof: *dman ) {
534 if ( dof->isPrimaryDof() && dof->__giveEquationNumber() > 0 ) {
547 }
else if ( packUnpackType == 1 ) {
548 for (
int map: commMap ) {
virtual void updateAttributes(MetaStep *mStep)
Update receiver attributes according to step metaStep attributes.
The representation of EngngModel default unknown numbering.
Solves an approximated tangent problem from the last iteration. Useful for changing Dirichlet boundar...
virtual NM_Status solve(SparseMtrx &A, FloatArray &b, FloatArray &x)=0
Solves the given sparse linear system of equations .
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the state of model to output stream.
virtual void solveYourself()
Starts solution process.
#define NM_Success
Numerical method exited with success.
std::unique_ptr< TimeStep > currentStep
Current time step.
Implementation for assembling forces computed by multiplication with a matrix.
virtual int forceEquationNumbering()
Forces equation renumbering on all domains associated to engng model.
Implementation for assembling internal forces vectors in standard monolithic, nonlinear FE-problems...
virtual void updateAttributes(MetaStep *mStep)
Update receiver attributes according to step metaStep attributes.
virtual int giveNumberOfDomainEquations(int di, const UnknownNumberingScheme &num)
Returns number of equations for given domain in active (current time step) time step.
problemScale giveProblemScale()
Returns scale in multiscale simulation.
virtual bool requiresActiveDofs()
Checks to see if active boundary condition requires special DOFs.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
SparseMtrx * createSparseMtrx(SparseMtrxType type)
Creates new instance of sparse matrix corresponding to given keyword.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
MatResponseMode stiffMode
std::unique_ptr< TimeStep > previousStep
Previous time step.
virtual void terminate(TimeStep *tStep)
Terminates the solution of time step.
double & at(int i)
Coefficient access function.
MetaStep * giveMetaStep(int i)
Returns the i-th meta step.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
int nonlocalExt
Flag indicating if nonlocal extension active, which will cause data to be sent between shared element...
This base class is an abstraction for all numerical methods solving sparse linear system of equations...
void clear()
Clears receiver (zero size).
#define _IFT_StaticStructural_nonlocalExtension
This base class is an abstraction for numerical algorithm.
#define _IFT_StaticStructural_prescribedTimes
Implementation for assembling tangent matrices in standard monolithic FE-problems.
bool isParallel() const
Returns true if receiver in parallel mode.
Base class for dof managers.
int giveNumberOfProcesses() const
Returns the number of collaborating processes.
virtual void solveYourself()
Starts solution process.
StateCounterType internalVarUpdateStamp
Contains last time stamp of internal variable update.
virtual NumericalMethod * giveNumericalMethod(MetaStep *mStep)
Returns reference to receiver's numerical method.
virtual int estimateMaxPackSize(IntArray &commMap, DataStream &buff, int packUnpackType)
Determines the space necessary for send/receive buffer.
REGISTER_EngngModel(ProblemSequence)
#define _IFT_StaticStructural_stiffmode
unsigned long NM_Status
Mask defining NumMetod Status; which can be asked after finishing computation by Numerical Method...
Class implementing an array of integers.
MatResponseMode
Describes the character of characteristic material matrix.
virtual void setUpCommunicationMaps(EngngModel *emodel, bool excludeSelfCommFlag, bool forceReinit=false)=0
Service for setting up the communication patterns with other remote process.
virtual int giveNumberOfInternalDofManagers()
Gives the number of internal dof managers.
#define OOFEM_LOG_RELEVANT(...)
void assembleExtrapolatedForces(FloatArray &answer, TimeStep *tStep, CharType type, Domain *domain)
Assembles the extrapolated internal forces vector, useful for obtaining a good initial guess in nonli...
bool isTheFirstStep()
Check if receiver is first step.
Class representing field of primary variables, which are typically allocated on nodes.
virtual void assemble(SparseMtrx &answer, TimeStep *tStep, const MatrixAssembler &ma, const UnknownNumberingScheme &s, Domain *domain)
Assembles characteristic matrix of required type into given sparse matrix.
MetaStep * giveCurrentMetaStep()
Returns current meta step.
std::vector< std::unique_ptr< GeneralBoundaryCondition > > & giveBcs()
std::unique_ptr< SparseMtrx > stiffnessMatrix
Class implementing Dirichlet boundary condition on DOF (primary boundary condition).
ProblemCommunicator * nonlocCommunicator
NonLocal Communicator. Necessary when nonlocal constitutive models are used.
#define OOFEM_LOG_INFO(...)
int giveNumber()
Returns receiver's number.
Element * giveElement(int n)
Service for accessing particular domain fe element.
NumericalCmpn
Type representing numerical component.
StateCounterType giveSolutionStateCounter()
Returns current solution state counter.
#define _IFT_EngngModel_smtype
std::unique_ptr< SparseNonLinearSystemNM > nMethod
#define _IFT_StaticStructural_solvertype
int numberOfSteps
Total number of time steps.
int ndomains
Number of receiver domains.
int updateSharedDofManagers(FloatArray &answer, const UnknownNumberingScheme &s, int ExchangeTag)
Exchanges necessary remote DofManagers data.
SparseMtrxType
Enumerative type used to identify the sparse matrix type.
virtual void terminate(TimeStep *tStep)
Terminates the solution of time step.
The reference incremental load vector is defined as totalLoadVector assembled at given time...
Implementation for assembling external forces vectors in standard monolithic FE-problems.
virtual void updateDomainLinks()
Updates domain links after the domains of receiver have changed.
#define _IFT_EngngModel_initialGuess
int giveNumberOfSteps(bool force=false)
Returns total number of steps.
ProblemCommunicator * communicator
Communicator.
InitialGuess
Means to choose methods for finding a good initial guess.
SparseMtrxType sparseMtrxType
CommunicatorBuff * commBuff
Common Communicator buffer.
Abstract base class for all active boundary conditions.
virtual void updateComponent(TimeStep *tStep, NumericalCmpn cmpn, Domain *d)
Updates components mapped to numerical method if necessary during solution process.
#define _IFT_EngngModel_nsteps
TimeStep * givePreviousStep()
Returns pointer to previous solution step.
Implementation for assembling reference (external) forces vectors.
virtual ~StaticStructural()
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the state of model to output stream.
virtual int forceEquationNumbering()
Forces equation renumbering on all domains associated to engng model.
Initializes the variable VERBOSE, in order to get a few intermediate messages on screen: beginning an...
virtual double giveEndOfTimeOfInterest()
Returns end of time interest (time corresponding to end of time integration).
virtual bool requiresEquationRenumbering(TimeStep *tStep)
Returns true if equation renumbering is required for given solution step.
Class representing vector of real numbers.
int estimatePackSize(DataStream &buff)
Estimates the necessary pack size to hold all packed data of receiver.
virtual TimeStep * giveNextStep()
Returns next time step (next to current step) of receiver.
virtual double giveUnknownsDictionaryValue(TimeStep *tStep, ValueModeType mode)
Access dictionary value, if not present zero is returned.
IRResultType
Type defining the return values of InputRecord reading operations.
virtual int givePackSizeOfDouble(int count)=0
No special treatment for new iterations. Probably means ending up using for all free dofs...
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
int giveMetaStepNumber()
Returns receiver's meta step number.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode)
Restores the state of model from output stream.
int giveNumberOfTimeStepWhenIcApply()
Returns the time step number, when initial conditions should apply.
double computeNorm() const
Computes the norm (or length) of the vector.
virtual void printYourself() const
Print receiver on stdout.
bool mRecomputeStepAfterPropagation
void zero()
Zeroes all coefficients of receiver.
int giveRank() const
Returns domain rank in a group of collaborating processes (0..groupSize-1)
ClassFactory & classFactory
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
void propagateXfemInterfaces(TimeStep *tStep, StructuralEngngModel &ioEngngModel, bool iRecomputeStepAfterCrackProp)
virtual double giveUnknownComponent(ValueModeType type, TimeStep *tStep, Domain *d, Dof *dof)
Returns requested unknown.
This class implements extension of EngngModel for structural models.
StaticStructural(int i, EngngModel *_master=NULL)
The Communicator and corresponding buffers (represented by this class) are separated in order to allo...
void assembleVectorFromElements(FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
Assembles characteristic vector of required type from elements into given vector. ...
#define _IFT_StaticStructural_recomputeaftercrackpropagation
std::unique_ptr< PrimaryField > field
Abstract base class representing the "problem" under consideration.
virtual void setDomain(Domain *d)
virtual int giveUnknownDictHashIndx(ValueModeType mode, TimeStep *tStep)
This method is responsible for computing unique dictionary id (ie hash value) from given valueModeTyp...
#define _IFT_StaticStructural_deltat
int giveSize() const
Returns the size of receiver.
virtual void updateDomainLinks()
Updates domain links after the domains of receiver have changed.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode)
Restores the state of model from output stream.
the oofem namespace is to define a context or scope in which all oofem names are defined.
InitialGuess initialGuessType
Domain * giveDomain(int n)
Service for accessing particular problem domain.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
DofManager * giveDofManager(int n)
Service for accessing particular domain dof manager.
void negated()
Switches the sign of every coefficient of receiver.
FloatArray prescribedTimes
void assembleVector(FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
Assembles characteristic vector of required type from dofManagers, element, and active boundary condi...
Class representing solution step.
SparseNonLinearSystemNM * createNonLinearSolver(const char *name, Domain *domain, EngngModel *emodel)
Creates new instance of nonlinear solver corresponding to given keyword.
void add(const FloatArray &src)
Adds array src to receiver.
void setSolution(TimeStep *tStep, const FloatArray &vectorToStore)
FloatArray internalForces
void resize(int s)
Resizes receiver towards requested size.