60#ifdef __MPI_PARALLEL_MODE
82StaticStructural :: ~StaticStructural()
99StaticStructural :: giveUnknownDictHashIndx(ValueModeType mode,
TimeStep *tStep)
107 StructuralEngngModel :: initializeFrom(ir);
126 int tmp = TangentStiffness;
136#ifdef __MPI_PARALLEL_MODE
154 this->
field = std::make_unique<DofDistributedPrimaryField>(
this, 1, FT_Displacements, 0);
159StaticStructural :: updateAttributes(
MetaStep *mStep)
170 std :: string s =
"nrsolver";
172 if ( s.compare(this->solverType) ) {
177 int tmp = TangentStiffness;
187 EngngModel :: updateAttributes(mStep1);
192double StaticStructural :: giveEndOfTimeOfInterest()
201void StaticStructural :: solveYourself()
204#ifdef __MPI_PARALLEL_MODE
206 #ifdef __VERBOSE_PARALLEL
220 StructuralEngngModel :: solveYourself();
224void StaticStructural :: solveYourselfAt(
TimeStep *tStep)
229 this->
field->advanceSolution(tStep);
292 this->
solution.add(incrementOfSolution);
301 incrementOfSolution.
zero();
312 if ( this->
nMethod->referenceLoad() ) {
323 OOFEM_LOG_INFO(
"\nStaticStructural :: solveYourselfAt - Solving Metastep %d, Step %d, Starting Time %e, Time Increment %e, Final Time %e, (neq = %d)\n",tStep->
giveMetaStepNumber(), tStep->
giveNumber(), tStep->
giveIntrinsicTime() - tStep->
giveTimeIncrement(), tStep->
giveTimeIncrement(), tStep->
giveIntrinsicTime(), neq);
326 int currentIterations;
328 if ( this->
nMethod->referenceLoad() ) {
337 SparseNonLinearSystemNM :: rlm_total,
349 SparseNonLinearSystemNM :: rlm_total,
374void StaticStructural :: restartYourself(
TimeStep *tStep)
381double StaticStructural :: giveUnknownComponent(ValueModeType mode,
TimeStep *tStep,
Domain *d,
Dof *dof)
383 if (mode == VM_Residual) {
397 return this->
field->giveUnknownValue(dof, mode, tStep);
445StaticStructural :: computeExternalLoadReactionContribution(
FloatArray &reactions,
TimeStep *tStep,
int di)
456 OOFEM_ERROR(
"unable to respond due to invalid solution step or domain");
464 StructuralEngngModel :: saveContext(stream, mode);
465 this->
field->saveContext(stream);
471 StructuralEngngModel :: restoreContext(stream, mode);
472 this->
field->restoreContext(stream);
477StaticStructural :: updateDomainLinks()
479 EngngModel :: updateDomainLinks();
485StaticStructural :: forceEquationNumbering()
493StaticStructural :: requiresEquationRenumbering(
TimeStep *tStep)
500 for (
auto &gbc : d->
giveBcs() ) {
517 int count = 0, pcount = 0;
520 if ( packUnpackType == 0 ) {
521 for (
int map: commMap ) {
523 for (
auto &dof: *dman ) {
524 if ( dof->isPrimaryDof() && dof->__giveEquationNumber() > 0 ) {
537 }
else if ( packUnpackType == 1 ) {
538 for (
int map: commMap ) {
552 OOFEM_ERROR(
"Unable to return field representation for non-current time step");
554 if ( key == FT_Displacements ) {
#define REGISTER_EngngModel(class)
virtual bool requiresActiveDofs()
virtual int givePackSizeOfDouble(std::size_t count)=0
virtual int __giveEquationNumber() const =0
std ::vector< std ::unique_ptr< GeneralBoundaryCondition > > & giveBcs()
DofManager * giveDofManager(int n)
Element * giveElement(int n)
int estimatePackSize(DataStream &buff)
virtual int forceEquationNumbering()
problemScale giveProblemScale() const
Returns scale in multiscale simulation.
virtual int giveNumberOfDomainEquations(int di, const UnknownNumberingScheme &num)
int giveNumberOfProcesses() const
Returns the number of collaborating processes.
void assembleVectorFromElements(FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
int giveRank() const
Returns domain rank in a group of collaborating processes (0..groupSize-1).
ProblemCommunicator * communicator
Communicator.
@ IG_None
No special treatment for new iterations. Probably means ending up using for all free dofs.
@ IG_Tangent
Solves an approximated tangent problem from the last iteration. Useful for changing Dirichlet boundar...
virtual void initForNewIteration(Domain *d, TimeStep *tStep, int iterationNumber, const FloatArray &solution)
MetaStep * giveCurrentMetaStep()
Returns current meta step.
int ndomains
Number of receiver domains.
ProblemCommunicator * nonlocCommunicator
NonLocal Communicator. Necessary when nonlocal constitutive models are used.
int numberOfSteps
Total number of time steps.
Domain * giveDomain(int n)
int nonlocalExt
Flag indicating if nonlocal extension active, which will cause data to be sent between shared element...
int giveNumberOfSteps(bool force=false)
MetaStep * giveMetaStep(int i)
Returns the i-th meta step.
@ InternalForcesExchangeTag
CommunicatorBuff * commBuff
Common Communicator buffer.
EngngModel * master
Master e-model; if defined receiver is in maintained (slave) mode.
bool isParallel() const
Returns true if receiver in parallel mode.
int updateSharedDofManagers(FloatArray &answer, const UnknownNumberingScheme &s, int ExchangeTag)
void assembleExtrapolatedForces(FloatArray &answer, TimeStep *tStep, CharType type, Domain *domain)
void assembleVector(FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
double computeNorm() const
virtual void printYourself() const
void zero()
Zeroes all coefficients of receiver.
virtual int giveNumberOfInternalDofManagers()
Gives the number of internal dof managers.
virtual ConvergedReason solve(SparseMtrx &A, FloatArray &b, FloatArray &x)=0
virtual void zero()=0
Zeroes the receiver.
FloatArray prescribedTimes
void updateMatrix(SparseMtrx &mat, TimeStep *tStep, Domain *d) override
FloatArray externalForces
InitialGuess initialGuessType
NumericalMethod * giveNumericalMethod(MetaStep *mStep) override
Returns reference to receiver's numerical method.
FieldPtr giveField(FieldType key, TimeStep *) override
MatResponseMode stiffMode
std ::unique_ptr< SparseMtrx > stiffnessMatrix
FloatArray referenceForces
virtual TimeStep * giveCurrentStep(bool force=false) override
std ::unique_ptr< SparseNonLinearSystemNM > nMethod
bool mRecomputeStepAfterPropagation
std ::unique_ptr< DofDistributedPrimaryField > field
SparseMtrxType sparseMtrxType
void updateSolution(FloatArray &solutionVector, TimeStep *tStep, Domain *d) override
FloatArray internalForces
StateCounterType internalVarUpdateStamp
void terminate(TimeStep *tStep) override
StructuralEngngModel(int i, EngngModel *master=nullptr)
Creates new StructuralEngngModel with number i, associated to domain d.
int giveMetaStepNumber()
Returns receiver's meta step number.
ConvergedReason convergedReason
Status of solution step (Converged,.
double giveTimeIncrement()
Returns solution step associated time increment.
int numberOfIterations
Number of itarations needed to achieve convergence.
int giveNumber()
Returns receiver's number.
TimeStep * givePreviousStep()
Returns pointer to previous solution step.
double giveIntrinsicTime()
Returns intrinsic time, e.g. time in which constitutive model is evaluated.
StateCounterType giveSolutionStateCounter()
void propagateXfemInterfaces(TimeStep *tStep, StructuralEngngModel &ioEngngModel, bool iRecomputeStepAfterCrackProp)
#define _IFT_EngngModel_smtype
#define _IFT_EngngModel_initialGuess
#define OOFEM_WARNING(...)
#define OOFEM_LOG_INFO(...)
#define OOFEM_LOG_RELEVANT(...)
FieldType
Physical type of field.
FloatArrayF< N > assemble(const FloatArrayF< M > &x, int const (&c)[M])
Assemble components into zero matrix.
@ SMT_Skyline
Symmetric skyline.
ClassFactory & classFactory
std::shared_ptr< Field > FieldPtr
#define _IFT_StaticStructural_stiffmode
#define _IFT_StaticStructural_prescribedTimes
#define _IFT_StaticStructural_nonlocalExtension
#define _IFT_StaticStructural_recomputeaftercrackpropagation
#define _IFT_StaticStructural_deltat
#define _IFT_StaticStructural_solvertype