OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
diidynamic.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/diidynamic.h"
36 #include "../sm/Elements/structuralelement.h"
37 #include "../sm/Elements/structuralelementevaluator.h"
38 #include "timestep.h"
39 #include "element.h"
40 #include "dofmanager.h"
41 #include "dof.h"
42 #include "contextioerr.h"
43 #include "datastream.h"
44 #include "verbose.h"
45 #include "unknownnumberingscheme.h"
46 #include "classfactory.h"
47 
48 namespace oofem {
49 REGISTER_EngngModel(DIIDynamic);
50 
52  loadVector(), previousLoadVector(), rhs(), displacementVector(), velocityVector(), accelerationVector(),
53  previousDisplacementVector(), previousVelocityVector(), previousAccelerationVector(), previousIncrementOfDisplacement(), help()
54 {
55  initFlag = true;
56  ndomains = 1;
57 
59 }
60 
62 {
63 }
64 
66 // Only one has reason for DIIDynamic
67 // - SolutionOfLinearEquations
68 {
69  if ( nMethod ) {
70  return nMethod.get();
71  }
72 
73  nMethod.reset( classFactory.createSparseLinSolver(solverType, this->giveDomain(1), this) );
74  if ( !nMethod ) {
75  OOFEM_ERROR("linear solver creation failed for lstype %d", solverType);
76  }
77 
78  return nMethod.get();
79 }
80 
81 
84 {
85  IRResultType result; // Required by IR_GIVE_FIELD macro
86 
88  if ( result != IRRT_OK ) {
89  return result;
90  }
91 
92  int val = 0;
94  solverType = ( LinSystSolverType ) val;
95 
96  val = 0;
99 
100  val = 0;
102 
103  eta = 0;
105 
106  delta = 0;
108 
110 
111  gamma = 0.5;
112  beta = 0.25; // Default Newmark parameters.
113  theta = 1.37; // Default Wilson parameter.
115  OOFEM_LOG_INFO("Selecting Newmark-beta metod\n");
119  OOFEM_LOG_INFO("Selecting Two-point Backward Euler method\n");
121  OOFEM_LOG_INFO("Selecting Three-point Backward Euler metod\n");
122  } else if ( initialTimeDiscretization == TD_Wilson ) {
123  OOFEM_LOG_INFO("Selecting Wilson-theta metod\n");
125  if ( theta < 1.37 ) {
126  OOFEM_WARNING("Found theta < 1.37. Performing correction, theta = 1.37");
127  theta = 1.37;
128  }
129  } else {
130  OOFEM_WARNING("Time-stepping scheme not found!");
131  return IRRT_BAD_FORMAT;
132  }
133 
135 
136  return IRRT_OK;
137 }
138 
139 
141 // Returns unknown quantity displacement, velocity or acceleration of equation eq.
142 // This function translates this request to numerical method language.
143 {
144  int eq = dof->__giveEquationNumber();
145 #ifdef DEBUG
146  if ( eq == 0 ) {
147  OOFEM_ERROR("invalid equation number");
148  }
149 #endif
150 
151  if ( tStep != this->giveCurrentStep() ) {
152  OOFEM_ERROR("unknown time step encountered");
153  return 0.;
154  }
155 
156  switch ( mode ) {
157  case VM_Total:
158  return displacementVector.at(eq);
159 
160  case VM_Velocity:
161  return velocityVector.at(eq);
162 
163  case VM_Acceleration:
164  return accelerationVector.at(eq);
165 
166  default:
167  OOFEM_ERROR("Unknown is of undefined ValueModeType for this problem");
168  }
169 
170  return 0.0;
171 }
172 
173 
175 {
176  int istep = giveNumberOfFirstStep();
177  double totalTime = deltaT;
178  StateCounterType counter = 1;
180 
181  if ( currentStep ) {
182  totalTime = currentStep->giveTargetTime() + deltaT;
183  istep = currentStep->giveNumber() + 1;
184  counter = currentStep->giveSolutionStateCounter() + 1;
185  td = currentStep->giveTimeDiscretization();
186  if ( currentStep->isTheFirstStep() &&
189  }
190  }
191 
192  previousStep = std :: move(currentStep);
193 
194  currentStep.reset( new TimeStep(istep, this, 1, totalTime, deltaT, counter, td) );
195 
196  return currentStep.get();
197 }
198 
200 {
201  Domain *domain = this->giveDomain(1);
203 
204  if ( tStep->isTheFirstStep() ) {
206  -deltaT, deltaT, 0);
207  //
208  // Determine initial displacements, velocities and accelerations.
209  //
210  loadVector.resize(neq);
211  loadVector.zero();
214  velocityVector.resize(neq);
220 
221  for ( auto &node : domain->giveDofManagers()) {
222  for ( Dof *iDof: *node ) {
223  //
224  // Ask for initial values obtained from boundary conditions and initial conditions.
225  //
226  if ( !iDof->isPrimaryDof() ) {
227  continue;
228  }
229 
230  int jj = iDof->__giveEquationNumber();
231  if ( jj ) {
232  displacementVector.at(jj) = iDof->giveUnknown(VM_Total, stepWhenIcApply);
233  velocityVector.at(jj) = iDof->giveUnknown(VM_Velocity, stepWhenIcApply);
234  accelerationVector.at(jj) = iDof->giveUnknown(VM_Acceleration, stepWhenIcApply);
235  }
236  }
237  }
238 
239  delete stepWhenIcApply;
240  } // End of initialization.
241 }
242 
244 {
246 }
247 
249 {
250  // Determine the constants.
251  this->determineConstants(tStep);
252 
253  Domain *domain = this->giveDomain(1);
255 
256 
257  if ( initFlag ) {
258 #ifdef VERBOSE
259  OOFEM_LOG_DEBUG("Assembling stiffness matrix\n");
260 #endif
262  if ( !stiffnessMatrix ) {
263  OOFEM_ERROR("sparse matrix creation failed");
264  }
265 
266  stiffnessMatrix->buildInternalStructure( this, 1, EModelDefaultEquationNumbering() );
267 
268  this->assemble(*stiffnessMatrix, tStep, EffectiveTangentAssembler(TangentStiffness, false, 1 + this->delta * a1, this->a0 + this->eta * this->a1),
270 
271  help.resize(neq);
272  help.zero();
273 
278 
279  initFlag = 0;
280  }
281 
282  if ( ( tStep->givePreviousStep() != NULL ) && ( tStep->giveTimeDiscretization() != tStep->givePreviousStep()->giveTimeDiscretization() ) ) {
283 #ifdef VERBOSE
284  OOFEM_LOG_DEBUG("Assembling stiffness matrix\n");
285 #endif
286  stiffnessMatrix->zero();
287  this->assemble(*stiffnessMatrix, tStep, EffectiveTangentAssembler(TangentStiffness, false, 1 + this->delta * a1, this->a0 + this->eta * this->a1),
289  }
290 
291 #ifdef VERBOSE
292  OOFEM_LOG_DEBUG("Assembling load\n");
293 #endif
294 
295  this->assembleLoadVector(loadVector, domain, VM_Total, tStep);
296 
297  //
298  // contribution of internal, viscous and inertia forces due to prescribed (dirichlet) BCs
299  //
300  {
301  FloatArray bcLoadVector;
302  this->assembleDirichletBcRhsVector(bcLoadVector, domain, tStep);
303  loadVector.subtract(bcLoadVector);
304  }
305 
306 
307  //
308  // Assemble effective load vector (rhs).
309  //
310 
311  for ( int i = 1; i <= neq; i++ ) {
319  }
320 
321  this->timesMtrx(help, rhs, MassMatrix, domain, tStep);
322  //this->assembleVector(help, tStep, MatrixProductAssembler(MassMatrix(), rhs), VM_Total,
323  // EModelDefaultEquationNumbering(), this->giveDomain(1));
324 
325  help.zero();
326 
327  if ( delta != 0 ) {
328  for ( int i = 1; i <= neq; i++ ) {
333  }
334  this->timesMtrx(help, rhs2, TangentStiffnessMatrix, domain, tStep);
335  //this->assembleVector(help, tStep, MatrixProductAssembler(TangentAssembler(), rhs2), VM_Total,
336  // EModelDefaultEquationNumbering(), this->giveDomain(1));
337 
338  help.zero();
339  for ( int i = 1; i <= neq; i++ ) {
340  rhs.at(i) += rhs2.at(i);
341  }
342  }
343 
344  if ( tStep->giveTimeDiscretization() == TD_Wilson ) {
345  for ( int i = 1; i <= neq; i++ ) {
346  rhs.at(i) += previousLoadVector.at(i)
347  + theta * ( loadVector.at(i) - previousLoadVector.at(i) );
348  }
349  } else {
350  for ( int i = 1; i <= neq; i++ ) {
351  rhs.at(i) += loadVector.at(i);
352  }
353  }
354 
355  //
356  // Call numerical model to solve arised problem.
357  //
358 #ifdef VERBOSE
359  OOFEM_LOG_RELEVANT( "\n\nSolving [step number %8d, time %15e]\n", tStep->giveNumber(), tStep->giveTargetTime() );
360 #endif
361 
363 
364  if ( tStep->giveTimeDiscretization() == TD_Wilson ) {
365  OOFEM_LOG_INFO("TD_Wilson: Updating acceleration, velocity and displacement.\n");
366  for ( int i = 1; i <= neq; i++ ) {
370 
373 
377  }
378  } else if ( ( tStep->giveTimeDiscretization() == TD_ThreePointBackward ) ||
379  ( tStep->giveTimeDiscretization() == TD_TwoPointBackward ) ) {
380  for ( int i = 1; i <= neq; i++ ) {
383 
386  }
387  } else {
388  for ( int i = 1; i <= neq; i++ ) {
392 
395  + a7 *accelerationVector.at(i);
396  }
397  }
398 }
399 
400 
402 {
408 
410 }
411 
412 
413 void
414 DIIDynamic :: printDofOutputAt(FILE *stream, Dof *iDof, TimeStep *tStep)
415 {
416  static char dofchar[] = "dva";
417  static ValueModeType dofmodes[] = {
418  VM_Total, VM_Velocity, VM_Acceleration
419  };
420 
421  iDof->printMultipleOutputAt(stream, tStep, dofchar, dofmodes, 3);
422 }
423 
424 
425 void
427 {
428  int nelem = domain->giveNumberOfElements();
430  int i, j, k, jj, kk, n;
431  FloatMatrix charMtrx, R;
432  IntArray loc;
433  Element *element;
435 
436  answer.resize(neq);
437  answer.zero();
438 
439  for ( i = 1; i <= nelem; i++ ) {
440  element = domain->giveElement(i);
441  // Skip remote elements.
442  if ( element->giveParallelMode() == Element_remote ) {
443  continue;
444  }
445 
446  element->giveLocationArray(loc, en);
447  element->giveCharacteristicMatrix(charMtrx, type, tStep);
448  if ( charMtrx.isNotEmpty() ) {
450  if ( element->giveRotationMatrix(R) ) {
451  charMtrx.rotatedWith(R);
452  }
453  }
454 
455 #ifdef DEBUG
456  if ( loc.giveSize() != charMtrx.giveNumberOfRows() ) {
457  OOFEM_ERROR("dimension mismatch");
458  }
459 
460 #endif
461 
462  n = loc.giveSize();
463  for ( j = 1; j <= n; j++ ) {
464  jj = loc.at(j);
465  if ( jj ) {
466  for ( k = 1; k <= n; k++ ) {
467  kk = loc.at(k);
468  if ( kk ) {
469  answer.at(jj) += charMtrx.at(j, k) * vec.at(kk);
470  }
471  }
472  }
473  }
474  }
475 }
476 
477 
478 void
480 {
482  _loadVector.zero();
483 
484  this->assembleVector(_loadVector, tStep, ExternalForceAssembler(), mode,
487 }
488 
489 
490 void
492 {
493  IntArray loc, dofids;
494  int nelem = d->giveNumberOfElements();
495  FloatArray rp, charVec;
496  FloatMatrix k,m, R;
497  FloatMatrix capacity;
498 
500  answer.zero();
501 
502  for ( int ielem = 1; ielem <= nelem; ielem++ ) {
503  Element *element = d->giveElement(ielem);
504 
505  element->giveElementDofIDMask(dofids);
507  element->computeVectorOfPrescribed(dofids, VM_Total, tStep, rp);
508  int rotFlag = element->giveRotationMatrix(R);
509 
510  if ( rp.containsOnlyZeroes() ) {
511  continue;
512  } else {
513  element->giveCharacteristicMatrix(k, TangentStiffnessMatrix, tStep);
514  charVec.beProductOf(k, rp);
515  if (rotFlag) charVec.rotatedWith(R, 't');
516  answer.assemble(charVec, loc);
517  }
518 
519  // add acceleration forces due to BCs
520  element->computeVectorOfPrescribed(dofids, VM_Acceleration, tStep, rp);
521  if ( rp.containsOnlyZeroes() ) {
522  continue;
523  } else {
524  element->giveCharacteristicMatrix(m, MassMatrix, tStep);
525  charVec.beProductOf(m, rp);
526  if (rotFlag) charVec.rotatedWith(R, 't');
527  answer.assemble(charVec, loc);
528  }
529 
530  // add dumping forces due to BCs
531  element->computeVectorOfPrescribed(dofids, VM_Velocity, tStep, rp);
532  if ( rp.containsOnlyZeroes() ) {
533  continue;
534  } else {
535  if (!k.isNotEmpty()) element->giveCharacteristicMatrix(k, TangentStiffnessMatrix, tStep);
536  if (!m.isNotEmpty()) element->giveCharacteristicMatrix(m, MassMatrix, tStep);
537  k.times(this->delta);
538  m.times(this->eta);
539  m.add(k);
540  charVec.beProductOf(m, rp);
541  if (rotFlag) charVec.rotatedWith(R, 't');
542  answer.assemble(charVec, loc);
543  }
544 
545 
546 
547 
548  } // end element loop
549 
550 }
551 
552 
553 
554 void
556 {
557  if ( this->giveCurrentStep()->isTheFirstStep() && initialTimeDiscretization == TD_ThreePointBackward ) {
559  }
560 
561  deltaT = tStep->giveTimeIncrement();
562 
563  if ( tStep->giveTimeDiscretization() == TD_Newmark ) {
564  double dt2 = deltaT * deltaT;
565  a0 = 1 / ( beta * dt2 );
566  a1 = gamma / ( beta * deltaT );
567  a2 = 1 / ( beta * deltaT );
568  a3 = 1 / ( 2 * beta ) - 1;
569  a4 = ( gamma / beta ) - 1;
570  a5 = deltaT / 2 * ( gamma / beta - 2 );
571  a6 = deltaT * ( 1 - gamma );
572  a7 = deltaT * gamma;
573  a8 = dt2 * ( ( 1 / 2 ) - beta );
574  a9 = dt2 * beta;
575  a10 = 0;
576  a11 = 0;
577  } else if ( tStep->giveTimeDiscretization() == TD_TwoPointBackward ) {
578  double dt2 = deltaT * deltaT;
579  a0 = 1 / dt2;
580  a1 = 1 / deltaT;
581  a2 = 1 / deltaT;
582  a3 = 0;
583  a4 = 0;
584  a5 = 0;
585  a6 = 0;
586  a7 = 0;
587  a8 = 0;
588  a9 = 0;
589  a10 = 0;
590  a11 = 0;
591  } else if ( tStep->giveTimeDiscretization() == TD_ThreePointBackward ) {
592  double dt2 = deltaT * deltaT;
593  a0 = 2 / dt2;
594  a1 = 3 / ( 2 * deltaT );
595  a2 = 2 / deltaT;
596  a3 = 0;
597  a4 = 0;
598  a5 = 0;
599  a6 = 0;
600  a7 = 0;
601  a8 = 0;
602  a9 = 0;
603  a10 = 0;
604  a11 = 1 / ( 2 * deltaT );
605  } else if ( tStep->giveTimeDiscretization() == TD_Wilson ) {
606  a0 = 6 / ( ( theta * deltaT ) * ( theta * deltaT ) );
607  a1 = 3 / ( theta * deltaT );
608  a2 = 2 * a1;
609  a3 = 2;
610  a4 = 2;
611  a5 = theta * deltaT / 2;
612  a6 = a0 / theta;
613  a7 = a2 / theta;
614  a8 = 1 - 3 / theta;
615  a9 = deltaT / 2;
616  a10 = deltaT * deltaT / 6;
617  a11 = 0;
618  } else {
619  OOFEM_ERROR("Time-stepping scheme not found!");
620  }
621 }
622 
623 
625 {
626  contextIOResultType iores;
627 
628  if ( ( iores = EngngModel :: saveContext(stream, mode) ) != CIO_OK ) {
629  THROW_CIOERR(iores);
630  }
631 
632  if ( ( iores = displacementVector.storeYourself(stream) ) != CIO_OK ) {
633  THROW_CIOERR(iores);
634  }
635 
636  if ( ( iores = velocityVector.storeYourself(stream) ) != CIO_OK ) {
637  THROW_CIOERR(iores);
638  }
639 
640  if ( ( iores = accelerationVector.storeYourself(stream) ) != CIO_OK ) {
641  THROW_CIOERR(iores);
642  }
643 
644  if ( ( iores = loadVector.storeYourself(stream) ) != CIO_OK ) {
645  THROW_CIOERR(iores);
646  }
647 
648  if ( ( iores = previousIncrementOfDisplacement.storeYourself(stream) ) != CIO_OK ) {
649  THROW_CIOERR(iores);
650  }
651 
652  return CIO_OK;
653 }
654 
656 {
657  contextIOResultType iores;
658 
659  if ( ( iores = EngngModel :: restoreContext(stream, mode) ) != CIO_OK ) {
660  THROW_CIOERR(iores);
661  }
662 
663  if ( ( iores = displacementVector.restoreYourself(stream) ) != CIO_OK ) {
664  THROW_CIOERR(iores);
665  }
666 
667  if ( ( iores = velocityVector.restoreYourself(stream) ) != CIO_OK ) {
668  THROW_CIOERR(iores);
669  }
670 
671  if ( ( iores = accelerationVector.restoreYourself(stream) ) != CIO_OK ) {
672  THROW_CIOERR(iores);
673  }
674 
675  if ( ( iores = loadVector.restoreYourself(stream) ) != CIO_OK ) {
676  THROW_CIOERR(iores);
677  }
678 
679  if ( ( iores = previousIncrementOfDisplacement.restoreYourself(stream) ) != CIO_OK ) {
680  THROW_CIOERR(iores);
681  }
682 
683  return CIO_OK;
684 }
685 } // end namespace oofem
LinSystSolverType
The values of this type should be related not to specific solvers, but more to specific packages that...
The representation of EngngModel default unknown numbering.
void subtract(const FloatArray &src)
Subtracts array src to receiver.
Definition: floatarray.C:258
std::unique_ptr< SparseMtrx > stiffnessMatrix
Definition: diidynamic.h:77
#define _IFT_DIIDynamic_deltat
Definition: diidynamic.h:46
virtual double giveUnknownComponent(ValueModeType type, TimeStep *tStep, Domain *d, Dof *dof)
Returns requested unknown.
Definition: diidynamic.C:140
std::unique_ptr< TimeStep > currentStep
Current time step.
Definition: engngm.h:231
Class and object Domain.
Definition: domain.h:115
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
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
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode)
Restores the state of model from output stream.
Definition: diidynamic.C:655
std::unique_ptr< SparseLinearSystemNM > nMethod
Numerical method used to solve the problem.
Definition: diidynamic.h:95
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
contextIOResultType storeYourself(DataStream &stream) const
Definition: floatarray.C:872
std::unique_ptr< TimeStep > previousStep
Previous time step.
Definition: engngm.h:233
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
long StateCounterType
StateCounterType type used to indicate solution state.
FloatArray displacementVector
Definition: diidynamic.h:79
This base class is an abstraction for numerical algorithm.
Definition: nummet.h:80
#define _IFT_DIIDynamic_ddtScheme
Definition: diidynamic.h:47
std::unique_ptr< TimeStep > stepWhenIcApply
Solution step when IC (initial conditions) apply.
Definition: engngm.h:229
FloatArray previousDisplacementVector
Definition: diidynamic.h:80
LinSystSolverType solverType
Definition: diidynamic.h:88
double giveTargetTime()
Returns target time.
Definition: timestep.h:146
Abstract base class for all finite elements.
Definition: element.h:145
std::vector< std::unique_ptr< DofManager > > & giveDofManagers()
Definition: domain.h:400
virtual void solveYourself()
Starts solution process.
Definition: engngm.C:501
int giveNumber()
Returns domain number.
Definition: domain.h:266
virtual int __giveEquationNumber() const =0
Returns equation number of receiver, usually assigned by emodel.
int giveNumberOfElements() const
Returns number of elements in domain.
Definition: domain.h:434
virtual NumericalMethod * giveNumericalMethod(MetaStep *mStep)
Returns reference to receiver&#39;s numerical method.
Definition: diidynamic.C:65
#define _IFT_DIIDynamic_beta
Definition: diidynamic.h:49
virtual void giveCharacteristicMatrix(FloatMatrix &answer, CharType type, TimeStep *tStep)
Computes characteristic matrix of receiver of requested type in given time step.
Definition: element.C:569
FloatArray previousLoadVector
Definition: diidynamic.h:78
virtual void printMultipleOutputAt(FILE *File, TimeStep *tStep, char *ch, ValueModeType *mode, int nite)
Prints Dof output (it prints value of unknown related to dof at given timeStep).
Definition: dof.C:92
#define _IFT_DIIDynamic_theta
Definition: diidynamic.h:52
REGISTER_EngngModel(ProblemSequence)
#define OOFEM_LOG_DEBUG(...)
Definition: logger.h:128
Class implementing an array of integers.
Definition: intarray.h:61
int & at(int i)
Coefficient access function.
Definition: intarray.h:103
virtual void solveYourself()
Starts solution process.
Definition: diidynamic.C:243
#define THROW_CIOERR(e)
Definition: contextioerr.h:61
void assembleDirichletBcRhsVector(FloatArray &answer, Domain *d, TimeStep *tStep)
Definition: diidynamic.C:491
void rotatedWith(FloatMatrix &r, char mode)
Returns the receiver a rotated according the change-of-base matrix r.
Definition: floatarray.C:799
#define OOFEM_LOG_RELEVANT(...)
Definition: logger.h:126
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
Sets receiver to be a - b.
Definition: floatarray.C:341
void computeVectorOfPrescribed(ValueModeType u, TimeStep *tStep, FloatArray &answer)
Returns local vector of prescribed unknowns.
Definition: element.C:181
double giveTimeIncrement()
Returns solution step associated time increment.
Definition: timestep.h:150
bool isTheFirstStep()
Check if receiver is first step.
Definition: timestep.C:134
bool isNotEmpty() const
Tests for empty matrix.
Definition: floatmatrix.h:162
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
FloatArray previousAccelerationVector
Definition: diidynamic.h:80
virtual void printDofOutputAt(FILE *stream, Dof *iDof, TimeStep *tStep)
DOF printing routine.
Definition: diidynamic.C:414
virtual TimeStep * giveNextStep()
Returns next time step (next to current step) of receiver.
Definition: diidynamic.C:174
virtual ~DIIDynamic()
Definition: diidynamic.C:61
TimeDiscretizationType
Time discretization used by transient solvers.
int giveNumber()
Returns receiver&#39;s number.
Definition: timestep.h:129
#define OOFEM_LOG_INFO(...)
Definition: logger.h:127
Element * giveElement(int n)
Service for accessing particular domain fe element.
Definition: domain.C:160
FloatArray velocityVector
Definition: diidynamic.h:79
#define _IFT_EngngModel_smtype
Definition: engngm.h:82
TimeDiscretizationType initialTimeDiscretization
Definition: diidynamic.h:92
#define OOFEM_ERROR(...)
Definition: error.h:61
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.
Implementation for assembling external forces vectors in standard monolithic FE-problems.
Newmark-beta method.
void giveLocationArray(IntArray &locationArray, const UnknownNumberingScheme &s, IntArray *dofIds=NULL) const
Returns the location array (array of code numbers) of receiver for given numbering scheme...
Definition: element.C:390
void times(double f)
Multiplies receiver by factor f.
Definition: floatmatrix.C:1594
void rotatedWith(const FloatMatrix &r, char mode= 'n')
Returns the receiver &#39;a&#39; transformed using give transformation matrix r.
Definition: floatmatrix.C:1557
contextIOResultType restoreYourself(DataStream &stream)
Definition: floatarray.C:895
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
Definition: floatarray.C:676
SparseMtrxType sparseMtrxType
Definition: diidynamic.h:89
virtual bool giveRotationMatrix(FloatMatrix &answer)
Transformation matrices updates rotation matrix between element-local and primary DOFs...
Definition: element.C:259
virtual int giveNumberOfFirstStep(bool force=false)
Returns number of first time step used by receiver.
Definition: engngm.h:730
virtual void giveElementDofIDMask(IntArray &answer) const
Returns element dof mask for node.
Definition: element.h:498
TimeStep * givePreviousStep()
Returns pointer to previous solution step.
Definition: timestep.C:114
double at(int i, int j) const
Coefficient access function.
Definition: floatmatrix.h:176
void timesMtrx(FloatArray &answer, FloatArray &vec, CharType type, Domain *domain, TimeStep *tStep)
Definition: diidynamic.C:426
Wilson-theta method.
void determineConstants(TimeStep *tStep)
Definition: diidynamic.C:555
virtual void initializeYourself(TimeStep *tStep)
Provides the opportunity to initialize state variables stored in element integration points according...
Definition: diidynamic.C:199
virtual void updateYourself(TimeStep *tStep)
Updates internal state after finishing time step.
#define _IFT_DIIDynamic_gamma
Definition: diidynamic.h:48
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the state of model to output stream.
Definition: engngm.C:1527
Initializes the variable VERBOSE, in order to get a few intermediate messages on screen: beginning an...
TimeDiscretizationType giveTimeDiscretization()
Returns time discretization.
Definition: timestep.h:196
Class representing vector of real numbers.
Definition: floatarray.h:82
SparseLinearSystemNM * createSparseLinSolver(LinSystSolverType st, Domain *d, EngngModel *m)
Creates new instance of SparseLinearSystemNM corresponding to given type.
Definition: classfactory.C:120
elementParallelMode giveParallelMode() const
Return elementParallelMode of receiver.
Definition: element.h:1069
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
#define _IFT_EngngModel_lstype
Definition: engngm.h:81
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
FloatArray previousIncrementOfDisplacement
Definition: diidynamic.h:81
void assemble(const FloatArray &fe, const IntArray &loc)
Assembles the array fe (typically, the load vector of a finite element) into the receiver, using loc as location array.
Definition: floatarray.C:551
int giveNumberOfTimeStepWhenIcApply()
Returns the time step number, when initial conditions should apply.
Definition: engngm.h:754
CharType
Definition: chartype.h:87
DIIDynamic(int i, EngngModel *_master=NULL)
Definition: diidynamic.C:51
Class representing the general Input Record.
Definition: inputrecord.h:101
void add(const FloatMatrix &a)
Adds matrix to the receiver.
Definition: floatmatrix.C:1023
void assembleLoadVector(FloatArray &_loadVector, Domain *domain, ValueModeType mode, TimeStep *tStep)
Definition: diidynamic.C:479
void zero()
Zeroes all coefficients of receiver.
Definition: floatarray.C:658
FloatArray rhs2
Definition: diidynamic.h:78
void setTimeDiscretization(TimeDiscretizationType td)
Sets time discretization.
Definition: timestep.h:163
FloatArray previousVelocityVector
Definition: diidynamic.h:80
ClassFactory & classFactory
Definition: classfactory.C:59
#define _IFT_DIIDynamic_eta
Definition: diidynamic.h:50
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
Element in active domain is only mirror of some remote element.
Definition: element.h:102
This class implements extension of EngngModel for structural models.
Two-point Backward Euler method.
FloatArray accelerationVector
Definition: diidynamic.h:79
FloatArray loadVector
Definition: diidynamic.h:78
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
Definition: diidynamic.C:83
Abstract base class representing the "problem" under consideration.
Definition: engngm.h:181
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:78
virtual TimeStep * giveCurrentStep(bool force=false)
Returns current time step.
Definition: engngm.h:683
int giveSize() const
Definition: intarray.h:203
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode)
Restores the state of model from output stream.
Definition: engngm.C:1592
bool containsOnlyZeroes() const
Returns nonzero if all coefficients of the receiver are 0, else returns zero.
Definition: floatarray.C:646
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
#define IR_GIVE_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:69
virtual void updateYourself(TimeStep *tStep)
Updates internal state after finishing time step.
Definition: diidynamic.C:401
Abstract class Dof represents Degree Of Freedom in finite element mesh.
Definition: dof.h:93
Three-point Backward Euler method.
Callback class for assembling effective tangents composed of stiffness and mass matrix.
int giveNumberOfRows() const
Returns number of rows of receiver.
Definition: floatmatrix.h:156
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
Definition: diidynamic.C:248
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the state of model to output stream.
Definition: diidynamic.C:624
#define OOFEM_WARNING(...)
Definition: error.h:62
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
#define _IFT_DIIDynamic_delta
Definition: diidynamic.h:51
FloatArray help
Definition: diidynamic.h:82
FloatArray rhs
Definition: diidynamic.h:78
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:28 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011