OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
adaptnlinearstatic.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/adaptnlinearstatic.h"
36 #include "mathfem.h"
37 #include "verbose.h"
38 #include "timer.h"
39 #include "metastep.h"
40 #include "timestep.h"
41 #include "nummet.h"
42 #include "element.h"
43 #include "node.h"
44 #include "domain.h"
45 #include "datareader.h"
46 #include "oofemtxtdatareader.h"
47 #include "remeshingcrit.h"
48 #include "mesherinterface.h"
49 #include "dof.h"
51 #include "errorestimator.h"
52 #include "classfactory.h"
53 #include "datastream.h"
54 #include "contextioerr.h"
55 #include "oofem_terminate.h"
56 #include "unknownnumberingscheme.h"
57 
58 #ifdef __PARALLEL_MODE
59  #include "parallelcontext.h"
60  #include "loadbalancer.h"
61 #endif
62 
63 #ifdef __OOFEG
64  #include "oofeggraphiccontext.h"
65 #endif
66 
67 #include <cstdlib>
68 
69 namespace oofem {
70 REGISTER_EngngModel(AdaptiveNonLinearStatic);
71 
73  d2_totalDisplacement(), d2_incrementOfDisplacement(), timeStepLoadLevels()
74 {
75  meshPackage = MPT_T3D;
77 
78 #ifdef __PARALLEL_MODE
79  this->preMappingLoadBalancingFlag = false;
80 #endif
81 }
82 
83 
85 { }
86 
87 
90 {
91  IRResultType result; // Required by IR_GIVE_FIELD macro
92  int _val;
93 
94  int meshPackageId = 0;
96  meshPackage = ( MeshPackageType ) meshPackageId;
97 
100  _val = 0;
102  preMappingLoadBalancingFlag = _val > 0;
103 
105 
106  // check if error estimator initioalized
107  if (this->defaultErrEstimator == NULL) {
108  OOFEM_ERROR ("AdaptiveNonLinearStatic :: initializeFrom: Error estimator not defined [eetype missing]");
109  }
110 
111  return result;
112 }
113 
114 void
116 {
117  proceedStep(1, tStep);
118  this->updateYourself(tStep);
119 
120 #ifdef __OOFEG
121  ESIEventLoop( YES, const_cast< char * >("AdaptiveNonLinearStatic: Solution finished; Press Ctrl-p to continue") );
122 #endif
123 
124  //this->terminate( this->giveCurrentStep() );
125 
126 #ifdef __PARALLEL_MODE
128  this->balanceLoad( this->giveCurrentStep() );
129  }
130 
131 #endif
132 
133  // evaluate error of the reached solution
135  //this->defaultErrEstimator->estimateError( temporaryEM, this->giveCurrentStep() );
138 
139  // if ((strategy == RemeshingFromCurrentState_RS) && (this->giveDomain(1)->giveSerialNumber() == 0))
140  // strategy = RemeshingFromPreviousState_RS;
141 
142  if ( strategy == NoRemeshing_RS ) {
143  //
144  } else if ( ( strategy == RemeshingFromCurrentState_RS ) || ( strategy == RemeshingFromPreviousState_RS ) ) {
145 
146  this->terminate( this->giveCurrentStep() ); // make output
147 
148  // do remeshing
150 
151  Domain *newDomain;
152  MesherInterface :: returnCode result = mesher->createMesh(this->giveCurrentStep(), 1,
153  this->giveDomain(1)->giveSerialNumber() + 1, & newDomain);
154 
155  delete mesher;
156 
157  if ( result == MesherInterface :: MI_OK ) {
158  this->initFlag = 1;
159  this->adaptiveRemap(newDomain);
160  } else if ( result == MesherInterface :: MI_NEEDS_EXTERNAL_ACTION ) {
161  if ( strategy == RemeshingFromCurrentState_RS ) {
162  // ensure the updating the step
164  //this->terminate (this->giveCurrentStep());
165  } else {
166  // save previous step (because update not called)
167  }
168 
169  this->terminateAnalysis();
170  throw OOFEM_Terminate();
171  } else {
172  OOFEM_ERROR("createMesh failed");
173  }
174  }
175 }
176 
177 void
179 {
180  if ( timeStepLoadLevels.isEmpty() ) {
182  }
183 
184  // in case of adaptive restart from given timestep
185  // a time step with same number and incremented version will be generated.
186  // Then load level reached on new discretization will overwrite the old one obtained for
187  // old discretization for this step. But this is consistent, since when initialLoadVector
188  // is requested to be recovered the reference load vectors are assembled
189  // on actual discretization.
191 
193 }
194 
195 
197 {
198  int eq = dof->__giveEquationNumber();
199 #ifdef DEBUG
200  if ( eq == 0 ) {
201  OOFEM_ERROR("invalid equation number");
202  }
203 #endif
204 
205  if ( tStep != this->giveCurrentStep() ) {
206  OOFEM_ERROR("unknown time step encountered");
207  return 0.;
208  }
209 
210  if ( d->giveNumber() == 2 ) {
211  switch ( mode ) {
212  case VM_Incremental:
214  return d2_incrementOfDisplacement.at(eq);
215  } else {
216  return 0.;
217  }
218 
219  case VM_Total:
221  return d2_totalDisplacement.at(eq);
222  } else {
223  return 0.;
224  }
225 
226  default:
227  OOFEM_ERROR("Unknown is of undefined ValueModeType for this problem");
228  }
229  } else {
230  return NonLinearStatic :: giveUnknownComponent(mode, tStep, d, dof);
231  }
232 
233  return 0.0;
234 }
235 
236 
237 int
239 {
240  int result = 1;
241 
242  // measure time consumed by mapping
243  Timer timer;
244  double mc1, mc2, mc3;
245  timer.startTimer();
246 
247  if ( dynamic_cast< AdaptiveNonLinearStatic * >(sourceProblem) ) {
248  OOFEM_ERROR("source problem must also be AdaptiveNonlinearStatic.");
249  }
250 
251  this->currentStep.reset( new TimeStep( * ( sourceProblem->giveCurrentStep() ) ) );
252  if ( sourceProblem->givePreviousStep() ) {
253  this->previousStep.reset( new TimeStep( * ( sourceProblem->givePreviousStep() ) ) );
254  }
255 
256  // map primary unknowns
257  EIPrimaryUnknownMapper mapper;
258 
263 
264  result &= mapper.mapAndUpdate( totalDisplacement, VM_Total,
265  sourceProblem->giveDomain(1), this->giveDomain(1), sourceProblem->giveCurrentStep() );
266 
267  result &= mapper.mapAndUpdate( incrementOfDisplacement, VM_Incremental,
268  sourceProblem->giveDomain(1), this->giveDomain(1), sourceProblem->giveCurrentStep() );
269 
270  timer.stopTimer();
271  mc1 = timer.getUtime();
272  timer.startTimer();
273 
274  // map internal ip state
275  for ( auto &e : this->giveDomain(1)->giveElements() ) {
276  result &= e->adaptiveMap( sourceProblem->giveDomain(1), sourceProblem->giveCurrentStep() );
277  }
278 
279  timer.stopTimer();
280  mc2 = timer.getUtime();
281  timer.startTimer();
282 
283  // computes the stresses and calls updateYourself to mapped state
284  for ( auto &e : this->giveDomain(1)->giveElements() ) {
285  result &= e->adaptiveUpdate(currentStep.get());
286  }
287 
288  // finish mapping process
289  for ( auto &e : this->giveDomain(1)->giveElements() ) {
290  result &= e->adaptiveFinish(currentStep.get());
291  }
292 
293 
294  // increment time step if mapped state will be considered as new solution stepL
295  /*
296  * this->giveNextStep();
297  * if (equilibrateMappedConfigurationFlag) {
298  * // we need to assemble the load vector in same time as the restarted step,
299  * // so new time step is generated with same intrincic time as has the
300  * // previous step if equilibrateMappedConfigurationFlag is set.
301  * // this allows to equlibrate the previously reached state
302  * TimeStep* cts = this->giveCurrentStep();
303  * cts->setTime(cts->giveTime()-cts->giveTimeIncrement());
304  * cts = this->givePreviousStep();
305  * cts->setTime(cts->giveTime()-cts->giveTimeIncrement());
306  * }
307  *
308  *
309  * if (this->giveCurrentStep()->giveNumber() ==
310  * this->giveMetaStep(this->giveCurrentStep()->giveMetaStepNumber())->giveFirstStepNumber()) {
311  * this->updateAttributes (this->giveCurrentStep());
312  * }
313  */
314  this->updateAttributes( this->giveCurrentMetaStep() );
315 
316  // increment solution state counter - not needed, IPs are updated by adaptiveUpdate previously called
317  // and there is no change in primary vars.
318  // this->giveCurrentStep()->incrementStateCounter();
319 
320  // assemble new initial load for new discretization
322  static_cast< AdaptiveNonLinearStatic * >(sourceProblem), 1, this->giveCurrentStep() );
323  // assemble new total load for new discretization
324  // this->assembleCurrentTotalLoadVector (totalLoadVector, totalLoadVectorOfPrescribed, this->giveCurrentStep());
325  // set bcloadVector to zero (no increment within same step)
326 
327  timer.stopTimer();
328  mc3 = timer.getUtime();
329 
330  // compute processor time used by the program
331  OOFEM_LOG_INFO("user time consumed by primary mapping: %.2fs\n", mc1);
332  OOFEM_LOG_INFO("user time consumed by ip mapping: %.2fs\n", mc2);
333  OOFEM_LOG_INFO("user time consumed by ip update: %.2fs\n", mc3);
334  OOFEM_LOG_INFO("user time consumed by mapping: %.2fs\n", mc1 + mc2 + mc3);
335 
336  //
337 
338  //
339  // bring mapped configuration into equilibrium
340  //
342  // use secant stiffness to resrore equilibrium
343  NonLinearStatic_stiffnessMode oldStiffMode = this->stiffMode;
345 
346 
347 
348  if ( initFlag ) {
350  if ( !stiffnessMatrix ) {
351  OOFEM_ERROR("sparse matrix creation failed");
352  }
353 
354  if ( nonlocalStiffnessFlag ) {
355  if ( !stiffnessMatrix->isAsymmetric() ) {
356  OOFEM_ERROR("stiffnessMatrix does not support asymmetric storage");
357  }
358  }
359 
360  stiffnessMatrix->buildInternalStructure( this, 1, EModelDefaultEquationNumbering() );
361  stiffnessMatrix->zero(); // zero stiffness matrix
362  this->assemble( *stiffnessMatrix, this->giveCurrentStep(), TangentAssembler(SecantStiffness),
364  initFlag = 0;
365  }
366 
367  // updateYourself() not necessary - the adaptiveUpdate previously called does the job
368  //this->updateYourself(this->giveCurrentStep());
369 #ifdef VERBOSE
370  OOFEM_LOG_INFO( "Equilibrating mapped configuration [step number %5d.%d]\n",
371  this->giveCurrentStep()->giveNumber(), this->giveCurrentStep()->giveVersion() );
372 #endif
373 
374  //double deltaL = nMethod->giveUnknownComponent (StepLength, 0);
375  double deltaL = nMethod->giveCurrentStepLength();
377  refLoadInputMode, this->giveDomain(1), this->giveCurrentStep() );
378  //
379  // call numerical model to solve arised problem
380  //
381 #ifdef VERBOSE
382  OOFEM_LOG_RELEVANT( "Solving [step number %5d.%d]\n",
383  this->giveCurrentStep()->giveNumber(), this->giveCurrentStep()->giveVersion() );
384 #endif
385 
386  //nMethod -> solveYourselfAt(this->giveCurrentStep()) ;
387  nMethod->setStepLength(deltaL / 5.0);
388  if ( initialLoadVector.isNotEmpty() ) {
392  } else {
396  }
397 
398 
399  loadVector.zero();
400 
401  this->updateYourself( this->giveCurrentStep() );
402  this->terminate( this->giveCurrentStep() );
403  this->updateLoadVectors( this->giveCurrentStep() );
404 
405  // restore old step length
406  nMethod->setStepLength(deltaL);
407 
408  stiffMode = oldStiffMode;
409  } else {
410  // comment this, if output for mapped configuration (not equilibrated) not wanted
411  this->printOutputAt( this->giveOutputStream(), this->giveCurrentStep() );
412  }
413 
414  return result;
415 }
416 
417 
418 int
420 {
421  try {
422  FileDataStream stream(this->giveContextFileName(tStepNumber, 0), false);
423  this->restoreContext(stream, CM_State);
424  } catch(ContextIOERR & c) {
425  c.print();
426  exit(1);
427  }
428 
429  this->initStepIncrements();
430 
431  int sernum = this->giveDomain(1)->giveSerialNumber();
432  OOFEM_LOG_INFO("restoring domain %d.%d\n", 1, sernum + 1);
433  Domain *dNew = new Domain(2, sernum + 1, this);
434  OOFEMTXTDataReader domainDr(this->giveDomainFileName(1, sernum + 1));
435  if ( !dNew->instanciateYourself(domainDr) ) {
436  OOFEM_ERROR("domain Instanciation failed");
437  }
438 
439  // remap solution to new domain
440  return this->adaptiveRemap(dNew);
441 }
442 
443 
444 int
446 {
447  int result = 1;
448 
449  this->initStepIncrements();
450 
451  this->ndomains = 2;
452  this->domainNeqs.resize(2);
453  this->domainPrescribedNeqs.resize(2);
454  this->domainNeqs.at(2) = 0;
455  this->domainPrescribedNeqs.at(2) = 0;
456  this->domainList.emplace(domainList.begin() + 1, dNew);
457  this->parallelContextList.emplace(parallelContextList.begin() + 1, this);
458 
459  // init equation numbering
460  //this->forceEquationNumbering(2);
461  this->forceEquationNumbering();
462 
463  // measure time consumed by mapping
464  Timer timer;
465  double mc1, mc2, mc3;
466 
467  timer.startTimer();
468 
469  // map primary unknowns
470  EIPrimaryUnknownMapper mapper;
471 
476 
477  result &= mapper.mapAndUpdate( d2_totalDisplacement, VM_Total,
478  this->giveDomain(1), this->giveDomain(2), this->giveCurrentStep() );
479 
480  result &= mapper.mapAndUpdate( d2_incrementOfDisplacement, VM_Incremental,
481  this->giveDomain(1), this->giveDomain(2), this->giveCurrentStep() );
482 
483  timer.stopTimer();
484  mc1 = timer.getUtime();
485  timer.startTimer();
486 
487  // map internal ip state
488  for ( auto &e : this->giveDomain(2)->giveElements() ) {
489  /* HUHU CHEATING */
490 
491  if ( e->giveParallelMode() == Element_remote ) {
492  continue;
493  }
494 
495  result &= e->adaptiveMap( this->giveDomain(1), this->giveCurrentStep() );
496  }
497 
498  /* replace domains */
499  OOFEM_LOG_DEBUG("deleting old domain\n");
500  //delete domainList->at(1);
501  //domainList->put(1, dNew);
502  //dNew->setNumber(1);
503  //domainList->put(2, NULL);
504 
505  //domainList[0] = std :: move(domainList[1]);
506  domainList.erase(domainList.begin());
507  domainList[0]->setNumber(1);
508 
510 
511  // keep equation numbering of new domain
512  this->numberOfEquations = this->domainNeqs.at(1) = this->domainNeqs.at(2);
514  this->equationNumberingCompleted = 1;
515 
516  // update solution
519 
520 
521  this->ndomains = 1;
522  // init equation numbering
523  // this->forceEquationNumbering();
524  this->updateDomainLinks();
525 
526 #ifdef __PARALLEL_MODE
527  if ( isParallel() ) {
528  // set up communication patterns
529  this->initializeCommMaps(true);
531  }
532 
533 #endif
534 
535  timer.stopTimer();
536  mc2 = timer.getUtime();
537  timer.startTimer();
538 
539  // computes the stresses and calls updateYourself to mapped state
540  for ( auto &e : this->giveDomain(1)->giveElements() ) {
541  /* HUHU CHEATING */
542  if ( e->giveParallelMode() == Element_remote ) {
543  continue;
544  }
545 
546  result &= e->adaptiveUpdate( this->giveCurrentStep() );
547  }
548 
549  // finish mapping process
550  for ( auto &e : this->giveDomain(1)->giveElements() ) {
551  /* HUHU CHEATING */
552  if ( e->giveParallelMode() == Element_remote ) {
553  continue;
554  }
555 
556  result &= e->adaptiveFinish( this->giveCurrentStep() );
557  }
558 
560 
561 
562  // increment time step if mapped state will be considered as new solution stepL
563  // this->giveNextStep();
565  // we need to assemble the load vector in same time as the restarted step,
566  // so new time step is generated with same intrincic time as has the
567  // previous step if equilibrateMappedConfigurationFlag is set.
568  // this allows to equlibrate the previously reached state
569  TimeStep *cts = this->giveCurrentStep();
570  // increment version of solution step
571  cts->incrementVersion();
572 
573  //cts->setTime(cts->giveTime()-cts->giveTimeIncrement());
574  //cts = this->givePreviousStep();
575  //cts->setTime(cts->giveTime()-cts->giveTimeIncrement());
576  }
577 
578  if ( this->giveCurrentStep()->giveNumber() == this->giveCurrentMetaStep()->giveFirstStepNumber() ) {
579  this->updateAttributes( this->giveCurrentMetaStep() );
580  }
581 
582  // increment solution state counter - not needed, IPs are updated by adaptiveUpdate previously called
583  // and there is no change in primary vars.
584  // this->giveCurrentStep()->incrementStateCounter();
585 
586  // assemble new initial load for new discretization
588  this, 1, this->giveCurrentStep() );
590  refLoadInputMode, this->giveDomain(1),
591  this->giveCurrentStep() );
592 
593  // assemble new total load for new discretization
594  // this->assembleCurrentTotalLoadVector (totalLoadVector, totalLoadVectorOfPrescribed, this->giveCurrentStep());
595  // set bcloadVector to zero (no increment within same step)
596 
597  timer.stopTimer();
598  mc3 = timer.getUtime();
599 
600  // compute processor time used by the program
601  OOFEM_LOG_INFO("user time consumed by primary mapping: %.2fs\n", mc1);
602  OOFEM_LOG_INFO("user time consumed by ip mapping: %.2fs\n", mc2);
603  OOFEM_LOG_INFO("user time consumed by ip update: %.2fs\n", mc3);
604  OOFEM_LOG_INFO("user time consumed by mapping: %.2fs\n", mc1 + mc2 + mc3);
605 
606  //
607 
608  /********
609  * #if 0
610  * {
611  *
612  * // evaluate the force error of mapped configuration
613  * this->updateComponent (this->giveCurrentStep(), InternalRhs);
614  * FloatArray rhs;
615  *
616  * loadVector.resize (this->numberOfEquations);
617  * loadVector.zero();
618  * this->assemble (loadVector, this->giveCurrentStep(), ExternalForcesVector_Total, this->giveDomain(1)) ;
619  * this->assemble (loadVector, this->giveCurrentStep(), ExternalForcesVector_Total, this->giveDomain(1));
620  *
621  * rhs = loadVector;
622  * rhs.times(loadLevel);
623  * if (initialLoadVector.isNotEmpty()) rhs.add(initialLoadVector);
624  * rhs.subtract(internalForces);
625  *
626  * //
627  * // compute forceError
628  * //
629  * // err is relative error of unbalanced forces
630  * double RR, RR0, forceErr = dotProduct (rhs.givePointer(),rhs.givePointer(),rhs.giveSize());
631  * if (initialLoadVector.isNotEmpty())
632  * RR0 = dotProduct (initialLoadVector.givePointer(), initialLoadVector.givePointer(), initialLoadVector.giveSize());
633  * else
634  * RR0 = 0.0;
635  * RR = dotProduct(loadVector.givePointer(),loadVector.givePointer(),loadVector.giveSize());
636  * // we compute a relative error norm
637  * if ((RR0 + RR * loadLevel * loadLevel) < calm_SMALL_NUM) forceErr = 0.;
638  * else forceErr = sqrt (forceErr / (RR0+RR * loadLevel * loadLevel));
639  *
640  * printf ("Relative Force Error of Mapped Configuration is %-15e\n", forceErr);
641  *
642  * }
643  **#endif
644  *************/
645 
646 #ifdef __OOFEG
647  ESIEventLoop( YES, const_cast< char * >("AdaptiveRemap: Press Ctrl-p to continue") );
648 #endif
649 
650  //
651  // bring mapped configuration into equilibrium
652  //
654  // use secant stiffness to resrore equilibrium
655  NonLinearStatic_stiffnessMode oldStiffMode = this->stiffMode;
657 
658 
659 
660  if ( initFlag ) {
661  if ( !stiffnessMatrix ) {
663  if ( !stiffnessMatrix ) {
664  OOFEM_ERROR("sparse matrix creation failed");
665  }
666  }
667 
668  if ( nonlocalStiffnessFlag ) {
669  if ( !stiffnessMatrix->isAsymmetric() ) {
670  OOFEM_ERROR("stiffnessMatrix does not support asymmetric storage");
671  }
672  }
673 
674  stiffnessMatrix->buildInternalStructure( this, 1, EModelDefaultEquationNumbering() );
675  stiffnessMatrix->zero(); // zero stiffness matrix
676  this->assemble( *stiffnessMatrix, this->giveCurrentStep(), TangentAssembler(SecantStiffness),
678 
679  initFlag = 0;
680  }
681 
682  // updateYourself() not necessary - the adaptiveUpdate previously called does the job
683  //this->updateYourself(this->giveCurrentStep());
684 #ifdef VERBOSE
685  OOFEM_LOG_INFO( "Equilibrating mapped configuration [step number %5d.%d]\n",
686  this->giveCurrentStep()->giveNumber(), this->giveCurrentStep()->giveVersion() );
687 #endif
688 
689  //double deltaL = nMethod->giveUnknownComponent (StepLength, 0);
690  double deltaL = nMethod->giveCurrentStepLength();
691  //
692  // call numerical model to solve arised problem
693  //
694 #ifdef VERBOSE
695  OOFEM_LOG_RELEVANT( "Solving [step number %5d.%d]\n",
696  this->giveCurrentStep()->giveNumber(), this->giveCurrentStep()->giveVersion() );
697 #endif
698 
699  //nMethod -> solveYourselfAt(this->giveCurrentStep()) ;
700  nMethod->setStepLength(deltaL / 5.0);
701  if ( initialLoadVector.isNotEmpty() ) {
705  } else {
709  }
710 
711 
712  loadVector.zero();
713 
714  this->updateYourself( this->giveCurrentStep() );
715  this->terminate( this->giveCurrentStep() );
716  // this->updateLoadVectors (this->giveCurrentStep()); // already in terminate
717 
718  // restore old step length
719  nMethod->setStepLength(deltaL);
720 
721  stiffMode = oldStiffMode;
722  } else {
723  // comment this, if output for mapped configuration (not equilibrated) not wanted
724  this->printOutputAt( this->giveOutputStream(), this->giveCurrentStep() );
725  }
726 
727  return result;
728 }
729 
730 
733 {
734  contextIOResultType iores;
735 
736  if ( ( iores = NonLinearStatic :: saveContext(stream, mode) ) != CIO_OK ) {
737  THROW_CIOERR(iores);
738  }
739 
740  if ( ( iores = timeStepLoadLevels.storeYourself(stream) ) != CIO_OK ) {
741  THROW_CIOERR(iores);
742  }
743 
744  return CIO_OK;
745 }
746 
749 {
750  contextIOResultType iores;
751 
752  if ( ( iores = NonLinearStatic :: restoreContext(stream, mode) ) != CIO_OK ) {
753  THROW_CIOERR(iores);
754  }
755 
756  if ( ( iores = timeStepLoadLevels.restoreYourself(stream) ) != CIO_OK ) {
757  THROW_CIOERR(iores);
758  }
759 
760  return CIO_OK;
761 }
762 
763 
764 void
766 {
768  this->defaultErrEstimator->setDomain( this->giveDomain(1) );
769 }
770 
771 
772 void
774  AdaptiveNonLinearStatic *sourceProblem, int domainIndx,
775  TimeStep *tStep)
776 {
777  IRResultType result; // Required by IR_GIVE_FIELD macro
778 
779  int mStepNum = tStep->giveMetaStepNumber();
780  int hasfixed, mode;
781  InputRecord *ir;
782  MetaStep *iMStep;
783  FloatArray _incrementalLoadVector, _incrementalLoadVectorOfPrescribed;
785  //Domain* sourceDomain = sourceProblem->giveDomain(domainIndx);
786 
787  loadVector.resize( this->giveNumberOfDomainEquations( domainIndx, EModelDefaultEquationNumbering() ) );
788  loadVectorOfPrescribed.resize( this->giveNumberOfDomainEquations( domainIndx, EModelDefaultPrescribedEquationNumbering() ) );
789  loadVector.zero();
790  loadVectorOfPrescribed.zero();
791  _incrementalLoadVector.resize( this->giveNumberOfDomainEquations( domainIndx, EModelDefaultEquationNumbering() ) );
792  _incrementalLoadVectorOfPrescribed.resize( this->giveNumberOfDomainEquations( domainIndx, EModelDefaultPrescribedEquationNumbering() ) );
793  _incrementalLoadVector.zero();
794  _incrementalLoadVectorOfPrescribed.zero();
795 
796  for ( int imstep = 1; imstep < mStepNum; imstep++ ) {
797  iMStep = this->giveMetaStep(imstep);
798  ir = iMStep->giveAttributesRecord();
799  //hasfixed = ir->hasField("fixload");
800  hasfixed = 1;
801  if ( hasfixed ) {
802  // test for control mode
803  // here the algorithm works only for direct load control.
804  // Direct displacement control requires to know the quasi-rections, and the controlled nodes
805  // should have corresponding node on new mesh -> not supported
806  // Indirect control -> the load level from prevous steps is required, currently nt supported.
807 
808  // additional problem: direct load control supports the reduction of step legth if convergence fails
809  // if this happens, this implementation does not work correctly.
810  // But there is NO WAY HOW TO TEST IF THIS HAPPEN
811 
812  mode = 0;
814 
815  // check if displacement control takes place
817  OOFEM_ERROR("fixload recovery not supported for direct displacement control");
818  }
819 
820  int firststep = iMStep->giveFirstStepNumber();
821  int laststep = iMStep->giveLastStepNumber();
822 
823  int _val = 0;
826 
827  if ( mode == ( int ) nls_directControl ) { // and only load control
828  for ( int istep = firststep; istep <= laststep; istep++ ) {
829  // bad practise here
831  TimeStep *old = new TimeStep(istep, this, imstep, istep - 1.0, deltaT, 0);
832  this->assembleIncrementalReferenceLoadVectors(_incrementalLoadVector, _incrementalLoadVectorOfPrescribed,
833  rlm, this->giveDomain(domainIndx), old);
834 
835  _incrementalLoadVector.times( sourceProblem->giveTimeStepLoadLevel(istep) );
836  loadVector.add(_incrementalLoadVector);
837  loadVectorOfPrescribed.add(_incrementalLoadVectorOfPrescribed);
838  }
839  } else if ( mode == ( int ) nls_indirectControl ) {
840  // bad practise here
842  TimeStep *old = new TimeStep(firststep, this, imstep, firststep - 1.0, deltaT, 0);
843  this->assembleIncrementalReferenceLoadVectors(_incrementalLoadVector, _incrementalLoadVectorOfPrescribed,
844  rlm, this->giveDomain(domainIndx), old);
845 
846  _incrementalLoadVector.times( sourceProblem->giveTimeStepLoadLevel(laststep) );
847  loadVector.add(_incrementalLoadVector);
848  loadVectorOfPrescribed.add(_incrementalLoadVectorOfPrescribed);
849  }
850  } else {
851  OOFEM_ERROR("fixload recovery not supported");
852  }
853  }
854  } // end loop over meta-steps
855 
856  /* if direct control; add to initial load also previous steps in same metestep */
857  iMStep = this->giveMetaStep(mStepNum);
858  ir = iMStep->giveAttributesRecord();
859  mode = 0;
861  int firststep = iMStep->giveFirstStepNumber();
862  int laststep = tStep->giveNumber();
863  int _val = 0;
866 
867  if ( mode == ( int ) nls_directControl ) { // and only load control
868  for ( int istep = firststep; istep <= laststep; istep++ ) {
869  // bad practise here
870  TimeStep *old = new TimeStep(istep, this, mStepNum, istep - 1.0, deltaT, 0);
871  this->assembleIncrementalReferenceLoadVectors(_incrementalLoadVector, _incrementalLoadVectorOfPrescribed,
872  rlm, this->giveDomain(domainIndx), old);
873 
874  _incrementalLoadVector.times( sourceProblem->giveTimeStepLoadLevel(istep) );
875  loadVector.add(_incrementalLoadVector);
876  loadVectorOfPrescribed.add(_incrementalLoadVectorOfPrescribed);
877  }
878  }
879 }
880 
881 /*
882  * void
883  * AdaptiveNonLinearStatic::assembleCurrentTotalLoadVector (FloatArray& loadVector,
884  * FloatArray& loadVectorOfPrescribed,
885  * AdaptiveNonLinearStatic* sourceProblem, int domainIndx,
886  * TimeStep* tStep)
887  * {
888  * IRResultType result; // Required by IR_GIVE_FIELD macro
889  *
890  * int mStepNum = tStep->giveMetaStepNumber() ;
891  * int mode;
892  * InputRecord* ir;
893  * MetaStep* mStep = sourceProblem->giveMetaStep(mStepNum);
894  * FloatArray _incrementalLoadVector, _incrementalLoadVectorOfPrescribed;
895  * SparseNonLinearSystemNM::referenceLoadInputModeType rlm;
896  * //Domain* sourceDomain = sourceProblem->giveDomain(domainIndx);
897  *
898  * loadVector.resize(this->giveNumberOfDomainEquations());
899  * loadVectorOfPrescribed.resize(this->giveNumberOfPrescribedDomainEquations());
900  * loadVector.zero(); loadVectorOfPrescribed.zero();
901  * _incrementalLoadVector.resize(this->giveNumberOfDomainEquations());
902  * _incrementalLoadVectorOfPrescribed.resize(this->giveNumberOfPrescribedDomainEquations());
903  * _incrementalLoadVector.zero(); _incrementalLoadVectorOfPrescribed.zero();
904  *
905  * // ASK CURRENT MSTEP FOR ITS RECORD
906  * ir = mStep->giveAttributesRecord();
907  *
908  * mode = 0;
909  * IR_GIVE_OPTIONAL_FIELD (ir, mode, _IFT_AdaptiveNonLinearStatic_controlmode, "controlmode");
910  *
911  * // check if displacement control takes place
912  * if (ir->hasField(_IFT_AdaptiveNonLinearStatic_ddm, "ddm"))
913  * OOFEM_ERROR("fixload recovery not supported for direct displacement control");
914  * int _val = 0;
915  * IR_GIVE_OPTIONAL_FIELD (ir, _val, _IFT_AdaptiveNonLinearStatic_refloadmode, "refloadmode");
916  *
917  * int firststep = mStep->giveFirstStepNumber();
918  * int laststep = tStep->giveNumber()-1;
919  *
920  * rlm = (SparseNonLinearSystemNM::referenceLoadInputModeType) _val;
921  *
922  * if (mode == (int)nls_directControl) { // and only load control
923  * for (int istep = firststep; istep<=laststep; istep++) {
924  * // bad practise here
925  * TimeStep* old = new TimeStep (istep, this, mStepNum, istep-1.0, deltaT, 0);
926  * this->assembleIncrementalReferenceLoadVectors (_incrementalLoadVector, _incrementalLoadVectorOfPrescribed,
927  * rlm, this->giveDomain(domainIndx), old);
928  *
929  * _incrementalLoadVector.times(sourceProblem->giveTimeStepLoadLevel(istep));
930  * loadVector.add(_incrementalLoadVector);
931  * loadVectorOfPrescribed.add(_incrementalLoadVectorOfPrescribed);
932  * }
933  * } else if (mode == (int)nls_indirectControl) {
934  * // bad practise here
935  * TimeStep* old = new TimeStep (firststep, this, mStepNum, firststep-1.0, deltaT, 0);
936  * this->assembleIncrementalReferenceLoadVectors (_incrementalLoadVector, _incrementalLoadVectorOfPrescribed,
937  * rlm, this->giveDomain(domainIndx), old);
938  *
939  * _incrementalLoadVector.times(sourceProblem->giveTimeStepLoadLevel(laststep));
940  * loadVector.add(_incrementalLoadVector);
941  * loadVectorOfPrescribed.add(_incrementalLoadVectorOfPrescribed);
942  * } else {
943  * OOFEM_ERROR("totalload recovery not supported");
944  * }
945  *
946  *
947  * }
948  */
949 
950 
951 double
953 {
954  if ( ( istep >= this->giveNumberOfFirstStep() ) && ( istep <= this->giveNumberOfSteps() ) ) {
955  return timeStepLoadLevels.at(istep);
956  } else {
957  OOFEM_ERROR("solution step out of range");
958  }
959 
960  return 0.0; // to make compiler happy
961 }
962 
963 
964 #ifdef __PARALLEL_MODE
965 LoadBalancer *
967 {
968  if ( lb ) {
969  return lb;
970  }
971 
973  lb = classFactory.createLoadBalancer( "parmetis", this->giveDomain(1) );
974  return lb;
975  } else {
976  return NULL;
977  }
978 }
981 {
982  if ( lbm ) {
983  return lbm;
984  }
985 
987  lbm = classFactory.createLoadBalancerMonitor( "wallclock", this);
988  return lbm;
989  } else {
990  return NULL;
991  }
992 }
993 #endif
994 } // end namespace oofem
virtual void updateYourself(TimeStep *tStep)
Updates internal state after finishing time step.
EngngModelTimer timer
E-model timer.
Definition: engngm.h:267
void setDomain(Domain *d)
Sets Domain; should also re-initialize attributes if necessary.
The representation of EngngModel default unknown numbering.
std::string giveContextFileName(int tStepNumber, int stepVersion) const
Returns the filename for the context file for the given step and version.
Definition: engngm.C:1691
LoadBalancer * createLoadBalancer(const char *name, Domain *d)
Definition: classfactory.C:457
std::unique_ptr< TimeStep > currentStep
Current time step.
Definition: engngm.h:231
#define _IFT_AdaptiveNonLinearStatic_meshpackage
InputRecord * giveAttributesRecord()
Returns e-model attributes.
Definition: metastep.h:95
Implementation of FileDataStream representing DataStream interface to file i/o.
Definition: datastream.h:136
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
LoadBalancerMonitor * lbm
Definition: engngm.h:293
Class representing meta step.
Definition: metastep.h:62
The class implementing the primary unknown mapper using element interpolation functions.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the state of model to output stream.
SparseMtrx * createSparseMtrx(SparseMtrxType type)
Creates new instance of sparse matrix corresponding to given keyword.
Definition: classfactory.C:105
void incrementVersion()
Increments receiver&#39;s version.
Definition: timestep.h:192
virtual double giveCurrentStepLength()
Returns step length.
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::vector< std::unique_ptr< Domain > > domainList
List of problem domains.
Definition: engngm.h:207
std::unique_ptr< TimeStep > previousStep
Previous time step.
Definition: engngm.h:233
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
virtual LoadBalancerMonitor * giveLoadBalancerMonitor()
Returns reference to receiver&#39;s load balancer monitor.
#define CM_State
Definition: contextmode.h:46
AdaptiveNonLinearStatic(int i, EngngModel *_master=NULL)
NonLinearStatic_stiffnessMode stiffMode
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.
ErrorEstimator * defaultErrEstimator
Error estimator. Useful for adaptivity, or simply printing errors output.
Definition: engngm.h:273
bool isParallel() const
Returns true if receiver in parallel mode.
Definition: engngm.h:1056
virtual void setStepLength(double s)
Sets the step length.
virtual RemeshingStrategy giveRemeshingStrategy(TimeStep *tStep)=0
Determines, if the remeshing is needed, and if needed, the type of strategy used. ...
virtual returnCode createMesh(TimeStep *tStep, int domainNumber, int domainSerNum, Domain **dNew)=0
Runs the mesh generation, mesh will be written to corresponding domain din file.
int giveNumber()
Returns domain number.
Definition: domain.h:266
virtual int __giveEquationNumber() const =0
Returns equation number of receiver, usually assigned by emodel.
virtual double giveTimeStepLoadLevel(int istep)
Returns the load level corresponding to given solution step number.
virtual double giveUnknownComponent(ValueModeType type, TimeStep *tStep, Domain *d, Dof *dof)
Returns requested unknown.
REGISTER_EngngModel(ProblemSequence)
virtual void terminate(TimeStep *tStep)
Terminates the solution of time step.
#define OOFEM_LOG_DEBUG(...)
Definition: logger.h:128
int & at(int i)
Coefficient access function.
Definition: intarray.h:103
virtual int estimateMeshDensities(TimeStep *tStep)=0
Estimates the nodal densities.
FloatArray incrementalLoadVector
Incremental load vector which is applied in loading step (as a whole for direct control or proportion...
#define THROW_CIOERR(e)
Definition: contextioerr.h:61
NonLinearStatic_stiffnessMode
Type determining the stiffness mode.
Definition: nlinearstatic.h:59
#define OOFEM_LOG_RELEVANT(...)
Definition: logger.h:126
FloatArray initialLoadVectorOfPrescribed
A load vector which does not scale for prescribed DOFs.
FloatArray incrementalLoadVectorOfPrescribed
Incremental Load Vector for prescribed DOFs.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
virtual void initStepIncrements()
Initializes solution of new time step.
Definition: engngm.C:1496
SparseNonLinearSystemNM::referenceLoadInputModeType refLoadInputMode
The following parameter allows to specify how the reference load vector is obtained from given totalL...
int giveLastStepNumber()
Returns last step number.
Definition: metastep.h:111
FloatArray loadVector
Definition: linearstatic.h:67
void assembleIncrementalReferenceLoadVectors(FloatArray &_incrementalLoadVector, FloatArray &_incrementalLoadVectorOfPrescribed, SparseNonLinearSystemNM::referenceLoadInputModeType _refMode, Domain *sourceDomain, TimeStep *tStep)
OOFEM terminate exception class.
virtual double giveUnknownComponent(ValueModeType mode, TimeStep *tStep, Domain *d, Dof *dof)
Returns requested unknown.
bool loadBalancingFlag
If set to true, load balancing is active.
Definition: engngm.h:295
void assembleInitialLoadVector(FloatArray &loadVector, FloatArray &loadVectorOfPrescribed, AdaptiveNonLinearStatic *sourceProblem, int domainIndx, TimeStep *tStep)
MetaStep * giveCurrentMetaStep()
Returns current meta step.
Definition: engngm.C:1684
#define OOFEM_LOG_INFO(...)
Definition: logger.h:127
int giveNumber()
Returns receiver&#39;s number.
Definition: timestep.h:129
FILE * giveOutputStream()
Returns file descriptor of output file.
Definition: engngm.C:1791
void proceedStep(int di, TimeStep *tStep)
IntArray domainPrescribedNeqs
Number of prescribed equations per domain.
Definition: engngm.h:217
SparseNonLinearSystemNM * nMethod
Numerical method used to solve the problem.
#define OOFEM_ERROR(...)
Definition: error.h:61
int giveFirstStepNumber()
Returns first step number.
Definition: metastep.h:109
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
int ndomains
Number of receiver domains.
Definition: engngm.h:205
The base class representing the interface to mesh generation package.
virtual void balanceLoad(TimeStep *tStep)
Recovers the load balance between processors, if needed.
Definition: engngm.C:2035
virtual int estimateError(EE_ErrorMode mode, TimeStep *tStep)=0
Estimates the error on associated domain at given time step.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the state of model to output stream.
#define _IFT_AdaptiveNonLinearStatic_equilmc
int equilibrateMappedConfigurationFlag
Flag indication whether to restore equilibrium after adaptive remapping.
contextIOResultType restoreYourself(DataStream &stream)
Definition: floatarray.C:895
int giveNumberOfSteps(bool force=false)
Returns total number of steps.
Definition: engngm.h:744
FloatArray totalDisplacement
Definition: nlinearstatic.h:92
virtual int giveNumberOfFirstStep(bool force=false)
Returns number of first time step used by receiver.
Definition: engngm.h:730
Enable for post-processing.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Prints output of receiver to output domain stream, for given time step.
referenceLoadInputModeType
The following parameter allows to specify how the reference load vector is obtained from given totalL...
virtual RemeshingCriteria * giveRemeshingCrit()=0
Returns reference to associated remeshing criteria.
SparseMtrxType sparseMtrxType
Definition: linearstatic.h:71
bool isEmpty() const
Returns true if receiver is empty.
Definition: floatarray.h:222
void resize(int n)
Checks size of receiver towards requested bounds.
Definition: intarray.C:124
#define _IFT_AdaptiveNonLinearStatic_controlmode
FloatArray timeStepLoadLevels
Array storing the load levels reached in corresponding time steps.
double deltaT
Intrinsic time increment.
void terminateAnalysis()
Performs analysis termination after finishing analysis.
Definition: engngm.C:1819
Abstract base class representing general load balancer.
Definition: loadbalancer.h:108
MesherInterface * createMesherInterface(MeshPackageType name, Domain *d)
Definition: classfactory.C:441
virtual void updateYourself(TimeStep *tStep)
Updates internal state after finishing time step.
Describes the direct control where load or displacement (or both) are controlled. ...
Definition: nlinearstatic.h:68
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...
std::string giveDomainFileName(int domainNum, int domainSerNum) const
Returns the filename for the given domain (used by adaptivity and restore)
Definition: engngm.C:1701
Class representing vector of real numbers.
Definition: floatarray.h:82
virtual int initializeAdaptiveFrom(EngngModel *sourceProblem)
Initializes the receiver state according to state of given source problem.
RemeshingStrategy
Type representing the remeshing strategy.
Definition: remeshingcrit.h:50
int giveSerialNumber()
Returns domain serial (version) number.
Definition: domain.h:270
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
IntArray domainNeqs
Number of equations per domain.
Definition: engngm.h:215
virtual void updateDomainLinks()
Updates domain links after the domains of receiver have changed.
virtual int adaptiveRemap(Domain *dNew)
Remaps the solution state to newly given domain.
FloatArray incrementOfDisplacement
Definition: nlinearstatic.h:92
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
std::unique_ptr< SparseMtrx > stiffnessMatrix
Definition: linearstatic.h:66
int instanciateYourself(DataReader &dr)
Reads receiver description from input stream and creates corresponding components accordingly...
Definition: domain.C:468
int giveMetaStepNumber()
Returns receiver&#39;s meta step number.
Definition: timestep.h:135
virtual void reinitialize()
Reinitializes the receiver.
Definition: nummet.h:112
Class representing the general Input Record.
Definition: inputrecord.h:101
The representation of EngngModel default prescribed unknown numbering.
virtual int mapAndUpdate(FloatArray &answer, ValueModeType mode, Domain *oldd, Domain *newd, TimeStep *tStep)
Maps and updates the vector(s) of primary unknowns from old mesh oldd to new mesh newd...
virtual LoadBalancer * giveLoadBalancer()
Returns reference to receiver&#39;s load balancer.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode)
Restores the state of model from output stream.
#define _IFT_AdaptiveNonLinearStatic_preMappingLoadBalancingFlag
void zero()
Zeroes all coefficients of receiver.
Definition: floatarray.C:658
Class implementing single timer, providing wall clock and user time capabilities. ...
Definition: timer.h:46
void times(double s)
Multiplies receiver with scalar.
Definition: floatarray.C:818
void initializeCommMaps(bool forceInit=false)
Definition: engngm.C:1942
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
LoadBalancerMonitor * createLoadBalancerMonitor(const char *name, EngngModel *e)
Definition: classfactory.C:447
LoadBalancer * lb
Load Balancer.
Definition: engngm.h:292
Element in active domain is only mirror of some remote element.
Definition: element.h:102
virtual TimeStep * givePreviousStep(bool force=false)
Returns previous time step.
Definition: engngm.h:693
virtual void assemble(SparseMtrx &answer, TimeStep *tStep, const MatrixAssembler &ma, const UnknownNumberingScheme &, Domain *domain)
Assembles characteristic matrix of required type into given sparse matrix.
This class implements nonlinear static engineering problem.
Definition: nlinearstatic.h:88
FloatArray internalForcesEBENorm
Norm of nodal internal forces evaluated on element by element basis (squared)
MeshPackageType
Enumerative type used to classify supported mesh packages.
A generalized norm of displacement and loading vectors is controlled. In current implementation, the CALM solver is used, the reference load vector is FIXED.
Definition: nlinearstatic.h:67
std::vector< std::unique_ptr< Element > > & giveElements()
Definition: domain.h:279
void setContextOutputMode(ContextOutputMode contextMode)
Sets context output mode of receiver.
Definition: engngm.h:388
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
The secant stiffness is used and updated whenever requested.
Definition: nlinearstatic.h:61
int exchangeRemoteElementData(int ExchangeTag)
Exchanges necessary remote element data with remote partitions.
Definition: engngm.C:1996
Class representing the implementation of plain text date reader.
virtual int initializeAdaptive(int tStepNumber)
Initializes the newly generated discretization state according to previous solution.
virtual void updateAttributes(MetaStep *mStep)
Update receiver attributes according to step metaStep attributes.
the oofem namespace is to define a context or scope in which all oofem names are defined.
bool isNotEmpty() const
Returns true if receiver is not empty.
Definition: floatarray.h:220
virtual void updateLoadVectors(TimeStep *tStep)
Domain * giveDomain(int n)
Service for accessing particular problem domain.
Definition: engngm.C:1720
FloatArray initialLoadVector
A load vector already applied, which does not scales.
Definition: nlinearstatic.h:96
bool preMappingLoadBalancingFlag
Flag to trigger load balancing before adaptive remapping.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
Definition: dof.h:93
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode)
Restores the state of model from output stream.
virtual void updateDomainLinks()
Updates domain links after the domains of receiver have changed.
#define _IFT_AdaptiveNonLinearStatic_refloadmode
void startTimer()
Definition: timer.C:69
Context IO exception class.
Definition: contextioerr.h:46
double getUtime()
Returns total user time elapsed in seconds.
Definition: timer.C:105
int numberOfPrescribedEquations
Total number or prescribed equations in current time step.
Definition: engngm.h:213
std::vector< ParallelContext > parallelContextList
List where parallel contexts are stored.
Definition: engngm.h:311
#define _IFT_AdaptiveNonLinearStatic_ddm
Class representing solution step.
Definition: timestep.h:80
This class implements Adaptive Non-LinearStatic Engineering problem.
void stopTimer()
Definition: timer.C:77
void add(const FloatArray &src)
Adds array src to receiver.
Definition: floatarray.C:156
Abstract base class representing general load balancer monitor.
Definition: loadbalancer.h:68
virtual NM_Status solve(SparseMtrx &K, FloatArray &R, FloatArray *R0, FloatArray &X, FloatArray &dX, FloatArray &F, const FloatArray &internalForcesEBENorm, double &s, referenceLoadInputModeType rlm, int &nite, TimeStep *tStep)=0
Solves the given sparse linear system of equations .
#define _IFT_NonLinearStatic_donotfixload
Definition: nlinearstatic.h:49
void resize(int s)
Resizes receiver towards requested size.
Definition: floatarray.C:631
int numberOfEquations
Total number of equation in current time step.
Definition: engngm.h:211
int equationNumberingCompleted
Equation numbering completed flag.
Definition: engngm.h:223

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:27 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011