OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
engngm.h
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 #ifndef engngm_h
36 #define engngm_h
37 
38 #include "oofemcfg.h"
39 #include "inputrecord.h"
40 #include "intarray.h"
41 #include "fieldmanager.h"
42 #include "metastep.h"
43 #include "timer.h"
44 #include "assemblercallback.h"
45 #include "chartype.h"
46 #include "unknowntype.h"
47 #include "varscaletype.h"
48 #include "numericalcmpn.h"
49 #include "valuemodetype.h"
50 #include "problemmode.h"
51 #include "fmode.h"
52 #include "dofiditem.h"
53 #include "contextoutputmode.h"
54 #include "contextfilemode.h"
55 #include "contextioresulttype.h"
56 #include "metastep.h"
57 #include "parallelcontext.h"
58 
59 #ifdef __PARALLEL_MODE
60  #include "parallel.h"
61 #endif
62 
63 #include <string>
64 #include <memory>
65 
67 
68 #define _IFT_EngngModel_nsteps "nsteps"
69 #define _IFT_EngngModel_contextoutputstep "contextoutputstep"
70 #define _IFT_EngngModel_renumberFlag "renumber"
71 #define _IFT_EngngModel_profileOpt "profileopt"
72 #define _IFT_EngngModel_nmsteps "nmsteps"
73 #define _IFT_EngngModel_nonLinFormulation "nonlinform"
74 #define _IFT_EngngModel_eetype "eetype"
75 #define _IFT_EngngModel_parallelflag "parallelflag"
76 #define _IFT_EngngModel_loadBalancingFlag "lbflag"
77 #define _IFT_EngngModel_forceloadBalancingFlag "forcelb1"
78 #define _IFT_EngngModel_initialGuess "initialguess"
79 #define _IFT_EngngModel_referenceFile "referencefile"
80 
81 #define _IFT_EngngModel_lstype "lstype"
82 #define _IFT_EngngModel_smtype "smtype"
83 
84 #define _IFT_EngngModel_suppressOutput "suppress_output" // Suppress writing to .out file
85 
87 
88 namespace oofem {
89 class Domain;
90 class TimeStep;
91 class Dof;
92 class DofManager;
93 class DataReader;
94 class DataStream;
95 class ErrorEstimator;
96 class MetaStep;
97 class MaterialInterface;
98 class SparseMtrx;
99 class NumericalMethod;
100 class InitModuleManager;
101 class ExportModuleManager;
102 class FloatMatrix;
103 class FloatArray;
104 class LoadBalancer;
105 class LoadBalancerMonitor;
106 class oofegGraphicContext;
107 class ProblemCommunicator;
108 class ProcessCommunicatorBuff;
109 class CommunicatorBuff;
110 class ProcessCommunicator;
111 class UnknownNumberingScheme;
112 
113 
123 class OOFEM_EXPORT EngngModelContext
124 {
125 protected:
128 
129 public:
130  EngngModelContext() : fieldManager() { }
131  FieldManager *giveFieldManager() { return & ( this->fieldManager ); }
132 };
133 
134 
181 class OOFEM_EXPORT EngngModel
182 {
183 public:
184  enum EngngModel_UpdateMode { EngngModel_Unknown_Mode, EngngModel_SUMM_Mode, EngngModel_SET_Mode };
185  enum EngngModelCommType { PC_default, PC_nonlocal };
190  };
191 
198  IG_None = 0,
199  IG_Tangent = 1,
200  //IG_Extrapolated = 2, ///< Assumes constant increment extrapolating @f$ {}^{n+1}x = {}^{n}x + \Delta t\delta{x}'@f$, where @f$ \delta x' = ({}^{n}x - {}^{n-1}x)/{}^{n}Delta t@f$.
201  };
202 
203 protected:
205  int ndomains;
207  std :: vector< std :: unique_ptr< Domain > > domainList;
227  std :: vector< MetaStep > metaStepList;
229  std :: unique_ptr< TimeStep > stepWhenIcApply;
231  std :: unique_ptr< TimeStep > currentStep;
233  std :: unique_ptr< TimeStep > previousStep;
235  int number;
236 
238  std :: string dataOutputFileName;
240  std :: string coreOutputFileName;
244  std :: string referenceFileName;
248 
253 
259  time_t startTime;
260 
263 
271  enum fMode nonLinFormulation;
274 
276  int rank;
278  int numProcs;
281 #ifdef __PARALLEL_MODE
282  char processor_name [ PROCESSOR_NAME_LENGTH ];
284  #ifdef __USE_MPI
285  MPI_Comm comm;
287  #endif
288 
291  LoadBalancer *lb;
299 
304 
307 #endif
308  enum { InternalForcesExchangeTag, MassExchangeTag, LoadExchangeTag, ReactionExchangeTag, RemoteElementExchangeTag };
311  std :: vector< ParallelContext > parallelContextList;
312 
315 
317 
318 public:
322  EngngModel(int i, EngngModel * _master = NULL);
324  virtual ~EngngModel();
325  EngngModel(const EngngModel &) = delete;
326  EngngModel &operator=(const EngngModel &) = delete;
333  Domain *giveDomain(int n);
340  void setDomain(int i, Domain *ptr, bool iDeallocateOld = true);
342  int giveNumberOfDomains() { return (int)domainList.size(); }
343 
344  const std :: string &giveDescription() const { return simulationDescription; }
345  const time_t &giveStartTime() { return startTime; }
346  bool giveSuppressOutput() const { return suppressOutput; }
347 
349  virtual ErrorEstimator *giveDomainErrorEstimator(int n) { return defaultErrEstimator; }
351  virtual MaterialInterface *giveMaterialInterface(int n) { return NULL; }
352  void setNumberOfEquations(int id, int neq) {
353  numberOfEquations = neq;
354  domainNeqs.at(id) = neq;
355  }
356  // input / output
358  FILE *giveOutputStream();
363  std :: string giveOutputBaseFileName() { return dataOutputFileName; }
364 
368  std :: string giveReferenceFileName() { return referenceFileName;}
369 
375  void letOutputBaseFileNameBe(const std :: string &src);
379  ContextOutputMode giveContextOutputMode() { return contextOutputMode; }
383  int giveContextOutputStep() { return contextOutputStep; }
389  { contextOutputMode = contextMode; }
395  void setUDContextOutputMode(int cStep)
396  {
397  contextOutputMode = COM_UserDefined;
398  contextOutputStep = cStep;
399  }
404  void setProblemMode(problemMode pmode) { pMode = pmode; }
409  void setParallelMode(bool newParallelFlag);
411  problemMode giveProblemMode() { return pMode; }
416  void setProblemScale(problemScale pscale) { pScale = pscale; }
418  problemScale giveProblemScale() { return pScale; }
420  virtual void setRenumberFlag() { this->renumberFlag = true; }
422  virtual void resetRenumberFlag() { this->renumberFlag = false; }
423 
427  double giveSolutionStepTime();
431  void giveAnalysisTime(int &rhrs, int &rmin, int &rsec, int &uhrs, int &umin, int &usec);
435  void terminateAnalysis();
436 
437  // solving
444  virtual void solveYourself();
451  virtual void solveYourselfAt(TimeStep *tStep) { }
456  virtual void terminate(TimeStep *tStep);
462  virtual void doStepOutput(TimeStep *tStep);
466  void saveStepContext(TimeStep *tStep, ContextMode mode);
472  virtual void updateYourself(TimeStep *tStep);
482  virtual void initializeYourself(TimeStep *tStep) { }
488  virtual int initializeAdaptive(int tStepNumber) { return 0; }
489 
494  virtual int giveNumberOfDomainEquations(int di, const UnknownNumberingScheme &num);
495 
496  // management components
503  virtual double giveUnknownComponent(ValueModeType, TimeStep *, Domain *, Dof *) { return 0.0; }
504 
512  virtual FieldPtr giveField (FieldType key, TimeStep *) { return FieldPtr();}
513 
514 
516  EngngModel *giveMasterEngngModel() { return this->master; }
517 
519  virtual double giveLoadLevel() { return 1.0; }
520 
522  virtual double giveEigenValue(int eigNum) { return 0.0; }
524  virtual void setActiveVector(int i) { }
532  int updateSharedDofManagers(FloatArray &answer, const UnknownNumberingScheme &s, int ExchangeTag);
540  int exchangeRemoteElementData(int ExchangeTag);
545  virtual int giveCurrentNumberOfIterations() {return 1;}
546 
547 #ifdef __PARALLEL_MODE
548  MPI_Comm giveParallelComm() { return this->comm; }
561  int packRemoteElementData(ProcessCommunicator &processComm);
573  int unpackRemoteElementData(ProcessCommunicator &processComm);
581  int packDofManagers(ArrayWithNumbering *src, ProcessCommunicator &processComm);
589  int unpackDofManagers(ArrayWithNumbering *dest, ProcessCommunicator &processComm);
590 
592  if ( t == PC_default ) {
593  return communicator;
594  } else if ( t == PC_nonlocal ) {
595  return nonlocCommunicator;
596  } else {
597  return NULL;
598  }
599  }
600 #endif
601  void initializeCommMaps(bool forceInit = false);
607  virtual int instanciateYourself(DataReader &dr, InputRecord *ir, const char *outFileName, const char *desc);
614  void Instanciate_init();
620  virtual IRResultType initializeFrom(InputRecord *ir);
622  int instanciateDomains(DataReader &dr);
624  int instanciateMetaSteps(DataReader &dr);
626  virtual int instanciateDefaultMetaStep(InputRecord *ir);
627 
637  virtual void updateAttributes(MetaStep *mStep);
643  void initMetaStepAttributes(MetaStep *mStep);
654  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode);
670  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode);
677  virtual void updateDomainLinks();
679  MetaStep *giveCurrentMetaStep();
683  virtual TimeStep *giveCurrentStep(bool force = false) {
684  if ( master && (!force)) {
685  return master->giveCurrentStep();
686  } else {
687  return currentStep.get();
688  }
689  }
693  virtual TimeStep *givePreviousStep(bool force = false) {
694  if ( master && (!force)) {
695  return master->givePreviousStep();
696  } else {
697  return previousStep.get();
698  }
699  }
701  virtual TimeStep *giveNextStep() { return NULL; }
714  TimeStep* generateNextStep();
716  virtual void preInitializeNextStep() {}
720  virtual TimeStep *giveSolutionStepWhenIcApply(bool force = false) {
721  if ( master && (!force)) {
722  return master->giveSolutionStepWhenIcApply();
723  } else {
724  return stepWhenIcApply.get();
725  }
726  }
730  virtual int giveNumberOfFirstStep(bool force = false) {
731  if ( master && (!force)) {
732  return master->giveNumberOfFirstStep();
733  } else {
734  return 1;
735  }
736  }
738  int giveNumberOfMetaSteps() { return nMetaSteps; }
740  MetaStep *giveMetaStep(int i);
744  int giveNumberOfSteps(bool force = false) {
745  if ( master && (!force)) {
746  return master->giveNumberOfSteps();
747  } else {
748  return numberOfSteps;
749  }
750  }
752  virtual double giveEndOfTimeOfInterest() { return 0.; }
756  virtual NumericalMethod *giveNumericalMethod(MetaStep *mStep) { return NULL; }
758  ExportModuleManager *giveExportModuleManager() { return exportModuleManager; }
760  EngngModelTimer *giveTimer() { return & timer; }
761 
769  virtual int giveNewEquationNumber(int domain, DofIDItem) { return ++domainNeqs.at(domain); }
777  virtual int giveNewPrescribedEquationNumber(int domain, DofIDItem) { return ++domainPrescribedNeqs.at(domain); }
783  std :: string giveContextFileName(int tStepNumber, int stepVersion) const;
789  std :: string giveDomainFileName(int domainNum, int domainSerNum) const;
799  virtual void updateComponent(TimeStep *tStep, NumericalCmpn cmpn, Domain *d);
806  virtual void initStepIncrements();
815  virtual int forceEquationNumbering(int i);
825  virtual int forceEquationNumbering();
845  virtual int requiresUnknownsDictionaryUpdate() { return false; }
852  virtual bool requiresEquationRenumbering(TimeStep *tStep) { return renumberFlag; }
853  //virtual int supportsBoundaryConditionChange () {return 0;}
867  virtual int giveUnknownDictHashIndx(ValueModeType mode, TimeStep *tStep) { return 0; }
868 
873  virtual ParallelContext *giveParallelContext(int n);
878  virtual void initParallelContexts();
879 
888  virtual void assemble(SparseMtrx &answer, TimeStep *tStep,
889  const MatrixAssembler &ma, const UnknownNumberingScheme &s, Domain *domain);
899  virtual void assemble(SparseMtrx &answer, TimeStep *tStep,
900  const MatrixAssembler &ma, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, Domain *domain);
915  void assembleVector(FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode,
916  const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms = NULL);
928  void assembleVectorFromDofManagers(FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode,
929  const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms = NULL);
941  void assembleVectorFromElements(FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode,
942  const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms = NULL);
943 
954  void assembleVectorFromBC(FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode,
955  const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms = NULL);
956 
966  void assembleExtrapolatedForces(FloatArray &answer, TimeStep *tStep, CharType type, Domain *domain);
967 
968  void assemblePrescribedExtrapolatedForces(FloatArray &answer, TimeStep *tStep, CharType type, Domain *domain);
969 
970 
971  void assembleVectorFromContacts(FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode,
972  const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms = NULL);
973 
974 protected:
981  virtual void packMigratingData(TimeStep *tStep) { }
988  virtual void unpackMigratingData(TimeStep *tStep) { }
989 
990 public:
995  virtual int checkConsistency() { return 1; }
1000  virtual int checkProblemConsistency();
1005  virtual void init();
1010  virtual void postInitialize();
1016  virtual void printOutputAt(FILE *file, TimeStep *tStep);
1017  virtual void printOutputAt(FILE *file, TimeStep *tStep, const IntArray &nodeSets, const IntArray &elementSets);
1025  void outputNodes(FILE *file, Domain &domain, TimeStep *tStep, int setNum);
1033  void outputElements(FILE *file, Domain &domain, TimeStep *tStep, int setNum);
1034 
1035  // input / output
1037  void printYourself();
1038 
1047  virtual void printDofOutputAt(FILE *stream, Dof *iDof, TimeStep *tStep);
1048 
1049 
1050  // identification
1052  virtual const char *giveClassName() const = 0;
1054  virtual int useNonlocalStiffnessOption() { return 0; }
1056  bool isParallel() const { return ( parallelFlag != 0 ); }
1058  int giveRank() const { return rank; }
1060  int giveNumberOfProcesses() const { return numProcs; }
1061 
1062 
1069  virtual fMode giveFormulation() { return nonLinFormulation; }
1070  /*
1071  * Returns Load Response Mode of receiver.
1072  * This value indicates, whether nodes and elements should assemble
1073  * total or incremental load vectors.
1074  *
1075  * virtual LoadResponseMode giveLoadResponseMode () {return TotalLoad;}
1076  */
1078  EngngModelContext *giveContext() { return this->context; }
1080  virtual int giveNumberOfSlaveProblems() { return 0; }
1082  virtual EngngModel *giveSlaveProblem(int i) { return NULL; }
1083 
1085  virtual bool giveEquationScalingFlag() { return false; }
1087  virtual double giveVariableScale(VarScaleType varId) { return 1.0; }
1088 
1089 
1099  virtual int estimateMaxPackSize(IntArray &commMap, DataStream &buff, int packUnpackType) { return 0; }
1100 #ifdef __PARALLEL_MODE
1101 
1108  virtual void balanceLoad(TimeStep *tStep);
1110  virtual LoadBalancer *giveLoadBalancer() { return NULL; }
1112  virtual LoadBalancerMonitor *giveLoadBalancerMonitor() { return NULL; }
1113 #endif
1114  void initParallel();
1117  EngngModel *giveEngngModel() { return this; }
1118  virtual bool isElementActivated( int elemNum ) { return true; }
1119  virtual bool isElementActivated( Element *e ) { return true; }
1120 
1121 
1122 
1123 #ifdef __OOFEG
1124  virtual void drawYourself(oofegGraphicContext &gc);
1125  virtual void drawElements(oofegGraphicContext &gc);
1126  virtual void drawNodes(oofegGraphicContext &gc);
1130  virtual void showSparseMtrxStructure(int type, oofegGraphicContext &gc, TimeStep *tStep) { }
1131 #endif
1132 
1134  std :: string errorInfo(const char *func) const;
1135 };
1136 } // end namespace oofem
1137 #endif // engngm_h
EngngModelTimer timer
E-model timer.
Definition: engngm.h:267
virtual EngngModel * giveSlaveProblem(int i)
Returns i-th slave problem.
Definition: engngm.h:1082
virtual void setActiveVector(int i)
Only relevant for eigen value analysis. Otherwise does noting.
Definition: engngm.h:524
FILE * outputStream
Output stream.
Definition: engngm.h:242
std::unique_ptr< TimeStep > currentStep
Current time step.
Definition: engngm.h:231
virtual FieldPtr giveField(FieldType key, TimeStep *)
Returns the smart pointer to requested field, Null otherwise.
Definition: engngm.h:512
std::string simulationDescription
Definition: engngm.h:316
std::string giveOutputBaseFileName()
Returns base output file name to which extensions, like .out .vtu .osf should be added.
Definition: engngm.h:363
virtual bool isElementActivated(Element *e)
Definition: engngm.h:1119
bool profileOpt
Profile optimized numbering flag (using Sloan&#39;s algorithm).
Definition: engngm.h:221
std::shared_ptr< Field > FieldPtr
Definition: field.h:72
Class and object Domain.
Definition: domain.h:115
virtual bool requiresEquationRenumbering(TimeStep *tStep)
Returns true if equation renumbering is required for given solution step.
Definition: engngm.h:852
LoadBalancerMonitor * lbm
Definition: engngm.h:293
problemScale giveProblemScale()
Returns scale in multiscale simulation.
Definition: engngm.h:418
std::string dataOutputFileName
Path to output stream.
Definition: engngm.h:238
FieldType
Physical type of field.
Definition: field.h:60
Base class for all matrices stored in sparse format.
Definition: sparsemtrx.h:60
Class representing meta step.
Definition: metastep.h:62
ProblemCommunicator * giveProblemCommunicator(EngngModelCommType t)
Definition: engngm.h:591
ContextOutputMode giveContextOutputMode()
Returns domain context output mode.
Definition: engngm.h:379
Class representing communicator for engng model.
Definition: problemcomm.h:50
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
std::string coreOutputFileName
String with core output file name.
Definition: engngm.h:240
virtual void packMigratingData(TimeStep *tStep)
Packs receiver data when rebalancing load.
Definition: engngm.h:981
std::vector< std::unique_ptr< Domain > > domainList
List of problem domains.
Definition: engngm.h:207
problemMode giveProblemMode()
Returns domain mode.
Definition: engngm.h:411
std::unique_ptr< TimeStep > previousStep
Previous time step.
Definition: engngm.h:233
ExportModuleManager * giveExportModuleManager()
Returns receiver&#39;s export module manager.
Definition: engngm.h:758
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
virtual int requiresUnknownsDictionaryUpdate()
Indicates if EngngModel requires Dofs dictionaries to be updated.
Definition: engngm.h:845
int nonlocalExt
Flag indicating if nonlocal extension active, which will cause data to be sent between shared element...
Definition: engngm.h:280
VarScaleType
Type determining the scale corresponding to particular variable.
Definition: varscaletype.h:40
int contextOutputStep
Definition: engngm.h:247
bool giveSuppressOutput() const
Definition: engngm.h:346
This base class is an abstraction for numerical algorithm.
Definition: nummet.h:80
virtual MaterialInterface * giveMaterialInterface(int n)
Returns material interface representation for given domain.
Definition: engngm.h:351
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
std::unique_ptr< TimeStep > stepWhenIcApply
Solution step when IC (initial conditions) apply.
Definition: engngm.h:229
time_t startTime
Solution start time.
Definition: engngm.h:259
ErrorEstimator * defaultErrEstimator
Error estimator. Useful for adaptivity, or simply printing errors output.
Definition: engngm.h:273
int numProcs
Total number of collaborating processes.
Definition: engngm.h:278
bool isParallel() const
Returns true if receiver in parallel mode.
Definition: engngm.h:1056
Abstract base class for all finite elements.
Definition: element.h:145
virtual TimeStep * giveNextStep()
Returns next time step (next to current step) of receiver.
Definition: engngm.h:701
Base class for dof managers.
Definition: dofmanager.h:113
int giveNumberOfProcesses() const
Returns the number of collaborating processes.
Definition: engngm.h:1060
bool force_load_rebalance_in_first_step
Debug flag forcing load balancing after first step.
Definition: engngm.h:297
Class representing the abstraction for input data source.
Definition: datareader.h:50
virtual int giveNewPrescribedEquationNumber(int domain, DofIDItem)
Increases number of prescribed equations of receiver&#39;s domain and returns newly created equation numb...
Definition: engngm.h:777
virtual void setRenumberFlag()
Sets the renumber flag to true.
Definition: engngm.h:420
FieldManager * giveFieldManager()
Definition: engngm.h:131
Class implementing an array of integers.
Definition: intarray.h:61
int & at(int i)
Coefficient access function.
Definition: intarray.h:103
void setProblemMode(problemMode pmode)
Sets domain mode to given mode.
Definition: engngm.h:404
virtual int useNonlocalStiffnessOption()
Returns nonzero if nonlocal stiffness option activated.
Definition: engngm.h:1054
void setNumberOfEquations(int id, int neq)
Definition: engngm.h:352
problemScale
Corresponds to macro- and micro-problem in multiscale simulations.
Definition: problemmode.h:45
const UnknownNumberingScheme * numbering
Definition: engngm.h:189
Class representing and implementing InitModuleManager.
problemMode pMode
Domain mode.
Definition: engngm.h:255
InitModuleManager * initModuleManager
Initialization module manager.
Definition: engngm.h:252
Class representing and implementing ExportModuleManager.
virtual int giveNewEquationNumber(int domain, DofIDItem)
Increases number of equations of receiver&#39;s domain and returns newly created equation number...
Definition: engngm.h:769
bool loadBalancingFlag
If set to true, load balancing is active.
Definition: engngm.h:295
ProblemCommunicator * nonlocCommunicator
NonLocal Communicator. Necessary when nonlocal constitutive models are used.
Definition: engngm.h:306
virtual void preInitializeNextStep()
Does a pre-initialization of the next time step (implement if necessarry)
Definition: engngm.h:716
int giveContextOutputStep()
Returns domain context output step.
Definition: engngm.h:383
virtual NumericalMethod * giveNumericalMethod(MetaStep *mStep)
Returns reference to receiver&#39;s numerical method.
Definition: engngm.h:756
Callback class for assembling specific types of vectors.
NumericalCmpn
Type representing numerical component.
Definition: numericalcmpn.h:46
IntArray domainPrescribedNeqs
Number of prescribed equations per domain.
Definition: engngm.h:217
EngngModelContext * giveContext()
Context requesting service.
Definition: engngm.h:1078
virtual double giveVariableScale(VarScaleType varId)
Returns the scale factor for given variable type.
Definition: engngm.h:1087
Callback class for assembling specific types of matrices.
int numberOfSteps
Total number of time steps.
Definition: engngm.h:209
int ndomains
Number of receiver domains.
Definition: engngm.h:205
DofIDItem
Type representing particular dof type.
Definition: dofiditem.h:86
int rank
Domain rank in a group of collaborating processes (0..groupSize-1).
Definition: engngm.h:276
EngngModelContext * context
Context.
Definition: engngm.h:265
Abstract base class representing (moving) material interfaces.
virtual void resetRenumberFlag()
Sets the renumber flag to false.
Definition: engngm.h:422
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
std::string giveReferenceFileName()
Returns reference file name.
Definition: engngm.h:368
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
Class representing process communicator for engineering model.
Definition: processcomm.h:176
virtual fMode giveFormulation()
Indicates type of non linear computation (total or updated formulation).
Definition: engngm.h:1069
EngngModel * master
Master e-model; if defined receiver is in maintained (slave) mode.
Definition: engngm.h:262
const time_t & giveStartTime()
Definition: engngm.h:345
virtual double giveLoadLevel()
Returns the current load level.
Definition: engngm.h:519
CommunicatorBuff * commBuff
Common Communicator buffer.
Definition: engngm.h:301
int nMetaSteps
Number of meta steps.
Definition: engngm.h:225
virtual int giveNumberOfFirstStep(bool force=false)
Returns number of first time step used by receiver.
Definition: engngm.h:730
ExportModuleManager * exportModuleManager
Export module manager.
Definition: engngm.h:250
EngngModel * giveMasterEngngModel()
Returns the master engnmodel.
Definition: engngm.h:516
virtual int initializeAdaptive(int tStepNumber)
Initializes the newly generated discretization state according to previous solution.
Definition: engngm.h:488
virtual double giveEndOfTimeOfInterest()
Returns end of time interest (time corresponding to end of time integration).
Definition: engngm.h:752
virtual int giveCurrentNumberOfIterations()
Returns number of iterations that was required to reach equilibrium - used for adaptive step length i...
Definition: engngm.h:545
The base class for all error estimation or error indicator algorithms.
Abstract base class representing general load balancer.
Definition: loadbalancer.h:108
virtual void unpackMigratingData(TimeStep *tStep)
Unpacks receiver data when rebalancing load.
Definition: engngm.h:988
int giveNumberOfMetaSteps()
Return number of meta steps.
Definition: engngm.h:738
Class representing vector of real numbers.
Definition: floatarray.h:82
virtual int checkConsistency()
Allows programmer to test some receiver&#39;s internal data, before computation begins.
Definition: engngm.h:995
IntArray domainNeqs
Number of equations per domain.
Definition: engngm.h:215
Input attribute of domain (each n-th step).
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
virtual void initializeYourself(TimeStep *tStep)
Provides the opportunity to initialize state variables stored in element integration points according...
Definition: engngm.h:482
virtual int estimateMaxPackSize(IntArray &commMap, DataStream &buff, int packUnpackType)
Determines the space necessary for send/receive buffer.
Definition: engngm.h:1099
virtual void updateDofUnknownsDictionary(DofManager *, TimeStep *)
Updates necessary values in Dofs unknown dictionaries.
Definition: engngm.h:859
virtual int giveNumberOfSlaveProblems()
Returns number of slave problems.
Definition: engngm.h:1080
Timer class, assumed to be an attribute of engineering model, serving stop-watch facility for enginee...
Definition: timer.h:98
virtual bool isElementActivated(int elemNum)
Definition: engngm.h:1118
int giveNumberOfTimeStepWhenIcApply()
Returns the time step number, when initial conditions should apply.
Definition: engngm.h:754
CharType
Definition: chartype.h:87
Class representing the general Input Record.
Definition: inputrecord.h:101
This class provides an communication context for distributed memory parallelism.
#define PROCESSOR_NAME_LENGTH
Definition: parallel.h:56
virtual bool giveEquationScalingFlag()
Returns the Equation scaling flag, which is used to indicate that governing equation(s) are scaled...
Definition: engngm.h:1085
virtual int giveUnknownDictHashIndx(ValueModeType mode, TimeStep *tStep)
This method is responsible for computing unique dictionary id (ie hash value) from given valueModeTyp...
Definition: engngm.h:867
fMode
Type representing the type of formulation (total or updated) of non-linear computation.
Definition: fmode.h:42
int parallelFlag
Flag indicating that the receiver runs in parallel.
Definition: engngm.h:269
int giveNumberOfDomains()
Returns number of domains in problem.
Definition: engngm.h:342
std::string referenceFileName
String with reference file name.
Definition: engngm.h:244
int giveRank() const
Returns domain rank in a group of collaborating processes (0..groupSize-1)
Definition: engngm.h:1058
Class EngngModelContext represents a context, which is shared by all problem engng sub-models...
Definition: engngm.h:123
virtual double giveEigenValue(int eigNum)
Only relevant for eigen value analysis. Otherwise returns zero.
Definition: engngm.h:522
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
const std::string & giveDescription() const
Definition: engngm.h:344
virtual ErrorEstimator * giveDomainErrorEstimator(int n)
Service for accessing ErrorEstimator corresponding to particular domain.
Definition: engngm.h:349
bool renumberFlag
Renumbering flag (renumbers equations after each step, necessary if Dirichlet BCs change)...
Definition: engngm.h:219
std::string errorInfo(const char *func)
Definition: error.C:41
virtual TimeStep * givePreviousStep(bool force=false)
Returns previous time step.
Definition: engngm.h:693
bool suppressOutput
Flag for suppressing output to file.
Definition: engngm.h:314
virtual TimeStep * giveSolutionStepWhenIcApply(bool force=false)
Returns the solution step when Initial Conditions (IC) apply.
Definition: engngm.h:720
void setUDContextOutputMode(int cStep)
Sets user defined context output mode (it sets contextOutputMode to contextOutputMode), setting contextOutputStep to given value.
Definition: engngm.h:395
virtual double giveUnknownComponent(ValueModeType, TimeStep *, Domain *, Dof *)
Returns requested unknown.
Definition: engngm.h:503
The Communicator and corresponding buffers (represented by this class) are separated in order to allo...
Definition: communicator.h:60
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
Definition: engngm.h:451
void setContextOutputMode(ContextOutputMode contextMode)
Sets context output mode of receiver.
Definition: engngm.h:388
problemMode
Definition: problemmode.h:39
Abstract base class representing the "problem" under consideration.
Definition: engngm.h:181
int number
Receivers id.
Definition: engngm.h:235
virtual TimeStep * giveCurrentStep(bool force=false)
Returns current time step.
Definition: engngm.h:683
the oofem namespace is to define a context or scope in which all oofem names are defined.
problemScale pScale
Multiscale mode.
Definition: engngm.h:257
Abstract class Dof represents Degree Of Freedom in finite element mesh.
Definition: dof.h:93
std::vector< MetaStep > metaStepList
List of problem metasteps.
Definition: engngm.h:227
ContextOutputMode contextOutputMode
Domain context output mode.
Definition: engngm.h:246
virtual void showSparseMtrxStructure(int type, oofegGraphicContext &gc, TimeStep *tStep)
Shows the sparse structure of required matrix, type == 1 stiffness.
Definition: engngm.h:1130
virtual LoadBalancer * giveLoadBalancer()
Returns reference to receiver&#39;s load balancer.
Definition: engngm.h:1110
int numberOfPrescribedEquations
Total number or prescribed equations in current time step.
Definition: engngm.h:213
FieldManager fieldManager
Common fieldManager providing shared field register for the problem.
Definition: engngm.h:127
virtual LoadBalancerMonitor * giveLoadBalancerMonitor()
Returns reference to receiver&#39;s load balancer monitor.
Definition: engngm.h:1112
std::vector< ParallelContext > parallelContextList
List where parallel contexts are stored.
Definition: engngm.h:311
Helper struct to pass array and numbering scheme as a single argument.
Definition: engngm.h:187
EngngModelTimer * giveTimer()
Returns reference to receiver timer (EngngModelTimer).
Definition: engngm.h:760
EngngModel * giveEngngModel()
Returns reference to itself -> required by communicator.h.
Definition: engngm.h:1117
Class representing solution step.
Definition: timestep.h:80
void setProblemScale(problemScale pscale)
Sets scale in multiscale simulation.
Definition: engngm.h:416
Abstract base class representing general load balancer monitor.
Definition: loadbalancer.h:68
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:28 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011