OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
staticstructural.C
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 #include "../sm/EngineeringModels/staticstructural.h"
36 #include "../sm/Elements/structuralelement.h"
37 #include "../sm/Elements/structuralelementevaluator.h"
38 #include "dofmanager.h"
39 #include "set.h"
40 #include "timestep.h"
41 #include "sparsemtrx.h"
42 #include "nummet.h"
43 #include "nrsolver.h"
44 #include "staggeredsolver.h"
46 #include "primaryfield.h"
48 #include "verbose.h"
49 #include "error.h"
51 #include "boundarycondition.h"
52 #include "activebc.h"
53 #include "datastream.h"
54 #include "contextioerr.h"
55 #include "classfactory.h"
56 
57 #ifdef __PARALLEL_MODE
58  #include "problemcomm.h"
59  #include "communicator.h"
60 #endif
61 
62 namespace oofem {
63 REGISTER_EngngModel(StaticStructural);
64 
66  internalForces(),
67  eNorm(),
68  sparseMtrxType(SMT_Skyline),
69  solverType(),
70  stiffMode(TangentStiffness),
71  loadLevel(0.),
72  deltaT(1.)
73 {
74  ndomains = 1;
76 }
77 
78 
80 {
81 }
82 
83 
85 {
86  if ( !nMethod ) {
87  nMethod.reset( classFactory.createNonLinearSolver(this->solverType.c_str(), this->giveDomain(1), this) );
88  if ( !nMethod ) {
89  OOFEM_ERROR("Failed to create solver (%s).", this->solverType.c_str());
90  }
91  }
92  return nMethod.get();
93 }
94 
95 int
97 {
98  return tStep->giveNumber() % 2;
99 }
100 
103 {
104  IRResultType result; // Required by IR_GIVE_FIELD macro
105 
107  if ( result != IRRT_OK ) {
108  return result;
109  }
110 
111  int val = SMT_Skyline;
113  sparseMtrxType = ( SparseMtrxType ) val;
114 
117  if ( prescribedTimes.giveSize() > 0 ) {
119  } else {
120  this->deltaT = 1.0;
123  }
124 
125  this->solverType = "nrsolver";
127  nMethod.reset(NULL);
128 
129  int tmp = TangentStiffness; // Default TangentStiffness
131  this->stiffMode = (MatResponseMode)tmp;
132 
133  int _val = IG_Tangent;
135  this->initialGuessType = ( InitialGuess ) _val;
136 
138 
139 #ifdef __PARALLEL_MODE
140  if ( isParallel() ) {
142  delete communicator;
143  delete commBuff;
145  communicator = new NodeCommunicator(this, commBuff, this->giveRank(),
146  this->giveNumberOfProcesses());
147 
149  nonlocalExt = 1;
151  this->giveNumberOfProcesses());
152  }
153  }
154 
155 #endif
156 
157  this->field.reset( new DofDistributedPrimaryField(this, 1, FT_Displacements, 0) );
158 
159  return IRRT_OK;
160 }
161 
162 
163 void
165 {
166  IRResultType result; // Required by IR_GIVE_FIELD macro
167 
168  MetaStep *mStep1 = this->giveMetaStep( mStep->giveNumber() ); //this line ensures correct input file in staggered problem
169  InputRecord *ir = mStep1->giveAttributesRecord();
170 
171  int val = SMT_Skyline;
173  sparseMtrxType = ( SparseMtrxType ) val;
174 
177  if ( prescribedTimes.giveSize() > 0 ) {
179  } else {
180  this->deltaT = 1.0;
183  }
184 
185  std :: string s = "nrsolver";
187  if ( s.compare(this->solverType) ) {
188  this->solverType = s;
189  nMethod.reset(NULL);
190  }
191 
192  int tmp = TangentStiffness; // Default TangentStiffness
194  this->stiffMode = (MatResponseMode)tmp;
195 
196  int _val = IG_Tangent;
198  this->initialGuessType = ( InitialGuess ) _val;
199 
201 
203 }
204 
205 
207 {
208  if ( !currentStep ) {
209  // first step -> generate initial step
210  //currentStep.reset( new TimeStep(*giveSolutionStepWhenIcApply()) );
211  currentStep.reset( new TimeStep(giveNumberOfTimeStepWhenIcApply(), this, 1, 0., this->deltaT, 0) );
212  }
213  previousStep = std :: move(currentStep);
214  double dt;
215  if ( this->prescribedTimes.giveSize() > 0 ) {
216  dt = this->prescribedTimes.at(previousStep->giveNumber() + 1) - previousStep->giveTargetTime();
217  } else {
218  dt = this->deltaT;
219  }
220  currentStep.reset( new TimeStep(*previousStep, dt) );
221 
222  return currentStep.get();
223 }
224 
225 
227 {
228  if ( this->prescribedTimes.giveSize() > 0 )
230  else
231  return this->deltaT * this->giveNumberOfSteps();
232 }
233 
234 
235 
237 {
239 #ifdef __PARALLEL_MODE
240  if ( this->isParallel() ) {
241  #ifdef __VERBOSE_PARALLEL
242  // force equation numbering before setting up comm maps
243  OOFEM_LOG_INFO( "[process rank %d] neq is %d\n", this->giveRank(), this->giveNumberOfDomainEquations(1, EModelDefaultEquationNumbering()) );
244  #endif
245 
246  // set up communication patterns
247  // needed only for correct shared rection computation
249  if ( nonlocalExt ) {
251  }
252  }
253 #endif
254 
256 }
257 
258 
260 {
261  int neq;
262  int di = 1;
263 
264  this->field->advanceSolution(tStep);
265  this->field->applyBoundaryCondition(tStep);
266 
268  if ( tStep->giveNumber() == 1 ) {
269  this->field->initialize(VM_Total, tStep, this->solution, EModelDefaultEquationNumbering() );
270  } else {
271  this->field->initialize(VM_Total, tStep->givePreviousStep(), this->solution, EModelDefaultEquationNumbering() );
272  this->field->update(VM_Total, tStep, this->solution, EModelDefaultEquationNumbering() );
273  }
274  this->field->applyBoundaryCondition(tStep);
275 
276 
277  // Create "stiffness matrix"
278  if ( !this->stiffnessMatrix ) {
280  if ( !this->stiffnessMatrix ) {
281  OOFEM_ERROR("Couldn't create requested sparse matrix of type %d", sparseMtrxType);
282  }
283 
284  this->stiffnessMatrix->buildInternalStructure( this, di, EModelDefaultEquationNumbering() );
285  }
286  this->internalForces.resize(neq);
287 
288  FloatArray incrementOfSolution(neq);
289  if ( this->initialGuessType == IG_Tangent ) {
290 
291  if ( this->giveProblemScale() == macroScale ) {
292  OOFEM_LOG_RELEVANT("Computing initial guess\n");
293  }
294 
295  FloatArray extrapolatedForces(neq);
296 #if 1
297  this->assembleExtrapolatedForces( extrapolatedForces, tStep, TangentStiffnessMatrix, this->giveDomain(di) );
298 #else
299  FloatArray incrementOfPrescribed;
301  this->field->initialize(VM_Incremental, tStep, incrementOfPrescribed, EModelDefaultEquationNumbering() );
302  this->assembleVector(extrapolatedForces, tStep, MatrixProductAssembler(TangentAssembler(TangentStiffness), incrementOfPrescribed),
303  VM_Unknown, EModelDefaultEquationNumbering(), this->giveDomain(di) );
304 #endif
305  extrapolatedForces.negated();
307  //this->assembleVector(extrapolatedForces, tStep, LinearizedDilationForceAssembler(), VM_Incremental, EModelDefaultEquationNumbering(), this->giveDomain(di) );
308 #if 0
309  // Some debug stuff:
310  extrapolatedForces.printYourself("extrapolatedForces");
311  this->internalForces.zero();
313  this->internalForces.printYourself("internal forces");
314 #endif
315  if ( extrapolatedForces.computeNorm() > 0. ) {
316 
317  if( this->giveProblemScale() == macroScale ) {
318  OOFEM_LOG_RELEVANT("Computing old tangent\n");
319  }
320 
321  this->updateComponent( tStep, NonLinearLhs, this->giveDomain(di) );
322  SparseLinearSystemNM *linSolver = nMethod->giveLinearSolver();
323 
324  if( this->giveProblemScale() == macroScale ) {
325  OOFEM_LOG_RELEVANT("Solving for increment\n");
326  }
327 
328  linSolver->solve(*stiffnessMatrix, extrapolatedForces, incrementOfSolution);
329 
330  if( this->giveProblemScale() == macroScale ) {
331  OOFEM_LOG_RELEVANT("Initial guess found\n");
332  }
333 
334  this->solution.add(incrementOfSolution);
335 
336  this->field->update(VM_Total, tStep, this->solution, EModelDefaultEquationNumbering());
337  this->field->applyBoundaryCondition(tStep);
338  }
339  } else if ( this->initialGuessType != IG_None ) {
340  OOFEM_ERROR("Initial guess type: %d not supported", initialGuessType);
341  } else {
342  incrementOfSolution.zero();
343  }
344 
345  // Build initial/external load
346  FloatArray externalForces(neq);
347  this->assembleVector( externalForces, tStep, ExternalForceAssembler(), VM_Total,
350 
351  // Build reference load (for CALM solver)
352  FloatArray referenceForces;
353  if ( this->nMethod->referenceLoad() ) {
354  // This check is pretty much only here as to avoid unnecessarily trying to integrate all the loads.
355  referenceForces.resize(neq);
356  this->assembleVector( referenceForces, tStep, ReferenceForceAssembler(), VM_Total,
359  }
360 
361  if ( this->giveProblemScale() == macroScale ) {
362  OOFEM_LOG_INFO("\nStaticStructural :: solveYourselfAt - Solving step %d, metastep %d, (neq = %d)\n", tStep->giveNumber(), tStep->giveMetaStepNumber(), neq);
363  }
364 
365  int currentIterations;
366  NM_Status status;
367  if ( this->nMethod->referenceLoad() ) {
368  status = this->nMethod->solve(*this->stiffnessMatrix,
369  referenceForces,
370  &externalForces,
371  this->solution,
372  incrementOfSolution,
373  this->internalForces,
374  this->eNorm,
375  loadLevel,
377  currentIterations,
378  tStep);
379  } else {
380  status = this->nMethod->solve(*this->stiffnessMatrix,
381  externalForces,
382  NULL,
383  this->solution,
384  incrementOfSolution,
385  this->internalForces,
386  this->eNorm,
387  loadLevel, // Only relevant for incrementalBCLoadVector?
389  currentIterations,
390  tStep);
391  }
392  if ( !( status & NM_Success ) ) {
393  OOFEM_ERROR("No success in solving problem");
394  }
395 }
396 
398 {
400  // Propagate cracks and recompute time step
403  } else {
404  // Propagate cracks at the end of the time step
407  }
408 }
409 
411 {
412  double val1 = dof->giveUnknownsDictionaryValue(tStep, VM_Total);
413  if ( mode == VM_Total ) {
414  return val1;
415  } else if ( mode == VM_Incremental ) {
416  double val0 = dof->giveUnknownsDictionaryValue(tStep->givePreviousStep(), VM_Total);
417  return val1 - val0;
418  } else {
419  OOFEM_ERROR("Unknown value mode requested");
420  return 0;
421  }
422  return this->field->giveUnknownValue(dof, mode, tStep);
423 }
424 
425 
427 {
428  if ( cmpn == InternalRhs ) {
429  // Updates the solution in case it has changed
431  this->field->update(VM_Total, tStep, this->solution, EModelDefaultEquationNumbering());
432  this->field->applyBoundaryCondition(tStep);
433 
434  this->internalForces.zero();
435  this->assembleVector(this->internalForces, tStep, InternalForceAssembler(), VM_Total,
436  EModelDefaultEquationNumbering(), d, & this->eNorm);
438 
439  internalVarUpdateStamp = tStep->giveSolutionStateCounter(); // Hack for linearstatic
440  } else if ( cmpn == NonLinearLhs ) {
441  this->stiffnessMatrix->zero();
443  } else {
444  OOFEM_ERROR("Unknown component");
445  }
446 }
447 
448 
450 {
451  contextIOResultType iores;
452 
453  if ( ( iores = StructuralEngngModel :: saveContext(stream, mode) ) != CIO_OK ) {
454  THROW_CIOERR(iores);
455  }
456 
457  if ( ( iores = this->field->saveContext(stream, mode) ) != CIO_OK ) {
458  THROW_CIOERR(iores);
459  }
460 
461  return CIO_OK;
462 }
463 
464 
466 {
467  contextIOResultType iores;
468 
469  if ( ( iores = StructuralEngngModel :: restoreContext(stream, mode) ) != CIO_OK ) {
470  THROW_CIOERR(iores);
471  }
472 
473  if ( ( iores = this->field->restoreContext(stream, mode) ) != CIO_OK ) {
474  THROW_CIOERR(iores);
475  }
476 
477  return CIO_OK;
478 }
479 
480 
481 void
483 {
485  this->giveNumericalMethod( this->giveCurrentMetaStep() )->setDomain( this->giveDomain(1) );
486 }
487 
488 int
490 {
491  stiffnessMatrix.reset( NULL );
493 }
494 
495 
496 void StaticStructural :: setSolution(TimeStep *tStep, const FloatArray &vectorToStore)
497 {
498  this->field->update(VM_Total, tStep, vectorToStore, EModelDefaultEquationNumbering());
499 }
500 
501 
502 bool
504 {
505  if ( tStep->isTheFirstStep() ) {
506  return true;
507  }
508  // Check if Dirichlet b.c.s has changed.
509  Domain *d = this->giveDomain(1);
510  for ( auto &gbc : d->giveBcs() ) {
511  ActiveBoundaryCondition *active_bc = dynamic_cast< ActiveBoundaryCondition * >(gbc.get());
512  BoundaryCondition *bc = dynamic_cast< BoundaryCondition * >(gbc.get());
513  // We only need to consider Dirichlet b.c.s
514  if ( bc || ( active_bc && ( active_bc->requiresActiveDofs() || active_bc->giveNumberOfInternalDofManagers() ) ) ) {
515  // Check of the dirichlet b.c. has changed in the last step (if so we need to renumber)
516  if ( gbc->isImposed(tStep) != gbc->isImposed(tStep->givePreviousStep()) ) {
517  return true;
518  }
519  }
520  }
521  return false;
522 }
523 
524 int
525 StaticStructural :: estimateMaxPackSize(IntArray &commMap, DataStream &buff, int packUnpackType)
526 {
527  int count = 0, pcount = 0;
528  Domain *domain = this->giveDomain(1);
529 
530  if ( packUnpackType == 0 ) {
531  for ( int map: commMap ) {
532  DofManager *dman = domain->giveDofManager( map );
533  for ( Dof *dof: *dman ) {
534  if ( dof->isPrimaryDof() && dof->__giveEquationNumber() > 0 ) {
535  count++;
536  } else {
537  pcount++;
538  }
539  }
540  }
541 
542  // --------------------------------------------------------------------------------
543  // only pcount is relevant here, since only prescribed components are exchanged !!!!
544  // --------------------------------------------------------------------------------
545 
546  return ( buff.givePackSizeOfDouble(1) * pcount );
547  } else if ( packUnpackType == 1 ) {
548  for ( int map: commMap ) {
549  count += domain->giveElement( map )->estimatePackSize(buff);
550  }
551 
552  return count;
553  }
554 
555  return 0;
556 }
557 
558 } // end namespace oofem
virtual void updateAttributes(MetaStep *mStep)
Update receiver attributes according to step metaStep attributes.
Definition: engngm.C:589
The representation of EngngModel default unknown numbering.
Solves an approximated tangent problem from the last iteration. Useful for changing Dirichlet boundar...
Definition: engngm.h:199
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.
Definition: nmstatus.h:47
std::unique_ptr< TimeStep > currentStep
Current time step.
Definition: engngm.h:231
Implementation for assembling forces computed by multiplication with a matrix.
virtual int forceEquationNumbering()
Forces equation renumbering on all domains associated to engng model.
InputRecord * giveAttributesRecord()
Returns e-model attributes.
Definition: metastep.h:95
Class and object Domain.
Definition: domain.h:115
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.
Definition: engngm.C:391
problemScale giveProblemScale()
Returns scale in multiscale simulation.
Definition: engngm.h:418
virtual bool requiresActiveDofs()
Checks to see if active boundary condition requires special DOFs.
Definition: activebc.h:152
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
Definition: engngm.C:262
Class representing meta step.
Definition: metastep.h:62
SparseMtrx * createSparseMtrx(SparseMtrxType type)
Creates new instance of sparse matrix corresponding to given keyword.
Definition: classfactory.C:105
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
MatResponseMode stiffMode
std::unique_ptr< TimeStep > previousStep
Previous time step.
Definition: engngm.h:233
virtual void terminate(TimeStep *tStep)
Terminates the solution of time step.
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
MetaStep * giveMetaStep(int i)
Returns the i-th meta step.
Definition: engngm.C:1765
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
int nonlocalExt
Flag indicating if nonlocal extension active, which will cause data to be sent between shared element...
Definition: engngm.h:280
This base class is an abstraction for all numerical methods solving sparse linear system of equations...
void clear()
Clears receiver (zero size).
Definition: floatarray.h:206
#define _IFT_StaticStructural_nonlocalExtension
This base class is an abstraction for numerical algorithm.
Definition: nummet.h:80
#define _IFT_StaticStructural_prescribedTimes
Implementation for assembling tangent matrices in standard monolithic FE-problems.
virtual bool hasField(InputFieldType id)=0
Returns true if record contains field identified by idString keyword.
bool isParallel() const
Returns true if receiver in parallel mode.
Definition: engngm.h:1056
Base class for dof managers.
Definition: dofmanager.h:113
int giveNumberOfProcesses() const
Returns the number of collaborating processes.
Definition: engngm.h:1060
virtual void solveYourself()
Starts solution process.
Definition: engngm.C:501
StateCounterType internalVarUpdateStamp
Contains last time stamp of internal variable update.
virtual NumericalMethod * giveNumericalMethod(MetaStep *mStep)
Returns reference to receiver&#39;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...
Definition: nmstatus.h:44
Class implementing an array of integers.
Definition: intarray.h:61
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.
#define THROW_CIOERR(e)
Definition: contextioerr.h:61
virtual int giveNumberOfInternalDofManagers()
Gives the number of internal dof managers.
#define OOFEM_LOG_RELEVANT(...)
Definition: logger.h:126
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...
Definition: engngm.C:1341
bool isTheFirstStep()
Check if receiver is first step.
Definition: timestep.C:134
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.
Definition: engngm.C:803
MetaStep * giveCurrentMetaStep()
Returns current meta step.
Definition: engngm.C:1684
std::vector< std::unique_ptr< GeneralBoundaryCondition > > & giveBcs()
Definition: domain.h:322
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.
Definition: engngm.h:306
#define OOFEM_LOG_INFO(...)
Definition: logger.h:127
int giveNumber()
Returns receiver&#39;s number.
Definition: timestep.h:129
Element * giveElement(int n)
Service for accessing particular domain fe element.
Definition: domain.C:160
NumericalCmpn
Type representing numerical component.
Definition: numericalcmpn.h:46
StateCounterType giveSolutionStateCounter()
Returns current solution state counter.
Definition: timestep.h:188
#define _IFT_EngngModel_smtype
Definition: engngm.h:82
#define OOFEM_ERROR(...)
Definition: error.h:61
std::unique_ptr< SparseNonLinearSystemNM > nMethod
#define _IFT_StaticStructural_solvertype
int numberOfSteps
Total number of time steps.
Definition: engngm.h:209
int ndomains
Number of receiver domains.
Definition: engngm.h:205
int updateSharedDofManagers(FloatArray &answer, const UnknownNumberingScheme &s, int ExchangeTag)
Exchanges necessary remote DofManagers data.
Definition: engngm.C:1957
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
Definition: engngm.h:78
int giveNumberOfSteps(bool force=false)
Returns total number of steps.
Definition: engngm.h:744
ProblemCommunicator * communicator
Communicator.
Definition: engngm.h:303
InitialGuess
Means to choose methods for finding a good initial guess.
Definition: engngm.h:197
SparseMtrxType sparseMtrxType
CommunicatorBuff * commBuff
Common Communicator buffer.
Definition: engngm.h:301
Abstract base class for all active boundary conditions.
Definition: activebc.h:63
virtual void updateComponent(TimeStep *tStep, NumericalCmpn cmpn, Domain *d)
Updates components mapped to numerical method if necessary during solution process.
#define _IFT_EngngModel_nsteps
Definition: engngm.h:68
TimeStep * givePreviousStep()
Returns pointer to previous solution step.
Definition: timestep.C:114
Implementation for assembling reference (external) forces vectors.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the state of model to output stream.
Definition: engngm.C:1527
virtual int forceEquationNumbering()
Forces equation renumbering on all domains associated to engng model.
Definition: engngm.C:473
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.
Definition: floatarray.h:82
int estimatePackSize(DataStream &buff)
Estimates the necessary pack size to hold all packed data of receiver.
Definition: element.C:1575
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.
Definition: dof.h:373
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
virtual int givePackSizeOfDouble(int count)=0
No special treatment for new iterations. Probably means ending up using for all free dofs...
Definition: engngm.h:198
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
int giveMetaStepNumber()
Returns receiver&#39;s meta step number.
Definition: timestep.h:135
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.
Definition: engngm.h:754
double computeNorm() const
Computes the norm (or length) of the vector.
Definition: floatarray.C:840
Class representing the general Input Record.
Definition: inputrecord.h:101
virtual void printYourself() const
Print receiver on stdout.
Definition: floatarray.C:747
void zero()
Zeroes all coefficients of receiver.
Definition: floatarray.C:658
int giveRank() const
Returns domain rank in a group of collaborating processes (0..groupSize-1)
Definition: engngm.h:1058
int giveNumber()
Returns receiver&#39;s number.
Definition: metastep.h:89
ClassFactory & classFactory
Definition: classfactory.C:59
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
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...
Definition: communicator.h:60
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. ...
Definition: engngm.C:1198
#define _IFT_StaticStructural_recomputeaftercrackpropagation
std::unique_ptr< PrimaryField > field
Abstract base class representing the "problem" under consideration.
Definition: engngm.h:181
virtual void setDomain(Domain *d)
Definition: nummet.h:114
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
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:78
int giveSize() const
Returns the size of receiver.
Definition: floatarray.h:218
virtual void updateDomainLinks()
Updates domain links after the domains of receiver have changed.
Definition: engngm.C:1521
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode)
Restores the state of model from output stream.
Definition: engngm.C:1592
the oofem namespace is to define a context or scope in which all oofem names are defined.
Domain * giveDomain(int n)
Service for accessing particular problem domain.
Definition: engngm.C:1720
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
#define IR_GIVE_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:69
Abstract class Dof represents Degree Of Freedom in finite element mesh.
Definition: dof.h:93
Symmetric skyline.
DofManager * giveDofManager(int n)
Service for accessing particular domain dof manager.
Definition: domain.C:314
void negated()
Switches the sign of every coefficient of receiver.
Definition: floatarray.C:739
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...
Definition: engngm.C:986
Class representing solution step.
Definition: timestep.h:80
SparseNonLinearSystemNM * createNonLinearSolver(const char *name, Domain *domain, EngngModel *emodel)
Creates new instance of nonlinear solver corresponding to given keyword.
Definition: classfactory.C:249
void add(const FloatArray &src)
Adds array src to receiver.
Definition: floatarray.C:156
void setSolution(TimeStep *tStep, const FloatArray &vectorToStore)
void resize(int s)
Resizes receiver towards requested size.
Definition: floatarray.C:631

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:31 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011