OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::EngngModel Class Referenceabstract

Abstract base class representing the "problem" under consideration. More...

#include <engngm.h>

+ Inheritance diagram for oofem::EngngModel:
+ Collaboration diagram for oofem::EngngModel:

Classes

struct  ArrayWithNumbering
 Helper struct to pass array and numbering scheme as a single argument. More...
 

Public Types

enum  EngngModel_UpdateMode { EngngModel_Unknown_Mode, EngngModel_SUMM_Mode, EngngModel_SET_Mode }
 
enum  EngngModelCommType { PC_default, PC_nonlocal }
 
enum  InitialGuess { IG_None = 0, IG_Tangent = 1 }
 Means to choose methods for finding a good initial guess. More...
 

Public Member Functions

 EngngModel (int i, EngngModel *_master=NULL)
 Constructor. More...
 
virtual ~EngngModel ()
 Destructor. More...
 
 EngngModel (const EngngModel &)=delete
 
EngngModeloperator= (const EngngModel &)=delete
 
DomaingiveDomain (int n)
 Service for accessing particular problem domain. More...
 
void setDomain (int i, Domain *ptr, bool iDeallocateOld=true)
 Sets i-th domain of receiver. More...
 
int giveNumberOfDomains ()
 Returns number of domains in problem. More...
 
const std::string & giveDescription () const
 
const time_t & giveStartTime ()
 
bool giveSuppressOutput () const
 
virtual ErrorEstimatorgiveDomainErrorEstimator (int n)
 Service for accessing ErrorEstimator corresponding to particular domain. More...
 
virtual MaterialInterfacegiveMaterialInterface (int n)
 Returns material interface representation for given domain. More...
 
void setNumberOfEquations (int id, int neq)
 
FILE * giveOutputStream ()
 Returns file descriptor of output file. More...
 
std::string giveOutputBaseFileName ()
 Returns base output file name to which extensions, like .out .vtu .osf should be added. More...
 
std::string giveReferenceFileName ()
 Returns reference file name. More...
 
void letOutputBaseFileNameBe (const std::string &src)
 Sets the base output file name. More...
 
ContextOutputMode giveContextOutputMode ()
 Returns domain context output mode. More...
 
int giveContextOutputStep ()
 Returns domain context output step. More...
 
void setContextOutputMode (ContextOutputMode contextMode)
 Sets context output mode of receiver. More...
 
void setUDContextOutputMode (int cStep)
 Sets user defined context output mode (it sets contextOutputMode to contextOutputMode), setting contextOutputStep to given value. More...
 
void setProblemMode (problemMode pmode)
 Sets domain mode to given mode. More...
 
void setParallelMode (bool newParallelFlag)
 Sets the problem to run in parallel (or not). More...
 
problemMode giveProblemMode ()
 Returns domain mode. More...
 
void setProblemScale (problemScale pscale)
 Sets scale in multiscale simulation. More...
 
problemScale giveProblemScale ()
 Returns scale in multiscale simulation. More...
 
virtual void setRenumberFlag ()
 Sets the renumber flag to true. More...
 
virtual void resetRenumberFlag ()
 Sets the renumber flag to false. More...
 
double giveSolutionStepTime ()
 Returns the user time of the current simulation step in seconds. More...
 
void giveAnalysisTime (int &rhrs, int &rmin, int &rsec, int &uhrs, int &umin, int &usec)
 Returns the real and user time for the analysis. More...
 
void terminateAnalysis ()
 Performs analysis termination after finishing analysis. More...
 
virtual void solveYourself ()
 Starts solution process. More...
 
virtual void solveYourselfAt (TimeStep *tStep)
 Solves problem for given time step. More...
 
virtual void terminate (TimeStep *tStep)
 Terminates the solution of time step. More...
 
virtual void doStepOutput (TimeStep *tStep)
 Prints the ouput of the solution step (using virtual this->printOutputAtservice) to the stream detemined using this->giveOutputStream() method and calls exportModuleManager to do output. More...
 
void saveStepContext (TimeStep *tStep, ContextMode mode)
 Saves context of given solution step, if required (determined using this->giveContextOutputMode() method). More...
 
virtual void updateYourself (TimeStep *tStep)
 Updates internal state after finishing time step. More...
 
virtual void initializeYourself (TimeStep *tStep)
 Provides the opportunity to initialize state variables stored in element integration points according to initial conditions using function initializeYourself() on element level. More...
 
virtual int initializeAdaptive (int tStepNumber)
 Initializes the newly generated discretization state according to previous solution. More...
 
virtual int giveNumberOfDomainEquations (int di, const UnknownNumberingScheme &num)
 Returns number of equations for given domain in active (current time step) time step. More...
 
virtual double giveUnknownComponent (ValueModeType, TimeStep *, Domain *, Dof *)
 Returns requested unknown. More...
 
virtual FieldPtr giveField (FieldType key, TimeStep *)
 Returns the smart pointer to requested field, Null otherwise. More...
 
EngngModelgiveMasterEngngModel ()
 Returns the master engnmodel. More...
 
virtual double giveLoadLevel ()
 Returns the current load level. More...
 
virtual double giveEigenValue (int eigNum)
 Only relevant for eigen value analysis. Otherwise returns zero. More...
 
virtual void setActiveVector (int i)
 Only relevant for eigen value analysis. Otherwise does noting. More...
 
int updateSharedDofManagers (FloatArray &answer, const UnknownNumberingScheme &s, int ExchangeTag)
 Exchanges necessary remote DofManagers data. More...
 
int exchangeRemoteElementData (int ExchangeTag)
 Exchanges necessary remote element data with remote partitions. More...
 
virtual int giveCurrentNumberOfIterations ()
 Returns number of iterations that was required to reach equilibrium - used for adaptive step length in staggered problem. More...
 
MPI_Comm giveParallelComm ()
 Returns the communication object of reciever. More...
 
int packRemoteElementData (ProcessCommunicator &processComm)
 Packs data of local element to be received by their remote counterpart on remote partitions. More...
 
int unpackRemoteElementData (ProcessCommunicator &processComm)
 Unpacks data for remote elements (which are mirrors of remote partition's local elements). More...
 
int packDofManagers (ArrayWithNumbering *src, ProcessCommunicator &processComm)
 Packing function for vector values of DofManagers. More...
 
int unpackDofManagers (ArrayWithNumbering *dest, ProcessCommunicator &processComm)
 Unpacking function for vector values of DofManagers . More...
 
ProblemCommunicatorgiveProblemCommunicator (EngngModelCommType t)
 
void initializeCommMaps (bool forceInit=false)
 
virtual int instanciateYourself (DataReader &dr, InputRecord *ir, const char *outFileName, const char *desc)
 Initializes whole problem according to its description stored in inputStream. More...
 
void Instanciate_init ()
 Initialization of the receiver state (opening the default output stream, empty domain creation, initialization of parallel context, etc) before Initialization form DataReader. More...
 
virtual IRResultType initializeFrom (InputRecord *ir)
 Initializes receiver according to object description in input reader. More...
 
int instanciateDomains (DataReader &dr)
 Instanciate problem domains by calling their instanciateYourself() service. More...
 
int instanciateMetaSteps (DataReader &dr)
 Instanciate problem meta steps by calling their instanciateYourself() service. More...
 
virtual int instanciateDefaultMetaStep (InputRecord *ir)
 Instanciate default metastep, if nmsteps is zero. More...
 
virtual void updateAttributes (MetaStep *mStep)
 Update receiver attributes according to step metaStep attributes. More...
 
void initMetaStepAttributes (MetaStep *mStep)
 Update e-model attributes attributes according to step metaStep attributes. More...
 
virtual contextIOResultType saveContext (DataStream &stream, ContextMode mode)
 Stores the state of model to output stream. More...
 
virtual contextIOResultType restoreContext (DataStream &stream, ContextMode mode)
 Restores the state of model from output stream. More...
 
virtual void updateDomainLinks ()
 Updates domain links after the domains of receiver have changed. More...
 
MetaStepgiveCurrentMetaStep ()
 Returns current meta step. More...
 
virtual TimeStepgiveCurrentStep (bool force=false)
 Returns current time step. More...
 
virtual TimeStepgivePreviousStep (bool force=false)
 Returns previous time step. More...
 
virtual TimeStepgiveNextStep ()
 Returns next time step (next to current step) of receiver. More...
 
TimeStepgenerateNextStep ()
 Generate new time step (and associate metastep). More...
 
virtual void preInitializeNextStep ()
 Does a pre-initialization of the next time step (implement if necessarry) More...
 
virtual TimeStepgiveSolutionStepWhenIcApply (bool force=false)
 Returns the solution step when Initial Conditions (IC) apply. More...
 
virtual int giveNumberOfFirstStep (bool force=false)
 Returns number of first time step used by receiver. More...
 
int giveNumberOfMetaSteps ()
 Return number of meta steps. More...
 
MetaStepgiveMetaStep (int i)
 Returns the i-th meta step. More...
 
int giveNumberOfSteps (bool force=false)
 Returns total number of steps. More...
 
virtual double giveEndOfTimeOfInterest ()
 Returns end of time interest (time corresponding to end of time integration). More...
 
int giveNumberOfTimeStepWhenIcApply ()
 Returns the time step number, when initial conditions should apply. More...
 
virtual NumericalMethodgiveNumericalMethod (MetaStep *mStep)
 Returns reference to receiver's numerical method. More...
 
ExportModuleManagergiveExportModuleManager ()
 Returns receiver's export module manager. More...
 
EngngModelTimergiveTimer ()
 Returns reference to receiver timer (EngngModelTimer). More...
 
virtual int giveNewEquationNumber (int domain, DofIDItem)
 Increases number of equations of receiver's domain and returns newly created equation number. More...
 
virtual int giveNewPrescribedEquationNumber (int domain, DofIDItem)
 Increases number of prescribed equations of receiver's domain and returns newly created equation number. More...
 
std::string giveContextFileName (int tStepNumber, int stepVersion) const
 Returns the filename for the context file for the given step and version. More...
 
std::string giveDomainFileName (int domainNum, int domainSerNum) const
 Returns the filename for the given domain (used by adaptivity and restore) More...
 
virtual void updateComponent (TimeStep *tStep, NumericalCmpn cmpn, Domain *d)
 Updates components mapped to numerical method if necessary during solution process. More...
 
virtual void initStepIncrements ()
 Initializes solution of new time step. More...
 
virtual int forceEquationNumbering (int i)
 Forces equation renumbering on given domain. More...
 
virtual int forceEquationNumbering ()
 Forces equation renumbering on all domains associated to engng model. More...
 
virtual int requiresUnknownsDictionaryUpdate ()
 Indicates if EngngModel requires Dofs dictionaries to be updated. More...
 
virtual bool requiresEquationRenumbering (TimeStep *tStep)
 Returns true if equation renumbering is required for given solution step. More...
 
virtual void updateDofUnknownsDictionary (DofManager *, TimeStep *)
 Updates necessary values in Dofs unknown dictionaries. More...
 
virtual int giveUnknownDictHashIndx (ValueModeType mode, TimeStep *tStep)
 This method is responsible for computing unique dictionary id (ie hash value) from given valueModeType and time step. More...
 
virtual ParallelContextgiveParallelContext (int n)
 Returns the parallel context corresponding to given domain (n) and unknown type Default implementation returns i-th context from parallelContextList. More...
 
virtual void initParallelContexts ()
 Creates parallel contexts. More...
 
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. More...
 
virtual void assemble (SparseMtrx &answer, TimeStep *tStep, const MatrixAssembler &ma, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, Domain *domain)
 Assembles characteristic matrix of required type into given sparse matrix. More...
 
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 conditions, into given vector. More...
 
void assembleVectorFromDofManagers (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 into given vector. More...
 
void assembleVectorFromElements (FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
 Assembles characteristic vector of required type from elements into given vector. More...
 
void assembleVectorFromBC (FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
 Assembles characteristic vector of required type from boundary conditions. More...
 
void assembleExtrapolatedForces (FloatArray &answer, TimeStep *tStep, CharType type, Domain *domain)
 Assembles the extrapolated internal forces vector, useful for obtaining a good initial guess in nonlinear analysis with Dirichlet boundary conditions. More...
 
void assemblePrescribedExtrapolatedForces (FloatArray &answer, TimeStep *tStep, CharType type, Domain *domain)
 
void assembleVectorFromContacts (FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
 
virtual int checkConsistency ()
 Allows programmer to test some receiver's internal data, before computation begins. More...
 
virtual int checkProblemConsistency ()
 Allows programmer to test problem its internal data, before computation begins. More...
 
virtual void init ()
 Initializes the receiver state. More...
 
virtual void postInitialize ()
 Performs post-initialization for all the problem contents (which is called after initializeFrom). More...
 
virtual void printOutputAt (FILE *file, TimeStep *tStep)
 Prints output of receiver to output domain stream, for given time step. More...
 
virtual void printOutputAt (FILE *file, TimeStep *tStep, const IntArray &nodeSets, const IntArray &elementSets)
 
void outputNodes (FILE *file, Domain &domain, TimeStep *tStep, int setNum)
 Outputs all nodes in the given set. More...
 
void outputElements (FILE *file, Domain &domain, TimeStep *tStep, int setNum)
 Outputs all elements in the given set. More...
 
void printYourself ()
 Prints state of receiver. Useful for debugging. More...
 
virtual void printDofOutputAt (FILE *stream, Dof *iDof, TimeStep *tStep)
 DOF printing routine. More...
 
virtual const char * giveClassName () const =0
 Returns class name of the receiver. More...
 
virtual int useNonlocalStiffnessOption ()
 Returns nonzero if nonlocal stiffness option activated. More...
 
bool isParallel () const
 Returns true if receiver in parallel mode. More...
 
int giveRank () const
 Returns domain rank in a group of collaborating processes (0..groupSize-1) More...
 
int giveNumberOfProcesses () const
 Returns the number of collaborating processes. More...
 
virtual fMode giveFormulation ()
 Indicates type of non linear computation (total or updated formulation). More...
 
EngngModelContextgiveContext ()
 Context requesting service. More...
 
virtual int giveNumberOfSlaveProblems ()
 Returns number of slave problems. More...
 
virtual EngngModelgiveSlaveProblem (int i)
 Returns i-th slave problem. More...
 
virtual bool giveEquationScalingFlag ()
 Returns the Equation scaling flag, which is used to indicate that governing equation(s) are scaled, or non-dimensionalized. More...
 
virtual double giveVariableScale (VarScaleType varId)
 Returns the scale factor for given variable type. More...
 
virtual int estimateMaxPackSize (IntArray &commMap, DataStream &buff, int packUnpackType)
 Determines the space necessary for send/receive buffer. More...
 
virtual void balanceLoad (TimeStep *tStep)
 Recovers the load balance between processors, if needed. More...
 
virtual LoadBalancergiveLoadBalancer ()
 Returns reference to receiver's load balancer. More...
 
virtual LoadBalancerMonitorgiveLoadBalancerMonitor ()
 Returns reference to receiver's load balancer monitor. More...
 
void initParallel ()
 Request domain rank and problem size. More...
 
EngngModelgiveEngngModel ()
 Returns reference to itself -> required by communicator.h. More...
 
virtual bool isElementActivated (int elemNum)
 
virtual bool isElementActivated (Element *e)
 
virtual void drawYourself (oofegGraphicContext &gc)
 
virtual void drawElements (oofegGraphicContext &gc)
 
virtual void drawNodes (oofegGraphicContext &gc)
 
virtual void showSparseMtrxStructure (int type, oofegGraphicContext &gc, TimeStep *tStep)
 Shows the sparse structure of required matrix, type == 1 stiffness. More...
 
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros). More...
 

Protected Types

enum  {
  InternalForcesExchangeTag, MassExchangeTag, LoadExchangeTag, ReactionExchangeTag,
  RemoteElementExchangeTag
}
 Message tags. More...
 

Protected Member Functions

virtual void packMigratingData (TimeStep *tStep)
 Packs receiver data when rebalancing load. More...
 
virtual void unpackMigratingData (TimeStep *tStep)
 Unpacks receiver data when rebalancing load. More...
 

Protected Attributes

int ndomains
 Number of receiver domains. More...
 
std::vector< std::unique_ptr< Domain > > domainList
 List of problem domains. More...
 
int numberOfSteps
 Total number of time steps. More...
 
int numberOfEquations
 Total number of equation in current time step. More...
 
int numberOfPrescribedEquations
 Total number or prescribed equations in current time step. More...
 
IntArray domainNeqs
 Number of equations per domain. More...
 
IntArray domainPrescribedNeqs
 Number of prescribed equations per domain. More...
 
bool renumberFlag
 Renumbering flag (renumbers equations after each step, necessary if Dirichlet BCs change). More...
 
bool profileOpt
 Profile optimized numbering flag (using Sloan's algorithm). More...
 
int equationNumberingCompleted
 Equation numbering completed flag. More...
 
int nMetaSteps
 Number of meta steps. More...
 
std::vector< MetaStepmetaStepList
 List of problem metasteps. More...
 
std::unique_ptr< TimeStepstepWhenIcApply
 Solution step when IC (initial conditions) apply. More...
 
std::unique_ptr< TimeStepcurrentStep
 Current time step. More...
 
std::unique_ptr< TimeSteppreviousStep
 Previous time step. More...
 
int number
 Receivers id. More...
 
std::string dataOutputFileName
 Path to output stream. More...
 
std::string coreOutputFileName
 String with core output file name. More...
 
FILE * outputStream
 Output stream. More...
 
std::string referenceFileName
 String with reference file name. More...
 
ContextOutputMode contextOutputMode
 Domain context output mode. More...
 
int contextOutputStep
 
ExportModuleManagerexportModuleManager
 Export module manager. More...
 
InitModuleManagerinitModuleManager
 Initialization module manager. More...
 
problemMode pMode
 Domain mode. More...
 
problemScale pScale
 Multiscale mode. More...
 
time_t startTime
 Solution start time. More...
 
EngngModelmaster
 Master e-model; if defined receiver is in maintained (slave) mode. More...
 
EngngModelContextcontext
 Context. More...
 
EngngModelTimer timer
 E-model timer. More...
 
int parallelFlag
 Flag indicating that the receiver runs in parallel. More...
 
enum fMode nonLinFormulation
 Type of non linear formulation (total or updated formulation). More...
 
ErrorEstimatordefaultErrEstimator
 Error estimator. Useful for adaptivity, or simply printing errors output. More...
 
int rank
 Domain rank in a group of collaborating processes (0..groupSize-1). More...
 
int numProcs
 Total number of collaborating processes. More...
 
int nonlocalExt
 Flag indicating if nonlocal extension active, which will cause data to be sent between shared elements before computing the internal forces. More...
 
char processor_name [PROCESSOR_NAME_LENGTH]
 Processor name. More...
 
MPI_Comm comm
 Communication object for this engineering model. More...
 
CommunicatorBuffcommBuff
 Common Communicator buffer. More...
 
ProblemCommunicatorcommunicator
 Communicator. More...
 
ProblemCommunicatornonlocCommunicator
 NonLocal Communicator. Necessary when nonlocal constitutive models are used. More...
 
std::vector< ParallelContextparallelContextList
 List where parallel contexts are stored. More...
 
bool suppressOutput
 Flag for suppressing output to file. More...
 
std::string simulationDescription
 
Load balancing attributes
LoadBalancerlb
 Load Balancer. More...
 
LoadBalancerMonitorlbm
 
bool loadBalancingFlag
 If set to true, load balancing is active. More...
 
bool force_load_rebalance_in_first_step
 Debug flag forcing load balancing after first step. More...
 

Detailed Description

Abstract base class representing the "problem" under consideration.

The engineering model describes the problem and type of analysis to be done. It "knows" the type and form of governing equation, knows how to assemble this problem from local element contributions and uses suitable instance of numerical method class to solve problem. It possesses and manages one or more problem domains. Concept of time steps is introduced. For problems discretized in time the introduction of time step is natural. In other cases, time steps can represent for example load increments or different load cases.

The solution steps are grouped together into so called meta steps. The meta step can be thought as an sequence of solution steps, with same set of attributes used to drive behavior of engng model. For each metastep, the engng model typically updates its control attributes according to metastep engng attributes (see initMetaStepAttributes and updateAttributes services) and creates the solution steps accordingly. This allows to switch to different time increment, different solution control, etc. If no metastep is specified, the engng model creates default one for all required solution steps. There are two services, where attributes are updated, the first one, used for those attributes, which do not vary during solution of problem are set in initializeFrom service. The second service is updateAttributes, where the attributes allowed to change (with metastep validity) are updated. If no metastep is introduced, default one is created (with attributes set to engng model init record). Then there is no difference, whether attributes are read in initializeFrom or updateAttributes, but preferred scheme is to read all attributes in initializeFrom and left updateAttributes service empty.

The basic EngngModel tasks are following

  • Assembling governing equations by summing contributions from problem domains (typically from nodes and elements),
  • Solving the problem described by governing equation(s) using suitable instance of numerical method. This requires interfacing numericalMethod characteristic elements with components in governing equation EngngModel must map each component of governing equation(s) (which has physical meaning) to corresponding numerical component of Numerical method. This mapping between physical components to independent numerical components (understood by numerical method) is important, because it allows numerical method to be used by many EngngModel with different meaning of particular components.
  • Returning unknown values (according to requested type and mode). Used by Dofs to access their corresponding unknowns.
  • Terminating time step by updating nodal and element values (including integration points update).
  • Updating dofs unknowns dictionaries if model supports changes of static system (see Dof class documentation for detailed explanation). In general if static system changes are not supported, when dof are requested for unknowns, they use their associate equation number to ask EngngModel for this unknown. Unknowns are therefore stored in EngngModel and are requested by dofs. On the other hand, when static system changes are supported, the equation numbers of dofs can vary during solution. Therefore, so called unknowns dictionary at dof level are introduced. All unknowns are stored on dof level and dofs will use in such case their own dictionaries instead of requesting EngngModel. The EngngModel is fully responsible to update this dictionary for each dof with all necessary unknowns (see updateDofUnknownsDictionary function).

Definition at line 181 of file engngm.h.

Member Enumeration Documentation

anonymous enum
protected

Message tags.

Enumerator
InternalForcesExchangeTag 
MassExchangeTag 
LoadExchangeTag 
ReactionExchangeTag 
RemoteElementExchangeTag 

Definition at line 309 of file engngm.h.

Enumerator
EngngModel_Unknown_Mode 
EngngModel_SUMM_Mode 
EngngModel_SET_Mode 

Definition at line 184 of file engngm.h.

Enumerator
PC_default 
PC_nonlocal 

Definition at line 185 of file engngm.h.

Means to choose methods for finding a good initial guess.

This is ad-hoc methods, often problem-specific for obtaining a point from which Newton iterations work. Only nonlinear analysis needs to worry about this.

Enumerator
IG_None 

No special treatment for new iterations. Probably means ending up using $ {}^{n+1}x = {}^{n}x $ for all free dofs.

IG_Tangent 

Solves an approximated tangent problem from the last iteration. Useful for changing Dirichlet boundary conditions.

Definition at line 197 of file engngm.h.

Constructor & Destructor Documentation

oofem::EngngModel::~EngngModel ( )
virtual
oofem::EngngModel::EngngModel ( const EngngModel )
delete

Member Function Documentation

void oofem::EngngModel::assemble ( SparseMtrx answer,
TimeStep tStep,
const MatrixAssembler ma,
const UnknownNumberingScheme s,
Domain domain 
)
virtual

Assembles characteristic matrix of required type into given sparse matrix.

Parameters
answerAssembled matrix.
tStepTime step, when answer is assembled.
sDetermines the equation numbering scheme.
typeCharacteristic components of type type are requested from elements and assembled.
domainSource domain.
Todo:
This rotation matrix is not flexible enough.. it can only work with full size matrices and doesn't allow for flexibility in the matrixassembler.
Note
: Some active bcs still make changes even when they are not applied We should probably reconsider this approach, so that they e.g. just prescribe their lagrange mult. instead.

Reimplemented in oofem::NonLinearStatic, and oofem::NonLinearDynamic.

Definition at line 803 of file engngm.C.

References oofem::SparseMtrx::assemble(), oofem::SparseMtrx::assembleBegin(), oofem::SparseMtrx::assembleEnd(), oofem::MatrixAssembler::assembleFromActiveBC(), oofem::FloatMatrix::clear(), oofem::Element_remote, oofem::EngngModelTimer::EMTT_NetComputationalStepTimer, oofem::Domain::giveBcs(), oofem::Domain::giveElement(), oofem::Domain::giveNumberOfElements(), oofem::Domain::giveSet(), oofem::Domain::hasContactManager(), isElementActivated(), oofem::FloatMatrix::isNotEmpty(), oofem::MatrixAssembler::locationFromElement(), oofem::MatrixAssembler::locationFromElementNodes(), oofem::MatrixAssembler::matrixFromEdgeLoad(), oofem::MatrixAssembler::matrixFromElement(), oofem::MatrixAssembler::matrixFromLoad(), oofem::MatrixAssembler::matrixFromSurfaceLoad(), OOFEM_ERROR, oofem::EngngModelTimer::pauseTimer(), oofem::EngngModelTimer::resumeTimer(), oofem::FloatMatrix::rotatedWith(), and timer.

Referenced by oofem::NonLinearDynamic::assemble(), oofem::NonLinearStatic::assemble(), oofem::StokesFlowVelocityHomogenization::computeTangent(), oofem::PrescribedGradientBCNeumann::computeTangent(), oofem::PrescribedGradientBCPeriodic::computeTangent(), oofem::TransportGradientNeumann::computeTangent(), oofem::TransportGradientPeriodic::computeTangent(), oofem::PrescribedGradient::computeTangent(), oofem::PrescribedGenStrainShell7::computeTangent(), oofem::TransportGradientDirichlet::computeTangent(), oofem::PrescribedGradientBCWeak::computeTangent(), oofem::MixedGradientPressureWeakPeriodic::computeTangents(), oofem::MixedGradientPressureDirichlet::computeTangents(), oofem::MixedGradientPressureNeumann::computeTangents(), oofem::MicroMaterial::giveMacroStiffnessMatrix(), oofem::NLTransientTransportProblem::solveYourselfAt(), oofem::StationaryTransportProblem::solveYourselfAt(), oofem::LinearStatic::solveYourselfAt(), oofem::FreeWarping::solveYourselfAt(), oofem::EigenValueDynamic::solveYourselfAt(), oofem::IncrementalLinearStatic::solveYourselfAt(), oofem::LinearStability::solveYourselfAt(), oofem::DIIDynamic::solveYourselfAt(), oofem::NonStationaryTransportProblem::solveYourselfAt(), oofem::SUPG::solveYourselfAt(), oofem::CBS::solveYourselfAt(), oofem::DarcyFlow::updateComponent(), oofem::StationaryTransportProblem::updateComponent(), oofem::TransientTransportProblem::updateComponent(), oofem::StaticStructural::updateComponent(), oofem::StokesFlow::updateComponent(), and oofem::SUPG::updateComponent().

void oofem::EngngModel::assemble ( SparseMtrx answer,
TimeStep tStep,
const MatrixAssembler ma,
const UnknownNumberingScheme r_s,
const UnknownNumberingScheme c_s,
Domain domain 
)
virtual

Assembles characteristic matrix of required type into given sparse matrix.

Parameters
answerassembled matrix
tStepTime step, when answer is assembled.
r_sDetermines the equation numbering scheme for the rows.
c_sDetermines the equation numbering scheme for the columns.
typeCharacteristic components of type type are requested from elements and assembled.
domainSource domain.
Todo:
This rotation matrix is not flexible enough.. it can only work with full size matrices and doesn't allow for flexibility in the matrixassembler.

Definition at line 928 of file engngm.C.

References oofem::SparseMtrx::assemble(), oofem::SparseMtrx::assembleBegin(), oofem::SparseMtrx::assembleEnd(), oofem::MatrixAssembler::assembleFromActiveBC(), oofem::Element_remote, oofem::EngngModelTimer::EMTT_NetComputationalStepTimer, oofem::Domain::giveBcs(), oofem::Domain::giveElement(), oofem::Domain::giveNumberOfElements(), oofem::Element::giveParallelMode(), oofem::Element::giveRotationMatrix(), oofem::Domain::hasContactManager(), oofem::Element::isActivated(), isElementActivated(), oofem::FloatMatrix::isNotEmpty(), oofem::MatrixAssembler::locationFromElement(), oofem::MatrixAssembler::matrixFromElement(), OOFEM_ERROR, oofem::EngngModelTimer::pauseTimer(), oofem::EngngModelTimer::resumeTimer(), oofem::FloatMatrix::rotatedWith(), and timer.

void oofem::EngngModel::assembleExtrapolatedForces ( FloatArray answer,
TimeStep tStep,
CharType  type,
Domain domain 
)

Assembles the extrapolated internal forces vector, useful for obtaining a good initial guess in nonlinear analysis with Dirichlet boundary conditions.

Parameters
answerAssembled vector.
tStepTime step, when answer is assembled.
typeDetermines the type of matrix to use, typically the tangent matrix or possibly the elastic tangent.
domainDomain to assemble from.
Returns
Sum of element norm (squared) of assembled vector.
Todo:
This is not perfect. It is probably no good for viscoelastic materials, and possibly other scenarios that are rate dependent (tangent will be computed for the previous step, with whatever deltaT it had)
Note
Temporary work-around for active b.c. used in multiscale (it can't support VM_Incremental easily).
Todo:
Deal with element deactivation and reactivation properly.

Definition at line 1341 of file engngm.C.

References oofem::FloatArray::assemble(), oofem::FloatArray::beProductOf(), oofem::Element::computeVectorOf(), oofem::Element_remote, oofem::EngngModelTimer::EMTT_NetComputationalStepTimer, oofem::Element::giveCharacteristicMatrix(), oofem::Domain::giveElement(), oofem::Element::giveLocationArray(), oofem::Domain::giveNumber(), giveNumberOfDomainEquations(), oofem::Domain::giveNumberOfElements(), oofem::Element::giveParallelMode(), oofem::TimeStep::givePreviousStep(), oofem::Element::giveRotationMatrix(), oofem::Element::isActivated(), isElementActivated(), oofem::FloatMatrix::isNotEmpty(), oofem::TimeStep::isTheFirstStep(), oofem::EngngModelTimer::pauseTimer(), oofem::FloatArray::resize(), oofem::EngngModelTimer::resumeTimer(), oofem::FloatArray::rotatedWith(), oofem::FloatArray::subtract(), timer, and oofem::FloatArray::zero().

Referenced by oofem::StaticStructural::solveYourselfAt().

void oofem::EngngModel::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 conditions, into given vector.

This routine is simple a convenient call to all three subroutines, since this is most likely what any engineering model will want to do. The return value is used to normalize the residual when checking for convergence in nonlinear problems. For parallel problems, the returned norm is also summed over all processes.

Parameters
answerAssembled vector.
modeMode of unknown (total, incremental, rate of change).
tStepTime step, when answer is assembled.
vaDetermines what vector is assembled.
sDetermines the equation numbering scheme.
domainDomain to assemble from.
eNormsIf non-NULL, squared norms of each internal force will be added to this, split up into dof IDs.
Returns
Sum of element/node norm (squared) of assembled vector.

Definition at line 986 of file engngm.C.

References assembleVectorFromBC(), assembleVectorFromDofManagers(), assembleVectorFromElements(), comm, oofem::Domain::giveMaxDofID(), oofem::Domain::giveNumber(), giveParallelContext(), isParallel(), oofem::FloatArray::resize(), and oofem::FloatArray::zero().

Referenced by oofem::NonLinearStatic::assembleIncrementalReferenceLoadVectors(), oofem::DIIDynamic::assembleLoadVector(), oofem::StructuralEngngModel::computeExternalLoadReactionContribution(), oofem::PrescribedGradientBCPeriodic::computeField(), oofem::TransportGradientPeriodic::computeField(), oofem::PrescribedGradient::computeField(), oofem::PrescribedGenStrainShell7::computeField(), oofem::TransportGradientDirichlet::computeField(), oofem::MixedGradientPressureDirichlet::computeFields(), oofem::NlDEIDynamic::computeLoadVector(), oofem::StructuralEngngModel::computeReaction(), oofem::VTKXMLExportModule::exportExternalForces(), oofem::StructuralEngngModel::giveInternalForces(), oofem::NonLinearDynamic::proceedStep(), oofem::DynamicRelaxationSolver::solve(), oofem::StationaryTransportProblem::solveYourselfAt(), oofem::LinearStatic::solveYourselfAt(), oofem::FreeWarping::solveYourselfAt(), oofem::DEIDynamic::solveYourselfAt(), oofem::IncrementalLinearStatic::solveYourselfAt(), oofem::StaticStructural::solveYourselfAt(), oofem::LinearStability::solveYourselfAt(), oofem::StokesFlow::solveYourselfAt(), oofem::TransientTransportProblem::solveYourselfAt(), oofem::SUPG::solveYourselfAt(), oofem::DarcyFlow::updateComponent(), oofem::StationaryTransportProblem::updateComponent(), oofem::TransientTransportProblem::updateComponent(), oofem::StaticStructural::updateComponent(), oofem::StokesFlow::updateComponent(), and oofem::SUPG::updateComponent().

void oofem::EngngModel::assembleVectorFromBC ( FloatArray answer,
TimeStep tStep,
const VectorAssembler va,
ValueModeType  mode,
const UnknownNumberingScheme s,
Domain domain,
FloatArray eNorms = NULL 
)

Assembles characteristic vector of required type from boundary conditions.

Parameters
answerAssembled vector.
tStepTime step, when answer is assembled.
modeMode of unknown (total, incremental, rate of change).
vaDetermines what vector is assembled.
sDetermines the equation numbering scheme.
domainDomain to assemble from.
eNormsNorms for each dofid (optional).

Definition at line 1071 of file engngm.C.

References oofem::FloatArray::assemble(), oofem::VectorAssembler::assembleFromActiveBC(), oofem::FloatArray::assembleSquared(), oofem::IntArray::at(), oofem::FloatArray::clear(), oofem::Element::computeDofTransformationMatrix(), oofem::DofManager::computeM2LTransformation(), oofem::EngngModelTimer::EMTT_NetComputationalStepTimer, oofem::Domain::giveBc(), oofem::Element::giveBoundaryEdgeNodes(), oofem::Element::giveBoundarySurfaceNodes(), oofem::GeneralBoundaryCondition::giveDofIDs(), oofem::Domain::giveDofManager(), oofem::Domain::giveElement(), oofem::DofManager::giveLocationArray(), oofem::Domain::giveNumberOfBoundaryConditions(), oofem::Element::giveRotationMatrix(), oofem::Domain::giveSet(), oofem::GeneralBoundaryCondition::giveSetNumber(), oofem::IntArray::giveSize(), oofem::Element::isActivated(), isElementActivated(), oofem::GeneralBoundaryCondition::isImposed(), oofem::FloatArray::isNotEmpty(), oofem::VectorAssembler::locationFromElement(), oofem::VectorAssembler::locationFromElementNodes(), oofem::EngngModelTimer::pauseTimer(), oofem::EngngModelTimer::resumeTimer(), oofem::FloatArray::rotatedWith(), timer, oofem::VectorAssembler::vectorFromEdgeLoad(), oofem::VectorAssembler::vectorFromLoad(), oofem::VectorAssembler::vectorFromNodeLoad(), and oofem::VectorAssembler::vectorFromSurfaceLoad().

Referenced by assembleVector().

void oofem::EngngModel::assembleVectorFromContacts ( FloatArray answer,
TimeStep tStep,
CharType  type,
ValueModeType  mode,
const UnknownNumberingScheme s,
Domain domain,
FloatArray eNorms = NULL 
)
void oofem::EngngModel::assembleVectorFromDofManagers ( 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 into given vector.

Parameters
answerAssembled vector.
modeMode of unknown (total, incremental, rate of change).
tStepTime step, when answer is assembled.
vaDetermines what vector is assembled.
sDetermines the equation numbering scheme.
domainDomain to assemble from.
eNormsNorms for each dofid (optional).
Returns
Sum of element norm (squared) of assembled vector.
Todo:
This should be removed when loads are given through sets.

Definition at line 1016 of file engngm.C.

References oofem::FloatArray::assemble(), oofem::FloatArray::assembleSquared(), oofem::FloatArray::clear(), oofem::DofManager::computeM2LTransformation(), oofem::DofManager_shared, oofem::EngngModelTimer::EMTT_NetComputationalStepTimer, oofem::DofManager::giveCompleteLocationArray(), oofem::DofManager::giveCompleteMasterDofIDArray(), oofem::GeneralBoundaryCondition::giveDofIDs(), oofem::Domain::giveDofManager(), oofem::Domain::giveLoad(), oofem::DofManager::giveLoadArray(), oofem::DofManager::giveLocationArray(), oofem::Domain::giveNumberOfDofManagers(), oofem::DofManager::giveParallelMode(), oofem::DofManager::givePartitionsConnectivitySize(), oofem::IntArray::giveSize(), oofem::FloatArray::isNotEmpty(), oofem::EngngModelTimer::pauseTimer(), oofem::EngngModelTimer::resumeTimer(), oofem::FloatArray::rotatedWith(), timer, oofem::FloatArray::times(), and oofem::VectorAssembler::vectorFromNodeLoad().

Referenced by assembleVector(), oofem::NLTransientTransportProblem::solveYourselfAt(), and oofem::NonStationaryTransportProblem::solveYourselfAt().

void oofem::EngngModel::assembleVectorFromElements ( FloatArray answer,
TimeStep tStep,
const VectorAssembler va,
ValueModeType  mode,
const UnknownNumberingScheme s,
Domain domain,
FloatArray eNorms = NULL 
)

Assembles characteristic vector of required type from elements into given vector.

Parameters
answerAssembled vector.
tStepTime step, when answer is assembled.
modeMode of unknown (total, incremental, rate of change).
vaDetermines what vector is assembled.
sDetermines the equation numbering scheme.
domainDomain to assemble from.
eNormsNorms for each dofid (optional).
Returns
Sum of element norm (squared) of assembled vector.
Todo:
Checking the chartype is not since there could be some other chartype in the future. We need to try and deal with chartype in a better way. For now, this is the best we can do.
Todo:
Consider using private answer variables and sum them up at the end, but it just might be slower then a shared variable.

Definition at line 1198 of file engngm.C.

References oofem::FloatArray::assemble(), oofem::FloatArray::assembleSquared(), oofem::IntArray::at(), oofem::FloatArray::clear(), oofem::Element::computeDofTransformationMatrix(), oofem::Element_remote, oofem::EngngModelTimer::EMTT_NetComputationalStepTimer, exchangeRemoteElementData(), oofem::Element::giveBodyLoadList(), oofem::Element::giveBoundaryEdgeNodes(), oofem::Element::giveBoundaryLoadList(), oofem::Element::giveBoundarySurfaceNodes(), oofem::Domain::giveElement(), oofem::Domain::giveLoad(), oofem::Domain::giveNumberOfElements(), oofem::Element::giveParallelMode(), oofem::Element::giveRotationMatrix(), oofem::IntArray::giveSize(), oofem::Element::isActivated(), isElementActivated(), oofem::IntArray::isEmpty(), oofem::FloatArray::isNotEmpty(), isParallel(), oofem::VectorAssembler::locationFromElement(), oofem::VectorAssembler::locationFromElementNodes(), OOFEM_ERROR, oofem::EngngModelTimer::pauseTimer(), RemoteElementExchangeTag, oofem::EngngModelTimer::resumeTimer(), oofem::FloatArray::rotatedWith(), timer, oofem::VectorAssembler::vectorFromEdgeLoad(), oofem::VectorAssembler::vectorFromElement(), oofem::VectorAssembler::vectorFromLoad(), and oofem::VectorAssembler::vectorFromSurfaceLoad().

Referenced by assembleVector(), oofem::DarcyFlow::solveYourselfAt(), oofem::NLTransientTransportProblem::solveYourselfAt(), oofem::StaticStructural::solveYourselfAt(), oofem::NonStationaryTransportProblem::solveYourselfAt(), and oofem::CBS::solveYourselfAt().

void oofem::EngngModel::balanceLoad ( TimeStep tStep)
virtual

Recovers the load balance between processors, if needed.

Uses load balancer monitor and load balancer instances to decide if rebalancing is needed (monitor) and to repartition the domain (load balancer). Method is responsible for packing all relevant data (the use of dof dictionaries is assumed to store e-model dof related staff, which can later help in renumbering after rebalancing) and to send/receive all data. Then the local update and renumbering is necessary to get consistent data structure.

Definition at line 2035 of file engngm.C.

References oofem::LoadBalancer::calculateLoadTransfer(), oofem::LoadBalancerMonitor::decide(), oofem::DofManager_local, oofem::DofManager_shared, oofem::EngngModelTimer::EMTT_LoadBalancingTimer, force_load_rebalance_in_first_step, forceEquationNumbering(), oofem::EngngModelTimer::getUtime(), giveDomain(), giveExportModuleManager(), giveLoadBalancer(), giveLoadBalancerMonitor(), oofem::Domain::giveNumberOfDofManagers(), giveRank(), oofem::ExportModuleManager::initialize(), oofem::TimeStep::isNotTheLastStep(), oofem::TimeStep::isTheFirstStep(), lb, oofem::LoadBalancerMonitor::LBD_RECOVER, lbm, oofem::LoadBalancer::migrateLoad(), OOFEM_LOG_INFO, OOFEM_WARNING, packMigratingData(), oofem::LoadBalancer::printStatistics(), oofem::EngngModelTimer::startTimer(), oofem::EngngModelTimer::stopTimer(), timer, and unpackMigratingData().

Referenced by oofem::StaggeredProblem::solveYourself(), solveYourself(), and oofem::AdaptiveNonLinearStatic::solveYourselfAt().

int oofem::EngngModel::checkProblemConsistency ( )
virtual

Allows programmer to test problem its internal data, before computation begins.

Returns
Nonzero if receiver check is o.k.

Reimplemented in oofem::StaggeredProblem, and oofem::ProblemSequence.

Definition at line 1844 of file engngm.C.

References checkConsistency(), domainList, OOFEM_LOG_DEBUG, and VERBOSE_PRINTS.

Referenced by oofem::MacroLSpace::computeStiffnessMatrix().

void oofem::EngngModel::doStepOutput ( TimeStep tStep)
virtual

Prints the ouput of the solution step (using virtual this->printOutputAtservice) to the stream detemined using this->giveOutputStream() method and calls exportModuleManager to do output.

Reimplemented in oofem::StaggeredProblem, oofem::StokesFlow, oofem::LinearStability, oofem::FluidMaterialEvaluator, oofem::EigenValueDynamic, and oofem::StructuralMaterialEvaluator.

Definition at line 670 of file engngm.C.

References oofem::ExportModuleManager::doOutput(), exportModuleManager, giveOutputStream(), printOutputAt(), and suppressOutput.

Referenced by oofem::StokesFlow::doStepOutput(), oofem::NonLinearStatic::terminate(), and terminate().

void oofem::EngngModel::drawElements ( oofegGraphicContext gc)
virtual
std::string oofem::EngngModel::errorInfo ( const char *  func) const

Returns string for prepending output (used by error reporting macros).

Definition at line 1710 of file engngm.C.

References giveClassName(), isParallel(), and rank.

virtual int oofem::EngngModel::estimateMaxPackSize ( IntArray commMap,
DataStream buff,
int  packUnpackType 
)
inlinevirtual

Determines the space necessary for send/receive buffer.

It uses related communication map pattern to determine the maximum size needed.

Parameters
commMapCommunication map used to send/receive messages.
buffCommunication buffer.
packUnpackTypeDetermines the type of packed quantity, used by receiver to estimate the size of pack/unpack buffer accordingly.
Returns
Upper bound of space needed.

Reimplemented in oofem::NlDEIDynamic, oofem::NonLinearStatic, oofem::NonLinearDynamic, oofem::StaticStructural, oofem::FreeWarping, and oofem::LinearStatic.

Definition at line 1099 of file engngm.h.

int oofem::EngngModel::exchangeRemoteElementData ( int  ExchangeTag)

Exchanges necessary remote element data with remote partitions.

The receiver's nonlocalExt flag must be set. Uses receiver nonlocCommunicator to perform the task using packRemoteElementData and unpackRemoteElementData receiver's services.

Parameters
ExchangeTagExchange tag used by communicator.
Returns
Nonzero if successful.

Definition at line 1996 of file engngm.C.

References oofem::Communicator::finishExchange(), giveRank(), oofem::Communicator::initExchange(), isParallel(), nonlocalExt, nonlocCommunicator, OOFEM_ERROR, oofem::Communicator::packAllData(), packRemoteElementData(), oofem::Communicator::unpackAllData(), unpackRemoteElementData(), and VERBOSEPARALLEL_PRINT.

Referenced by oofem::AdaptiveNonLinearStatic::adaptiveRemap(), and assembleVectorFromElements().

int oofem::EngngModel::forceEquationNumbering ( int  i)
virtual

Forces equation renumbering on given domain.

All equation numbers in all dofManagers are invalidated, and new equation numbers are generated starting from domainNeqs entry corresponding to given domain. It will update numberOfEquations variable accordingly. Should be used at startup to force equation numbering and therefore sets numberOfEquations. Must be used if model supports changes of static system to assign new valid equation numbers to dofManagers.

Reimplemented in oofem::PFEM, oofem::StokesFlow, oofem::DarcyFlow, and oofem::FluidModel.

Definition at line 408 of file engngm.C.

References oofem::SloanGraph::askNewOptimalNumbering(), oofem::IntArray::at(), domainNeqs, domainPrescribedNeqs, oofem::Timer::getUtime(), oofem::Domain::giveBcs(), giveCurrentStep(), oofem::Domain::giveDofManagers(), giveDomain(), oofem::Domain::giveElements(), oofem::SloanGraph::giveOptimalProfileSize(), oofem::SloanGraph::initialize(), OOFEM_LOG_DEBUG, OOFEM_LOG_INFO, profileOpt, oofem::Timer::startTimer(), oofem::Timer::stopTimer(), timer, and oofem::SloanGraph::tryParameters().

Referenced by oofem::XfemSolverInterface::propagateXfemInterfaces(), and oofem::ParticleTopologyDescription::replaceFEMesh().

int oofem::EngngModel::forceEquationNumbering ( )
virtual

Forces equation renumbering on all domains associated to engng model.

All equation numbers in all domains for all dofManagers are invalidated, and new equation numbers are generated starting from 1 on each domain. It will update numberOfEquations variable accordingly. Should be used at startup to force equation numbering and therefore sets numberOfEquations. Must be used if model supports changes of static system to assign new valid equation numbers to dofManagers.

Reimplemented in oofem::StaggeredProblem, oofem::TransientTransportProblem, oofem::StaticStructural, and oofem::FluidModel.

Definition at line 473 of file engngm.C.

References oofem::IntArray::at(), domainNeqs, domainPrescribedNeqs, equationNumberingCompleted, giveNumberOfDomains(), numberOfEquations, numberOfPrescribedEquations, OOFEM_LOG_DEBUG, and parallelContextList.

Referenced by oofem::AdaptiveNonLinearStatic::adaptiveRemap(), balanceLoad(), oofem::FluidModel::forceEquationNumbering(), oofem::DarcyFlow::forceEquationNumbering(), oofem::StaticStructural::forceEquationNumbering(), oofem::TransientTransportProblem::forceEquationNumbering(), oofem::DarcyFlow::giveFormulation(), oofem::PFEM::giveNextStep(), oofem::PFEM::giveNumberOfDomainEquations(), giveNumberOfDomainEquations(), solveYourself(), and oofem::IncrementalLinearStatic::solveYourselfAt().

TimeStep * oofem::EngngModel::generateNextStep ( )

Generate new time step (and associate metastep).

The advantage of this method is that the associated metasteps are generated on the fly, which is not the case of giveNextStep method, which should only be called from solveYoursef, as it generate metasteps.

This method in general allows to get external processing of individual solution steps (using solveYourselfAt) from outside, othervise the only way how to generate valid sequence is solveYorself method, but it method does not allow to get processing for individual steps.

Returns
representation of next solution step

Definition at line 559 of file engngm.C.

References currentStep, giveMetaStep(), giveNextStep(), oofem::MetaStep::giveNumberOfSteps(), oofem::MetaStep::giveStepRelativeNumber(), initMetaStepAttributes(), nMetaSteps, and preInitializeNextStep().

void oofem::EngngModel::giveAnalysisTime ( int &  rhrs,
int &  rmin,
int &  rsec,
int &  uhrs,
int &  umin,
int &  usec 
)
std::string oofem::EngngModel::giveContextFileName ( int  tStepNumber,
int  stepVersion 
) const

Returns the filename for the context file for the given step and version.

Parameters
tStepNumberSolution step number to store/restore.
stepVersionVersion of step.

Definition at line 1691 of file engngm.C.

References coreOutputFileName.

Referenced by oofem::HuertaErrorEstimator::estimateError(), oofem::AdaptiveNonLinearStatic::initializeAdaptive(), and saveStepContext().

ContextOutputMode oofem::EngngModel::giveContextOutputMode ( )
inline

Returns domain context output mode.

Definition at line 379 of file engngm.h.

Referenced by saveStepContext().

int oofem::EngngModel::giveContextOutputStep ( )
inline

Returns domain context output step.

Definition at line 383 of file engngm.h.

Referenced by saveStepContext().

virtual int oofem::EngngModel::giveCurrentNumberOfIterations ( )
inlinevirtual

Returns number of iterations that was required to reach equilibrium - used for adaptive step length in staggered problem.

Reimplemented in oofem::NonLinearStatic, and oofem::NLTransientTransportProblem.

Definition at line 545 of file engngm.h.

Referenced by oofem::StaggeredProblem::giveDeltaT().

virtual TimeStep* oofem::EngngModel::giveCurrentStep ( bool  force = false)
inlinevirtual

Returns current time step.

Parameters
forcewhen set to true then current step of receiver is returned instead of master (default)

Reimplemented in oofem::StaggeredProblem.

Definition at line 683 of file engngm.h.

References giveCurrentStep().

Referenced by oofem::AdaptiveNonLinearStatic::adaptiveRemap(), oofem::NLTransientTransportProblem::assembleAlgorithmicPartOfRhs(), oofem::LIBeam3d2::computeBmatrixAt(), oofem::Beam2d::computeBmatrixAt(), oofem::Beam3d::computeBmatrixAt(), oofem::FE2FluidMaterial::computeDeviatoricStressVector(), oofem::TransportGradientNeumann::computeEta(), oofem::NonLinearStatic::computeExternalLoadReactionContribution(), oofem::LIBeam3d2::computeGtoLRotationMatrix(), oofem::Beam2d::computeNmatrixAt(), oofem::Beam3d::computeNmatrixAt(), oofem::MacroLSpace::computeStiffnessMatrix(), oofem::TransportGradientDirichlet::computeXi(), oofem::PrescribedGradientBCWeak::damageExceedsTolerance(), oofem::DIIDynamic::determineConstants(), drawElements(), drawNodes(), oofem::PFEMParticle::drawScalar(), oofem::TR1_2D_PFEM::drawScalar(), oofem::HuertaErrorEstimator::estimateError(), oofem::FluidModel::forceEquationNumbering(), forceEquationNumbering(), giveCurrentMetaStep(), oofem::StaggeredProblem::giveCurrentStep(), giveCurrentStep(), oofem::StationaryTransportProblem::giveField(), oofem::TransientTransportProblem::giveField(), oofem::RVEStokesFlow::giveFluxVector(), oofem::MacroLSpace::giveInternalForcesVector(), oofem::NLTransientTransportProblem::giveUnknownComponent(), oofem::LinearStatic::giveUnknownComponent(), oofem::FreeWarping::giveUnknownComponent(), oofem::DEIDynamic::giveUnknownComponent(), oofem::DIIDynamic::giveUnknownComponent(), oofem::AdaptiveNonLinearStatic::giveUnknownComponent(), oofem::NonLinearDynamic::giveUnknownComponent(), oofem::NlDEIDynamic::giveUnknownComponent(), oofem::NonLinearStatic::giveUnknownComponent(), oofem::NLTransientTransportProblem::giveUnknownDictHashIndx(), oofem::SUPG::giveUnknownDictHashIndx(), oofem::IsotropicDamageMaterial1::initDamaged(), oofem::AdaptiveNonLinearStatic::initializeAdaptiveFrom(), oofem::TimeStep::isTheCurrentTimeStep(), oofem::GnuplotExportModule::outputBoundaryCondition(), oofem::GnuplotExportModule::outputInterfaceEl(), oofem::GnuplotExportModule::outputMesh(), oofem::GnuplotExportModule::outputXFEM(), oofem::GnuplotExportModule::outputXFEMGeometry(), packRemoteElementData(), oofem::Subdivision::packRemoteElements(), oofem::GeometryBasedEI::propagateFronts(), oofem::PLMaterialForce::propagateInterface(), oofem::HuertaErrorEstimator::saveContext(), saveContext(), saveStepContext(), oofem::EigenValueDynamic::setActiveVector(), oofem::LinearStability::setActiveVector(), oofem::PatchIntegrationRule::SetUpPointsOnTriangle(), oofem::PatchIntegrationRule::SetUpPointsOnWedge(), oofem::HuertaErrorEstimator::setupRefinedProblemEpilog2(), oofem::HuertaErrorEstimator::setupRefinedProblemProlog(), oofem::HuertaErrorEstimator::solveRefinedElementProblem(), oofem::HuertaErrorEstimator::solveRefinedPatchProblem(), oofem::HuertaErrorEstimator::solveRefinedWholeProblem(), oofem::LinearStability::solveYourself(), oofem::StaggeredProblem::solveYourself(), solveYourself(), oofem::LinearStability::solveYourselfAt(), oofem::AdaptiveNonLinearStatic::solveYourselfAt(), oofem::SUPG::solveYourselfAt(), oofem::CBS::solveYourselfAt(), unpackRemoteElementData(), oofem::MacroLSpace::updateYourself(), oofem::GeometryBasedEI::writeVtkDebug(), and oofem::XfemStructuralElementInterface::XfemElementInterface_updateIntegrationRule().

const std :: string& oofem::EngngModel::giveDescription ( ) const
inline

Definition at line 344 of file engngm.h.

Referenced by oofem::OutputExportModule::initializeFrom().

Domain * oofem::EngngModel::giveDomain ( int  n)

Service for accessing particular problem domain.

Generates error if no such domain is defined.

Parameters
nPointer to n-th domain is returned.
Returns
Domain number n.

Definition at line 1720 of file engngm.C.

References domainList, and OOFEM_ERROR.

Referenced by oofem::PrimaryField::__evaluateAt(), oofem::AdaptiveNonLinearStatic::adaptiveRemap(), oofem::DofDistributedPrimaryField::advanceSolution(), oofem::DofDistributedPrimaryField::applyBoundaryCondition(), oofem::PrimaryField::applyBoundaryCondition(), oofem::NRSolver::applyConstraintsToLoadIncrement(), oofem::DofDistributedPrimaryField::applyDefaultInitialCondition(), oofem::PrimaryField::applyDefaultInitialCondition(), oofem::NLTransientTransportProblem::applyIC(), oofem::TransientTransportProblem::applyIC(), oofem::SUPG::applyIC(), oofem::NonStationaryTransportProblem::applyIC(), oofem::CBS::applyIC(), oofem::StokesFlowVelocityHomogenization::applyPressureGradient(), oofem::NLTransientTransportProblem::assembleAlgorithmicPartOfRhs(), oofem::NonStationaryTransportProblem::assembleAlgorithmicPartOfRhs(), oofem::NonStationaryTransportProblem::assembleDirichletBcRhsVector(), oofem::AdaptiveNonLinearStatic::assembleInitialLoadVector(), balanceLoad(), oofem::SkylineUnsym::buildInternalStructure(), oofem::PetscSparseMtrx::buildInternalStructure(), oofem::DynCompRow::buildInternalStructure(), oofem::DynCompCol::buildInternalStructure(), oofem::Skyline::buildInternalStructure(), oofem::SymCompCol::buildInternalStructure(), oofem::CompCol::buildInternalStructure(), oofem::StructuralEngngModel::buildReactionTable(), oofem::StructuralMaterialEvaluator::checkConsistency(), oofem::StationaryTransportProblem::checkConsistency(), oofem::FluidMaterialEvaluator::checkConsistency(), oofem::StokesFlow::checkConsistency(), oofem::TransientTransportProblem::checkConsistency(), oofem::StructuralEngngModel::checkConsistency(), oofem::NonStationaryTransportProblem::checkConsistency(), oofem::SUPG::checkConsistency(), oofem::CBS::checkConsistency(), oofem::MatlabExportModule::computeArea(), oofem::SolutionbasedShapeFunction::computeBaseFunctionValueAt(), oofem::FreeWarping::computeCenterOfGravity(), oofem::SolutionbasedShapeFunction::computeCorrectionFactors(), oofem::StructuralEngngModel::computeExternalLoadReactionContribution(), oofem::NlDEIDynamic::computeLoadVector(), oofem::NlDEIDynamic::computeMassMtrx(), oofem::StructuralEngngModel::computeReaction(), oofem::FreeWarping::computeResultAtCenterOfGravity(), oofem::StokesFlowVelocityHomogenization::computeSeepage(), oofem::MacroLSpace::computeStiffnessMatrix(), oofem::StokesFlowVelocityHomogenization::computeTangent(), oofem::InteractionLoad::computeValueAt(), oofem::SolutionbasedShapeFunction::copyDofManagersToSurfaceData(), oofem::StructuralFE2MaterialStatus::copyStateVariables(), oofem::NonStationaryTransportProblem::copyUnknownsInDictionary(), oofem::QClinearStatic::createInterpolationMeshNodes(), oofem::ProblemCommunicator::DofManCmp(), oofem::GPInitModule::doInit(), oofem::CrackExportModule::doOutput(), oofem::DofManExportModule::doOutput(), oofem::GPExportModule::doOutput(), oofem::HOMExportModule::doOutput(), oofem::GnuplotExportModule::doOutput(), oofem::VTKExportModule::doOutput(), oofem::MatlabExportModule::doOutput(), oofem::VTKXMLExportModule::doOutput(), oofem::ErrorCheckingExportModule::doOutput(), oofem::MatlabExportModule::doOutputData(), oofem::MatlabExportModule::doOutputHomogenizeDofIDs(), oofem::MatlabExportModule::doOutputIntegrationPointFields(), oofem::MatlabExportModule::doOutputMesh(), oofem::MatlabExportModule::doOutputReactionForces(), oofem::MatlabExportModule::doOutputSpecials(), oofem::StructuralMaterialEvaluator::doStepOutput(), oofem::FluidMaterialEvaluator::doStepOutput(), oofem::LinearStability::doStepOutput(), oofem::StokesFlow::doStepOutput(), drawElements(), drawNodes(), oofem::ProblemCommunicator::ElemCmp(), oofem::LinearStatic::estimateMaxPackSize(), oofem::FreeWarping::estimateMaxPackSize(), oofem::StaticStructural::estimateMaxPackSize(), oofem::NonLinearDynamic::estimateMaxPackSize(), oofem::NonLinearStatic::estimateMaxPackSize(), oofem::NlDEIDynamic::estimateMaxPackSize(), oofem::SUPG::evaluateElementStabilizationCoeffs(), oofem::VTKExportModule::exportCellVars(), oofem::VTKXMLExportModule::exportCellVars(), oofem::VTKXMLExportModule::exportExternalForces(), oofem::POIExportModule::exportIntVarAs(), oofem::VTKExportModule::exportIntVarAs(), oofem::VTKXMLExportModule::exportIntVars(), oofem::VTKXMLExportModule::exportIntVarsInGpAs(), oofem::POIExportModule::exportPrimaryVars(), oofem::VTKXMLExportModule::exportPrimaryVars(), oofem::POIExportModule::exportPrimVarAs(), oofem::VTKExportModule::exportPrimVarAs(), oofem::FluidModel::forceEquationNumbering(), forceEquationNumbering(), oofem::QClinearStatic::generateInterpolationMesh(), oofem::VTKXMLExportModule::getNodalVariableFromXFEMST(), oofem::StokesFlowVelocityHomogenization::giveAreaOfRVE(), oofem::InteractionPFEMParticle::giveCoupledVelocities(), oofem::TransientTransportProblem::giveDeltaT(), oofem::NonStationaryTransportProblem::giveDtFunction(), oofem::StaggeredProblem::giveDtFunction(), oofem::StructuralEngngModel::giveInternalForces(), oofem::AdaptiveNonLinearStatic::giveLoadBalancer(), oofem::NonLinearDynamic::giveLoadBalancer(), oofem::NonLinearStatic::giveLoadBalancer(), oofem::MicroMaterial::giveMacroStiffnessMatrix(), oofem::SUPG::giveNextStep(), oofem::CBS::giveNextStep(), oofem::DarcyFlow::giveNumericalMethod(), oofem::StationaryTransportProblem::giveNumericalMethod(), oofem::StaticStructural::giveNumericalMethod(), oofem::TransientTransportProblem::giveNumericalMethod(), oofem::StokesFlow::giveNumericalMethod(), oofem::NonLinearDynamic::giveNumericalMethod(), oofem::NlDEIDynamic::giveNumericalMethod(), oofem::NonLinearStatic::giveNumericalMethod(), oofem::InteractionPFEMParticle::givePrescribedUnknownVector(), oofem::VTKXMLExportModule::givePrimVarSmoother(), oofem::StructuralFE2Material::giveRealStressVector_3d(), oofem::ExportModule::giveRegionSet(), oofem::VTKExportModule::giveSmoother(), oofem::VTKXMLExportModule::giveSmoother(), oofem::SolutionbasedShapeFunction::giveValueAtPoint(), oofem::Natural2GlobalOrdering::init(), oofem::Natural2LocalOrdering::init(), oofem::oofegGraphicContext::init(), oofem::DofDistributedPrimaryField::initialize(), oofem::AdaptiveNonLinearStatic::initializeAdaptive(), oofem::AdaptiveNonLinearStatic::initializeAdaptiveFrom(), oofem::ExportModule::initializeElementSet(), oofem::SUPG::initializeFrom(), oofem::CBS::initializeFrom(), initializeFrom(), oofem::SolutionbasedShapeFunction::initializeSurfaceData(), oofem::DIIDynamic::initializeYourself(), oofem::NonLinearDynamic::initializeYourself(), oofem::StokesFlowVelocityHomogenization::integrateNMatrix(), oofem::QClinearStatic::loadInterpolationMesh(), oofem::GnuplotExportModule::outputReactionForces(), oofem::GnuplotExportModule::outputXFEM(), packDofManagers(), oofem::NonLinearDynamic::packMigratingData(), oofem::NonLinearStatic::packMigratingData(), packRemoteElementData(), oofem::QClinearStatic::postInitialize(), oofem::AdaptiveLinearStatic::printOutputAt(), oofem::EigenValueDynamic::printOutputAt(), oofem::FreeWarping::printOutputAt(), oofem::LinearStability::printOutputAt(), oofem::NonLinearDynamic::printOutputAt(), oofem::StructuralEngngModel::printOutputAt(), oofem::NonLinearStatic::printOutputAt(), oofem::NlDEIDynamic::printOutputAt(), oofem::StructuralEngngModel::printReactionForces(), oofem::NonLinearDynamic::proceedStep(), oofem::NonLinearStatic::proceedStep(), oofem::XfemSolverInterface::propagateXfemInterfaces(), oofem::PrimaryField::readFromDofDictionaries(), oofem::StaticStructural::requiresEquationRenumbering(), oofem::TransientTransportProblem::requiresEquationRenumbering(), oofem::oofegGraphicContext::setActiveProblem(), oofem::SolutionbasedShapeFunction::setLoads(), oofem::MicroMaterial::setMacroProperties(), oofem::FETICommunicator::setUpCommunicationMaps(), oofem::NodeCommunicator::setUpCommunicationMaps(), oofem::ElementCommunicator::setUpCommunicationMaps(), oofem::QuasicontinuumVTKXMLExportModule::setupVTKPiece(), oofem::VTKXMLExportModule::setupVTKPiece(), oofem::NonLinearDynamic::showSparseMtrxStructure(), oofem::NonLinearStatic::showSparseMtrxStructure(), oofem::StructuralEngngModel::showSparseMtrxStructure(), oofem::HuertaErrorEstimator::solveRefinedElementProblem(), oofem::HuertaErrorEstimator::solveRefinedPatchProblem(), oofem::HuertaErrorEstimator::solveRefinedWholeProblem(), oofem::StructuralMaterialEvaluator::solveYourself(), oofem::FluidMaterialEvaluator::solveYourself(), oofem::DarcyFlow::solveYourselfAt(), oofem::NLTransientTransportProblem::solveYourselfAt(), oofem::StationaryTransportProblem::solveYourselfAt(), oofem::LinearStatic::solveYourselfAt(), oofem::FluidStructureProblem::solveYourselfAt(), oofem::FreeWarping::solveYourselfAt(), oofem::DEIDynamic::solveYourselfAt(), oofem::IncrementalLinearStatic::solveYourselfAt(), oofem::EigenValueDynamic::solveYourselfAt(), oofem::StaticStructural::solveYourselfAt(), oofem::StokesFlow::solveYourselfAt(), oofem::TransientTransportProblem::solveYourselfAt(), oofem::LinearStability::solveYourselfAt(), oofem::AdaptiveNonLinearStatic::solveYourselfAt(), oofem::DIIDynamic::solveYourselfAt(), oofem::QClinearStatic::solveYourselfAt(), oofem::NlDEIDynamic::solveYourselfAt(), oofem::NonStationaryTransportProblem::solveYourselfAt(), oofem::SUPG::solveYourselfAt(), oofem::CBS::solveYourselfAt(), oofem::PrimaryField::storeInDofDictionaries(), oofem::LinearStability::terminateLinStatic(), unpackDofManagers(), oofem::NonLinearDynamic::unpackMigratingData(), oofem::NonLinearStatic::unpackMigratingData(), unpackRemoteElementData(), oofem::DofDistributedPrimaryField::update(), oofem::DarcyFlow::updateComponent(), oofem::StationaryTransportProblem::updateComponent(), oofem::NonLinearDynamic::updateComponent(), oofem::FreeWarping::updateComputedResults(), oofem::SUPG::updateDofUnknownsDictionary_corrector(), oofem::SUPG::updateDofUnknownsDictionary_predictor(), oofem::AdaptiveLinearStatic::updateDomainLinks(), oofem::StationaryTransportProblem::updateDomainLinks(), oofem::LinearStatic::updateDomainLinks(), oofem::FreeWarping::updateDomainLinks(), oofem::StaticStructural::updateDomainLinks(), oofem::TransientTransportProblem::updateDomainLinks(), oofem::AdaptiveNonLinearStatic::updateDomainLinks(), oofem::NonLinearDynamic::updateDomainLinks(), oofem::NonStationaryTransportProblem::updateDomainLinks(), oofem::NonLinearStatic::updateDomainLinks(), oofem::CBS::updateDomainLinks(), oofem::SUPG::updateElementsForNewInterfacePosition(), oofem::SUPG::updateSolutionVectors(), oofem::SUPG::updateSolutionVectors_predictor(), oofem::FreeWarping::updateStiffnessMatrix(), oofem::AdaptiveLinearStatic::updateYourself(), oofem::VTKXMLExportModule::writeVTKPiece(), and oofem::VTKXMLExportModule::writeXFEMVars().

virtual ErrorEstimator* oofem::EngngModel::giveDomainErrorEstimator ( int  n)
inlinevirtual

Service for accessing ErrorEstimator corresponding to particular domain.

Definition at line 349 of file engngm.h.

Referenced by oofem::Domain::giveErrorEstimator(), oofem::NonLinearDynamic::unpackMigratingData(), and oofem::NonLinearStatic::unpackMigratingData().

std::string oofem::EngngModel::giveDomainFileName ( int  domainNum,
int  domainSerNum 
) const

Returns the filename for the given domain (used by adaptivity and restore)

Parameters
domainNumDomain number.
domainSerNumDomain serial number.

Definition at line 1701 of file engngm.C.

References coreOutputFileName.

Referenced by oofem::AdaptiveNonLinearStatic::initializeAdaptive(), and oofem::Domain::restoreContext().

virtual double oofem::EngngModel::giveEigenValue ( int  eigNum)
inlinevirtual

Only relevant for eigen value analysis. Otherwise returns zero.

Reimplemented in oofem::LinearStability, and oofem::EigenValueDynamic.

Definition at line 522 of file engngm.h.

Referenced by oofem::EigenValueErrorCheckingRule::check().

virtual double oofem::EngngModel::giveEndOfTimeOfInterest ( )
inlinevirtual

Returns end of time interest (time corresponding to end of time integration).

Reimplemented in oofem::IncrementalLinearStatic, and oofem::StaticStructural.

Definition at line 752 of file engngm.h.

Referenced by oofem::RheoChainMaterial::giveEndOfTimeOfInterest().

EngngModel* oofem::EngngModel::giveEngngModel ( )
inline

Returns reference to itself -> required by communicator.h.

Definition at line 1117 of file engngm.h.

Referenced by oofem::LEPlic::doLagrangianPhase().

virtual bool oofem::EngngModel::giveEquationScalingFlag ( )
inlinevirtual

Returns the Equation scaling flag, which is used to indicate that governing equation(s) are scaled, or non-dimensionalized.

Reimplemented in oofem::CBS, and oofem::SUPG.

Definition at line 1085 of file engngm.h.

Referenced by oofem::NewtonianFluidMaterial::checkConsistency(), oofem::NonlinearFluidMaterial::checkConsistency(), oofem::BinghamFluidMaterial2::checkConsistency(), and oofem::Node::initializeFrom().

ExportModuleManager* oofem::EngngModel::giveExportModuleManager ( )
inline

Returns receiver's export module manager.

Definition at line 758 of file engngm.h.

Referenced by balanceLoad(), oofem::NRSolver::solve(), oofem::CylindricalALM::solve(), oofem::StokesFlow::solveYourselfAt(), and updateDomainLinks().

virtual FieldPtr oofem::EngngModel::giveField ( FieldType  key,
TimeStep  
)
inlinevirtual

Returns the smart pointer to requested field, Null otherwise.

The return value uses shared_ptr, as some registered fields may be owned (and maintained) by emodel, while some may be created on demand and thus reliable reference counting mechanism is essential.

Reimplemented in oofem::TransientTransportProblem, and oofem::StationaryTransportProblem.

Definition at line 512 of file engngm.h.

virtual fMode oofem::EngngModel::giveFormulation ( )
inlinevirtual
virtual LoadBalancer* oofem::EngngModel::giveLoadBalancer ( )
inlinevirtual

Returns reference to receiver's load balancer.

Reimplemented in oofem::NonLinearStatic, oofem::NonLinearDynamic, and oofem::AdaptiveNonLinearStatic.

Definition at line 1110 of file engngm.h.

Referenced by balanceLoad(), oofem::WallClockLoadBalancerMonitor::decide(), and updateAttributes().

virtual LoadBalancerMonitor* oofem::EngngModel::giveLoadBalancerMonitor ( )
inlinevirtual

Returns reference to receiver's load balancer monitor.

Reimplemented in oofem::NonLinearStatic, oofem::NonLinearDynamic, and oofem::AdaptiveNonLinearStatic.

Definition at line 1112 of file engngm.h.

Referenced by balanceLoad(), oofem::ParmetisLoadBalancer::calculateLoadTransfer(), and updateAttributes().

virtual double oofem::EngngModel::giveLoadLevel ( )
inlinevirtual

Returns the current load level.

Reimplemented in oofem::NonLinearStatic, and oofem::StaticStructural.

Definition at line 519 of file engngm.h.

Referenced by oofem::LoadLevelErrorCheckingRule::check().

virtual MaterialInterface* oofem::EngngModel::giveMaterialInterface ( int  n)
inlinevirtual
virtual int oofem::EngngModel::giveNewEquationNumber ( int  domain,
DofIDItem   
)
inlinevirtual

Increases number of equations of receiver's domain and returns newly created equation number.

Used mainly by DofManagers to allocate their corresponding equation number if it is not currently allocated. The DofIDItem parameter allows to distinguish between several possible governing equations, that can be numbered separately.

Reimplemented in oofem::PFEM, and oofem::CBS.

Definition at line 769 of file engngm.h.

References oofem::IntArray::at().

Referenced by oofem::ActiveDof::askNewEquationNumber(), and oofem::MasterDof::askNewEquationNumber().

virtual int oofem::EngngModel::giveNewPrescribedEquationNumber ( int  domain,
DofIDItem   
)
inlinevirtual

Increases number of prescribed equations of receiver's domain and returns newly created equation number.

Used mainly by DofManagers to allocate their corresponding equation number if it is not currently allocated. The DofIDItem parameter allows to distinguish between several possible governing equations, that can be numbered separately.

Reimplemented in oofem::PFEM, and oofem::CBS.

Definition at line 777 of file engngm.h.

References oofem::IntArray::at().

Referenced by oofem::ActiveDof::askNewEquationNumber(), and oofem::MasterDof::askNewEquationNumber().

int oofem::EngngModel::giveNumberOfDomainEquations ( int  di,
const UnknownNumberingScheme num 
)
virtual

Returns number of equations for given domain in active (current time step) time step.

The numbering scheme determines which system the result is requested for.

Reimplemented in oofem::PFEM, and oofem::CBS.

Definition at line 391 of file engngm.C.

References oofem::IntArray::at(), domainNeqs, domainPrescribedNeqs, equationNumberingCompleted, forceEquationNumbering(), and oofem::UnknownNumberingScheme::isDefault().

Referenced by oofem::AdaptiveNonLinearStatic::adaptiveRemap(), oofem::PrimaryField::applyDefaultInitialCondition(), oofem::SUPG::applyIC(), oofem::NonStationaryTransportProblem::applyIC(), oofem::DIIDynamic::assembleDirichletBcRhsVector(), assembleExtrapolatedForces(), oofem::NonLinearStatic::assembleIncrementalReferenceLoadVectors(), oofem::AdaptiveNonLinearStatic::assembleInitialLoadVector(), oofem::DIIDynamic::assembleLoadVector(), assemblePrescribedExtrapolatedForces(), oofem::SkylineUnsym::buildInternalStructure(), oofem::SpoolesSparseMtrx::buildInternalStructure(), oofem::PetscSparseMtrx::buildInternalStructure(), oofem::DynCompRow::buildInternalStructure(), oofem::DynCompCol::buildInternalStructure(), oofem::Skyline::buildInternalStructure(), oofem::SymCompCol::buildInternalStructure(), oofem::CompCol::buildInternalStructure(), oofem::StructuralEngngModel::buildReactionTable(), oofem::TransportGradientDirichlet::computeCoefficientMatrix(), oofem::StructuralEngngModel::computeExternalLoadReactionContribution(), oofem::PrescribedGradient::computeField(), oofem::PrescribedGenStrainShell7::computeField(), oofem::TransportGradientDirichlet::computeField(), oofem::MixedGradientPressureDirichlet::computeFields(), oofem::NlDEIDynamic::computeLoadVector(), oofem::NlDEIDynamic::computeMassMtrx(), oofem::StructuralEngngModel::computeReaction(), oofem::StokesFlowVelocityHomogenization::computeTangent(), oofem::DarcyFlow::DumpMatricesToFile(), oofem::PrescribedGenStrainShell7::evaluateHigherOrderContribution(), oofem::VTKXMLExportModule::exportExternalForces(), oofem::StructuralEngngModel::giveInternalForces(), oofem::ParallelContext::giveNumberOfGlobalEqs(), oofem::ParallelContext::giveNumberOfLocalEqs(), oofem::ParallelContext::giveNumberOfNaturalEqs(), oofem::Natural2GlobalOrdering::init(), oofem::Natural2LocalOrdering::init(), oofem::DofDistributedPrimaryField::initialize(), oofem::AdaptiveNonLinearStatic::initializeAdaptiveFrom(), oofem::DIIDynamic::initializeYourself(), oofem::NonLinearDynamic::initializeYourself(), oofem::EIPrimaryUnknownMapper::mapAndUpdate(), oofem::LSPrimaryVariableMapper::mapPrimaryVariables(), oofem::NonLinearDynamic::proceedStep(), oofem::NonLinearStatic::proceedStep(), oofem::HuertaErrorEstimator::solveRefinedElementProblem(), oofem::HuertaErrorEstimator::solveRefinedWholeProblem(), oofem::LinearStatic::solveYourself(), oofem::FreeWarping::solveYourself(), oofem::StaticStructural::solveYourself(), oofem::NonLinearDynamic::solveYourself(), oofem::NlDEIDynamic::solveYourself(), oofem::NonLinearStatic::solveYourself(), solveYourself(), oofem::DarcyFlow::solveYourselfAt(), oofem::NLTransientTransportProblem::solveYourselfAt(), oofem::StationaryTransportProblem::solveYourselfAt(), oofem::LinearStatic::solveYourselfAt(), oofem::FreeWarping::solveYourselfAt(), oofem::DEIDynamic::solveYourselfAt(), oofem::IncrementalLinearStatic::solveYourselfAt(), oofem::EigenValueDynamic::solveYourselfAt(), oofem::StaticStructural::solveYourselfAt(), oofem::TransientTransportProblem::solveYourselfAt(), oofem::LinearStability::solveYourselfAt(), oofem::StokesFlow::solveYourselfAt(), oofem::DIIDynamic::solveYourselfAt(), oofem::NonLinearDynamic::solveYourselfAt(), oofem::NlDEIDynamic::solveYourselfAt(), oofem::NonStationaryTransportProblem::solveYourselfAt(), oofem::SUPG::solveYourselfAt(), oofem::DIIDynamic::timesMtrx(), oofem::NonLinearDynamic::timesMtrx(), oofem::NonLinearDynamic::unpackMigratingData(), oofem::NonLinearStatic::unpackMigratingData(), oofem::PrescribedGradient::updateCoefficientMatrix(), and oofem::PrescribedGenStrainShell7::updateCoefficientMatrix().

int oofem::EngngModel::giveNumberOfDomains ( )
inline
int oofem::EngngModel::giveNumberOfMetaSteps ( )
inline

Return number of meta steps.

Definition at line 738 of file engngm.h.

Referenced by oofem::StaggeredProblem::solveYourself().

virtual int oofem::EngngModel::giveNumberOfSlaveProblems ( )
inlinevirtual

Returns number of slave problems.

Reimplemented in oofem::StaggeredProblem, oofem::FluidStructureProblem, and oofem::ProblemSequence.

Definition at line 1080 of file engngm.h.

int oofem::EngngModel::giveNumberOfSteps ( bool  force = false)
inline

Returns total number of steps.

Parameters
forcewhen set to true then receiver reply is returned instead of master (default)

Definition at line 744 of file engngm.h.

References giveNumberOfSteps().

Referenced by oofem::StaticStructural::giveEndOfTimeOfInterest(), giveNumberOfSteps(), oofem::AdaptiveNonLinearStatic::giveTimeStepLoadLevel(), oofem::TimeStep::isNotTheLastStep(), printYourself(), and oofem::AdaptiveNonLinearStatic::updateYourself().

ParallelContext * oofem::EngngModel::giveParallelContext ( int  n)
virtual
virtual TimeStep* oofem::EngngModel::givePreviousStep ( bool  force = false)
inlinevirtual
ProblemCommunicator* oofem::EngngModel::giveProblemCommunicator ( EngngModelCommType  t)
inline

Definition at line 591 of file engngm.h.

Referenced by oofem::Subdivision::packRemoteElements().

problemMode oofem::EngngModel::giveProblemMode ( )
inline

Returns domain mode.

Definition at line 411 of file engngm.h.

Referenced by instanciateYourself().

int oofem::EngngModel::giveRank ( ) const
inline

Returns domain rank in a group of collaborating processes (0..groupSize-1)

Definition at line 1058 of file engngm.h.

Referenced by balanceLoad(), oofem::PetscSparseMtrx::buildInternalStructure(), oofem::ParmetisLoadBalancer::calculateLoadTransfer(), oofem::NlDEIDynamic::computeMassMtrx(), oofem::StructuralFE2MaterialStatus::copyStateVariables(), oofem::T3DInterface::createInput(), oofem::StructuralFE2MaterialStatus::createRVE(), oofem::FE2FluidMaterialStatus::createRVE(), oofem::WallClockLoadBalancerMonitor::decide(), oofem::LoadBalancer::deleteRemoteDofManagers(), oofem::LoadBalancer::deleteRemoteElements(), oofem::VTKXMLExportModule::doOutput(), oofem::HuertaErrorEstimator::estimateError(), oofem::FETISolver::estimateMaxPackSize(), exchangeRemoteElementData(), oofem::ExportModule::giveOutputBaseFileName(), oofem::MatlabExportModule::giveOutputStream(), oofem::DofManager::givePartitionsConnectivitySize(), oofem::Subdivision::giveRank(), oofem::ParallelContext::init(), oofem::NonlocalMaterialWTP::init(), oofem::Natural2GlobalOrdering::init(), oofem::NodalAveragingRecoveryModel::initCommMaps(), oofem::ZZNodalRecoveryModel::initCommMaps(), oofem::SPRNodalRecoveryModel::initCommMaps(), oofem::ParmetisLoadBalancer::initGlobalParmetisElementNumbering(), oofem::StaticStructural::initializeFrom(), oofem::LinearStatic::initializeFrom(), oofem::DirectErrorIndicatorRC::initializeFrom(), oofem::FreeWarping::initializeFrom(), oofem::NonLinearDynamic::initializeFrom(), oofem::QClinearStatic::initializeFrom(), oofem::NlDEIDynamic::initializeFrom(), oofem::NonLinearStatic::initializeFrom(), oofem::ParallelOrdering::isLocal(), oofem::DofManager::isLocal(), oofem::ParmetisLoadBalancer::labelDofManagers(), oofem::NonlocalMaterialWTP::migrate(), oofem::LoadBalancer::migrateLoad(), oofem::LoadBalancer::packMigratingData(), oofem::NonlocalMaterialWTP::packMigratingElementDependencies(), oofem::NonlocalMaterialWTP::packRemoteElements(), oofem::ParmetisLoadBalancer::packSharedDmanPartitions(), oofem::LoadBalancer::printStatistics(), oofem::RVEStokesFlowMaterialStatus::RVEStokesFlowMaterialStatus(), oofem::FETISolver::setUpCommunicationMaps(), oofem::FETISolver::solve(), oofem::HuertaErrorEstimator::solveRefinedElementProblem(), oofem::HuertaErrorEstimator::solveRefinedPatchProblem(), oofem::LinearStatic::solveYourself(), oofem::FreeWarping::solveYourself(), oofem::StaticStructural::solveYourself(), oofem::NonLinearDynamic::solveYourself(), oofem::NlDEIDynamic::solveYourself(), oofem::NonLinearStatic::solveYourself(), oofem::NonLinearDynamic::solveYourselfAt(), oofem::LoadBalancer::unpackMigratingData(), oofem::NonlocalMaterialWTP::unpackMigratingElementDependencies(), oofem::NonlocalMaterialWTP::unpackRemoteElements(), oofem::Subdivision::unpackRemoteElements(), oofem::ParmetisLoadBalancer::unpackSharedDmanPartitions(), updateSharedDofManagers(), and oofem::FETISolver::~FETISolver().

std :: string oofem::EngngModel::giveReferenceFileName ( )
inline

Returns reference file name.

Definition at line 368 of file engngm.h.

Referenced by oofem::ErrorCheckingExportModule::initializeFrom().

virtual EngngModel* oofem::EngngModel::giveSlaveProblem ( int  i)
inlinevirtual
double oofem::EngngModel::giveSolutionStepTime ( )

Returns the user time of the current simulation step in seconds.

Definition at line 1802 of file engngm.C.

References oofem::EngngModelTimer::EMTT_SolutionStepTimer, oofem::EngngModelTimer::getUtime(), and timer.

Referenced by oofem::OutputExportModule::doOutput(), and solveYourself().

const time_t& oofem::EngngModel::giveStartTime ( )
inline

Definition at line 345 of file engngm.h.

Referenced by oofem::OutputExportModule::initializeFrom().

bool oofem::EngngModel::giveSuppressOutput ( ) const
inline

Definition at line 346 of file engngm.h.

Referenced by oofem::Domain::Domain().

EngngModelTimer* oofem::EngngModel::giveTimer ( )
inline

Returns reference to receiver timer (EngngModelTimer).

Definition at line 760 of file engngm.h.

Referenced by oofem::WallClockLoadBalancerMonitor::decide(), and oofem::LoadBalancer::printStatistics().

virtual double oofem::EngngModel::giveUnknownComponent ( ValueModeType  ,
TimeStep ,
Domain ,
Dof  
)
inlinevirtual
virtual int oofem::EngngModel::giveUnknownDictHashIndx ( ValueModeType  mode,
TimeStep tStep 
)
inlinevirtual

This method is responsible for computing unique dictionary id (ie hash value) from given valueModeType and time step.

This function is used by particular dofs to access unknown identified by given parameters from its dictionary using computed index. Usually the hash algorithm should produce index that depend on time step relatively to actual one to avoid storage of complete history.

Reimplemented in oofem::PFEM, oofem::SUPG, oofem::NonStationaryTransportProblem, oofem::NonLinearStatic, oofem::NonLinearDynamic, oofem::IncrementalLinearStatic, oofem::StaticStructural, oofem::TransientTransportProblem, and oofem::NLTransientTransportProblem.

Definition at line 867 of file engngm.h.

Referenced by oofem::MasterDof::giveUnknownsDictionaryValue(), and oofem::MasterDof::updateUnknownsDictionary().

void oofem::EngngModel::init ( )
virtual

Initializes the receiver state.

Default implementation calls initModuleManager::doInit service to invoke initialization by individual init modules.

Definition at line 1883 of file engngm.C.

References oofem::InitModuleManager::doInit(), and initModuleManager.

Referenced by oofem::DEIDynamic::solveYourselfAt().

virtual int oofem::EngngModel::initializeAdaptive ( int  tStepNumber)
inlinevirtual

Initializes the newly generated discretization state according to previous solution.

This process should typically include restoring old solution, instanciating newly generated domain(s) and by mapping procedure.

Reimplemented in oofem::StaggeredProblem, oofem::AdaptiveNonLinearStatic, oofem::FluidStructureProblem, and oofem::AdaptiveLinearStatic.

Definition at line 488 of file engngm.h.

IRResultType oofem::EngngModel::initializeFrom ( InputRecord ir)
virtual

Initializes receiver according to object description in input reader.

InitString can be imagined as data record in component database belonging to receiver. Receiver may use value-name extracting functions to extract particular field from record.

Reimplemented in oofem::CBS, oofem::PFEM, oofem::SUPG, oofem::StaggeredProblem, oofem::NonStationaryTransportProblem, oofem::NonLinearStatic, oofem::NlDEIDynamic, oofem::QClinearStatic, oofem::NonLinearDynamic, oofem::TransientTransportProblem, oofem::LinearStability, oofem::StokesFlow, oofem::AdaptiveNonLinearStatic, oofem::DIIDynamic, oofem::FreeWarping, oofem::EigenValueDynamic, oofem::LinearStatic, oofem::DEIDynamic, oofem::StationaryTransportProblem, oofem::FluidMaterialEvaluator, oofem::StaticStructural, oofem::FluidStructureProblem, oofem::IncrementalLinearStatic, oofem::StructuralMaterialEvaluator, oofem::ProblemSequence, oofem::NLTransientTransportProblem, oofem::AdaptiveLinearStatic, and oofem::DarcyFlow.

Definition at line 262 of file engngm.C.

References _IFT_EngngModel_contextoutputstep, _IFT_EngngModel_eetype, _IFT_EngngModel_forceloadBalancingFlag, _IFT_EngngModel_loadBalancingFlag, _IFT_EngngModel_nmsteps, _IFT_EngngModel_nonLinFormulation, _IFT_EngngModel_nsteps, _IFT_EngngModel_parallelflag, _IFT_EngngModel_profileOpt, _IFT_EngngModel_renumberFlag, _IFT_EngngModel_suppressOutput, oofem::classFactory, contextOutputStep, oofem::ClassFactory::createErrorEstimator(), dataOutputFileName, defaultErrEstimator, force_load_rebalance_in_first_step, giveDomain(), oofem::InputRecord::hasField(), oofem::ErrorEstimator::initializeFrom(), IR_GIVE_FIELD, IR_GIVE_OPTIONAL_FIELD, oofem::IRRT_OK, isParallel(), loadBalancingFlag, nMetaSteps, nonLinFormulation, numberOfSteps, numProcs, OOFEM_ERROR, outputStream, parallelFlag, processor_name, profileOpt, rank, renumberFlag, setUDContextOutputMode(), simulationDescription, startTime, and suppressOutput.

Referenced by oofem::DarcyFlow::initializeFrom(), oofem::ProblemSequence::initializeFrom(), oofem::StaticStructural::initializeFrom(), oofem::DEIDynamic::initializeFrom(), oofem::StationaryTransportProblem::initializeFrom(), oofem::LinearStatic::initializeFrom(), oofem::FreeWarping::initializeFrom(), oofem::DIIDynamic::initializeFrom(), oofem::StokesFlow::initializeFrom(), oofem::TransientTransportProblem::initializeFrom(), oofem::NonLinearDynamic::initializeFrom(), oofem::NlDEIDynamic::initializeFrom(), oofem::NonStationaryTransportProblem::initializeFrom(), oofem::StaggeredProblem::initializeFrom(), oofem::SUPG::initializeFrom(), oofem::PFEM::initializeFrom(), oofem::CBS::initializeFrom(), and instanciateYourself().

virtual void oofem::EngngModel::initializeYourself ( TimeStep tStep)
inlinevirtual

Provides the opportunity to initialize state variables stored in element integration points according to initial conditions using function initializeYourself() on element level.

Should be called when current time step is time step when IC will apply (see EngngModel::giveNumberOfTimeStepWhenIcApply) somewhere from solveYourselfAt function). Implementation must be provided. Default implementation is empty.

Reimplemented in oofem::StaggeredProblem, oofem::NonLinearDynamic, oofem::DIIDynamic, and oofem::FluidStructureProblem.

Definition at line 482 of file engngm.h.

Referenced by solveYourself().

void oofem::EngngModel::initMetaStepAttributes ( MetaStep mStep)

Update e-model attributes attributes according to step metaStep attributes.

Calls updateAttributes. At the end the meta step input reader finish() service is called in order to allow for unread attribute check.

Definition at line 580 of file engngm.C.

References oofem::InputRecord::finish(), oofem::MetaStep::giveAttributesRecord(), and updateAttributes().

Referenced by oofem::MacroLSpace::computeStiffnessMatrix(), generateNextStep(), oofem::StaggeredProblem::solveYourself(), solveYourself(), oofem::StokesFlow::solveYourselfAt(), and oofem::SUPG::solveYourselfAt().

void oofem::EngngModel::initParallel ( )

Request domain rank and problem size.

Definition at line 1890 of file engngm.C.

References comm, numProcs, OOFEM_ERROR, OOFEM_LOG_RELEVANT, processor_name, and rank.

Referenced by setParallelMode().

void oofem::EngngModel::initParallelContexts ( )
virtual

Creates parallel contexts.

Must be implemented by derived classes since the governing equation type is required for context creation.

Definition at line 1755 of file engngm.C.

References giveNumberOfDomains(), and parallelContextList.

Referenced by Instanciate_init().

void oofem::EngngModel::initStepIncrements ( )
virtual

Initializes solution of new time step.

Default implementation resets all internal history variables (in integration points of elements) to previously reached equilibrium values. Can be used for time step restart.

Definition at line 1496 of file engngm.C.

References domainList, and oofem::Element_remote.

Referenced by oofem::AdaptiveNonLinearStatic::adaptiveRemap(), oofem::AdaptiveNonLinearStatic::initializeAdaptive(), restoreContext(), and oofem::CylindricalALM::solve().

void oofem::EngngModel::Instanciate_init ( )

Initialization of the receiver state (opening the default output stream, empty domain creation, initialization of parallel context, etc) before Initialization form DataReader.

Called at the beginning of instanciateYourself.

Parameters
dataOutputFileNameName of default output stream

Definition at line 184 of file engngm.C.

References oofem::IntArray::clear(), domainList, domainNeqs, domainPrescribedNeqs, initParallelContexts(), ndomains, and oofem::IntArray::resize().

Referenced by instanciateYourself().

int oofem::EngngModel::instanciateDefaultMetaStep ( InputRecord ir)
virtual

Instanciate default metastep, if nmsteps is zero.

Reimplemented in oofem::StaggeredProblem, and oofem::ProblemSequence.

Definition at line 374 of file engngm.C.

References metaStepList, nMetaSteps, numberOfSteps, and OOFEM_ERROR.

Referenced by oofem::StaggeredProblem::instanciateDefaultMetaStep(), and instanciateYourself().

int oofem::EngngModel::instanciateDomains ( DataReader dr)

Instanciate problem domains by calling their instanciateYourself() service.

Definition at line 336 of file engngm.C.

References domainList, and postInitialize().

Referenced by instanciateYourself().

int oofem::EngngModel::instanciateMetaSteps ( DataReader dr)

Instanciate problem meta steps by calling their instanciateYourself() service.

Definition at line 350 of file engngm.C.

References oofem::DataReader::giveInputRecord(), oofem::DataReader::IR_mstepRec, metaStepList, nMetaSteps, and numberOfSteps.

Referenced by instanciateYourself().

int oofem::EngngModel::instanciateYourself ( DataReader dr,
InputRecord ir,
const char *  outFileName,
const char *  desc 
)
virtual
virtual bool oofem::EngngModel::isElementActivated ( int  elemNum)
inlinevirtual
virtual bool oofem::EngngModel::isElementActivated ( Element e)
inlinevirtual

Reimplemented in oofem::QClinearStatic.

Definition at line 1119 of file engngm.h.

References gc.

bool oofem::EngngModel::isParallel ( ) const
inline

Returns true if receiver in parallel mode.

Definition at line 1056 of file engngm.h.

Referenced by oofem::ParallelContext::accumulate(), oofem::AdaptiveNonLinearStatic::adaptiveRemap(), oofem::PetscSparseMtrx::addDiagonal(), oofem::PetscSparseMtrx::assemble(), assembleVector(), assembleVectorFromElements(), oofem::PetscSparseMtrx::buildInternalStructure(), oofem::NodeErrorCheckingRule::check(), oofem::ElementErrorCheckingRule::check(), oofem::BeamElementErrorCheckingRule::check(), oofem::ReactionErrorCheckingRule::check(), oofem::StructuralFE2MaterialStatus::copyStateVariables(), oofem::T3DInterface::createInput(), oofem::StructuralFE2MaterialStatus::createRVE(), oofem::FE2FluidMaterialStatus::createRVE(), oofem::PetscSparseMtrx::createVecGlobal(), oofem::VTKXMLExportModule::doOutput(), errorInfo(), exchangeRemoteElementData(), oofem::Domain::giveNextFreeDofID(), oofem::ParallelContext::giveNumberOfGlobalEqs(), oofem::ParallelContext::giveNumberOfLocalEqs(), oofem::LinearStatic::giveNumericalMethod(), oofem::FreeWarping::giveNumericalMethod(), oofem::ExportModule::giveOutputBaseFileName(), oofem::MatlabExportModule::giveOutputStream(), oofem::ParallelContext::init(), oofem::StaticStructural::initializeFrom(), oofem::LinearStatic::initializeFrom(), oofem::FreeWarping::initializeFrom(), oofem::NonLinearDynamic::initializeFrom(), oofem::QClinearStatic::initializeFrom(), oofem::NonLinearStatic::initializeFrom(), oofem::StaggeredProblem::initializeFrom(), initializeFrom(), oofem::ParallelContext::isLocal(), oofem::ParallelContext::localDotProduct(), oofem::ParallelContext::localNorm(), oofem::NodalAveragingRecoveryModel::recoverValues(), oofem::ZZNodalRecoveryModel::recoverValues(), oofem::RVEStokesFlowMaterialStatus::RVEStokesFlowMaterialStatus(), oofem::PetscSparseMtrx::scatterG2L(), oofem::PetscSparseMtrx::scatterL2G(), oofem::LinearStatic::solveYourself(), oofem::FreeWarping::solveYourself(), oofem::StaticStructural::solveYourself(), oofem::NonLinearDynamic::solveYourself(), oofem::NlDEIDynamic::solveYourself(), oofem::NonLinearStatic::solveYourself(), oofem::NonLinearDynamic::solveYourselfAt(), oofem::PetscSparseMtrx::times(), oofem::PetscSparseMtrx::timesT(), and updateSharedDofManagers().

void oofem::EngngModel::letOutputBaseFileNameBe ( const std::string &  src)

Sets the base output file name.

See also
giveOutputBaseFileName
Parameters
srcNew output file name.

Definition at line 1777 of file engngm.C.

References dataOutputFileName, OOFEM_ERROR, outputStream, and suppressOutput.

EngngModel& oofem::EngngModel::operator= ( const EngngModel )
delete
void oofem::EngngModel::outputElements ( FILE *  file,
Domain domain,
TimeStep tStep,
int  setNum 
)

Outputs all elements in the given set.

Parameters
fileOutput stream.
domainDomain.
tStepTime step.
setNumSet number. If zero, outputs all elements.

Definition at line 766 of file engngm.C.

References oofem::Element_remote, oofem::Domain::giveElement(), oofem::Set::giveElementList(), oofem::Domain::giveElements(), oofem::Domain::giveSet(), and oofem::Element::printOutputAt().

Referenced by printOutputAt().

void oofem::EngngModel::outputNodes ( FILE *  file,
Domain domain,
TimeStep tStep,
int  setNum 
)

Outputs all nodes in the given set.

Parameters
fileOutput stream.
domainDomain.
tStepTime step.
setNumSet number. If zero, outputs all elements.

Definition at line 739 of file engngm.C.

References oofem::DofManager_null, oofem::Domain::giveDofManager(), oofem::Domain::giveDofManagers(), oofem::Set::giveNodeList(), oofem::Domain::giveSet(), and oofem::DofManager::printOutputAt().

Referenced by printOutputAt().

int oofem::EngngModel::packDofManagers ( ArrayWithNumbering src,
ProcessCommunicator processComm 
)

Packing function for vector values of DofManagers.

Packs vector values of shared/remote DofManagers into send communication buffer of given process communicator.

Parameters
processCommTask communicator.
srcSource vector + equation numbering.
Returns
Nonzero if successful.
Todo:
Shouldn't hardcode domain number 1
Todo:
Must fix: Internal dofmanagers in xfem and bc

Definition at line 2136 of file engngm.C.

References oofem::EngngModel::ArrayWithNumbering::array, oofem::IntArray::at(), oofem::FloatArray::at(), oofem::Domain::giveDofManager(), giveDomain(), oofem::ProcessCommunicator::giveProcessCommunicatorBuff(), oofem::IntArray::giveSize(), oofem::ProcessCommunicator::giveToSendMap(), oofem::EngngModel::ArrayWithNumbering::numbering, and oofem::ProcessCommunicatorBuff::write().

Referenced by updateSharedDofManagers().

virtual void oofem::EngngModel::packMigratingData ( TimeStep tStep)
inlineprotectedvirtual

Packs receiver data when rebalancing load.

When rebalancing happens, the local numbering will be lost on majority of processors. Instead of identifying values of solution vectors that have to be send/received and then performing renumbering, all solution vectors are assumed to be stored in dof dictionaries before data migration. Then dofs will take care themselves for packing and unpacking. After data migration and local renumbering, the solution vectors will be restored from dof dictionary data back.

Reimplemented in oofem::NonLinearStatic, and oofem::NonLinearDynamic.

Definition at line 981 of file engngm.h.

Referenced by balanceLoad().

int oofem::EngngModel::packRemoteElementData ( ProcessCommunicator processComm)

Packs data of local element to be received by their remote counterpart on remote partitions.

Remote elements are introduced when nonlocal constitutive models are used, in order to allow local averaging procedure (remote elements, which are involved in averaging on local partition are mirrored on this local partition) instead of implementing inefficient fine-grain communication. Remote element data are exchanged only if necessary and once for all of them. Current implementation calls packUnknowns service for all elements listed in given process communicator send map.

Parameters
processCommCorresponding process communicator.
Returns
Nonzero if successful.

Definition at line 2097 of file engngm.C.

References oofem::IntArray::at(), giveCurrentStep(), giveDomain(), oofem::Domain::giveElement(), oofem::ProcessCommunicator::giveProcessCommunicatorBuff(), oofem::ProcessCommunicatorBuff::giveSendBuff(), oofem::IntArray::giveSize(), and oofem::ProcessCommunicator::giveToSendMap().

Referenced by exchangeRemoteElementData().

void oofem::EngngModel::postInitialize ( )
virtual

Performs post-initialization for all the problem contents (which is called after initializeFrom).

Currently, it calls Domain::postInitialize for all problem domains.

Reimplemented in oofem::QClinearStatic.

Definition at line 1869 of file engngm.C.

References domainList, giveNumberOfFirstStep(), and metaStepList.

Referenced by instanciateDomains(), and oofem::QClinearStatic::postInitialize().

virtual void oofem::EngngModel::preInitializeNextStep ( )
inlinevirtual

Does a pre-initialization of the next time step (implement if necessarry)

Reimplemented in oofem::PFEM, and oofem::FluidStructureProblem.

Definition at line 716 of file engngm.h.

Referenced by generateNextStep(), oofem::StaggeredProblem::solveYourself(), and solveYourself().

void oofem::EngngModel::printDofOutputAt ( FILE *  stream,
Dof iDof,
TimeStep tStep 
)
virtual

DOF printing routine.

Called by DofManagers to print Dof specific part. Dof class provides component printing routines, but emodel is responsible for what will be printed at DOF level.

Parameters
streamoutput stream
iDofdof to be processed
tStepsolution step

Reimplemented in oofem::PFEM, oofem::CBS, oofem::SUPG, oofem::NlDEIDynamic, oofem::NonLinearDynamic, oofem::DIIDynamic, oofem::DEIDynamic, and oofem::FluidStructureProblem.

Definition at line 798 of file engngm.C.

References oofem::Dof::printSingleOutputAt().

Referenced by oofem::qcNode::printOutputAt(), and oofem::DofManager::printOutputAt().

void oofem::EngngModel::printOutputAt ( FILE *  file,
TimeStep tStep 
)
virtual
void oofem::EngngModel::printOutputAt ( FILE *  file,
TimeStep tStep,
const IntArray nodeSets,
const IntArray elementSets 
)
virtual
Todo:
Add general support for reaction forces

Definition at line 720 of file engngm.C.

References oofem::IntArray::at(), domainList, oofem::IntArray::giveSize(), outputElements(), and outputNodes().

void oofem::EngngModel::printYourself ( )

Prints state of receiver. Useful for debugging.

Definition at line 791 of file engngm.C.

References giveClassName(), giveNumberOfSteps(), and numberOfEquations.

virtual bool oofem::EngngModel::requiresEquationRenumbering ( TimeStep tStep)
inlinevirtual

Returns true if equation renumbering is required for given solution step.

This may of course change the number of equation and in general there is no guarantee that for a certain dof the same equation will be assigned. So the use of DOF unknowns dictionaries is generally recommended.

Reimplemented in oofem::NonStationaryTransportProblem, oofem::IncrementalLinearStatic, oofem::TransientTransportProblem, and oofem::StaticStructural.

Definition at line 852 of file engngm.h.

Referenced by oofem::StaggeredProblem::solveYourself(), and solveYourself().

virtual int oofem::EngngModel::requiresUnknownsDictionaryUpdate ( )
inlinevirtual

Indicates if EngngModel requires Dofs dictionaries to be updated.

If EngngModel does not support changes of static system, the dof forwards the requests for its unknowns to EngngModel, where unknowns are naturally kept. This is possible, because dof equation number is same during whole solution. But when changes of static system are allowed, several problem arise. For example by solving simple incremental static with allowed static changes, the incremental displacement vector of structure can not be added to total displacement vector of structure, because equation numbers may have changed, and one can not simply add these vector to obtain new total displacement vector, because incompatible displacement will be added. To solve this problem, unknown dictionary at dof level has been assumed. Dof then keeps its unknowns in its own private dictionary. After computing increment of solution, engngModel updates for each dof its unknowns in its dictionary (using updateUnknownsDictionary function). For aforementioned example engngModel updates incremental values but also total value by asking dof for previous total value (dof will use its dictionary, does not asks back EngngModel) adds corresponding increment and updates total value in dictionary.

Reimplemented in oofem::PFEM, oofem::SUPG, oofem::NonStationaryTransportProblem, oofem::IncrementalLinearStatic, oofem::StaticStructural, and oofem::TransientTransportProblem.

Definition at line 845 of file engngm.h.

Referenced by oofem::LinearStability::doStepOutput(), oofem::MasterDof::giveUnknown(), oofem::PetscSolver::petsc_solve(), oofem::EigenValueDynamic::printOutputAt(), oofem::LinearStability::printOutputAt(), oofem::MasterDof::restoreContext(), oofem::MasterDof::saveContext(), oofem::LinearStability::terminateLinStatic(), oofem::StructuralEngngModel::updateInternalState(), and oofem::CBS::updateInternalState().

virtual void oofem::EngngModel::resetRenumberFlag ( )
inlinevirtual

Sets the renumber flag to false.

Definition at line 422 of file engngm.h.

contextIOResultType oofem::EngngModel::restoreContext ( DataStream stream,
ContextMode  mode 
)
virtual

Restores the state of model from output stream.

Restores not only the receiver state, but also same function is invoked for all DofManagers and Elements in associated domain. Note that by restoring element context also contexts of all associated integration points (and material statuses) are restored. Each context is associated with unique time step. Only one context per time step is allowed. Restore context function will restore such context, which is related (through its step number) to time step number and version given in obj parameter. Restoring context will change current time step in order to correspond to newly restored context.

Parameters
streamContext file.
modeDetermines amount of info in stream.
Returns
contextIOResultType.
Exceptions
ContextIOERRexception if error encountered.

Reimplemented in oofem::CBS, oofem::PFEM, oofem::StaggeredProblem, oofem::SUPG, oofem::NonLinearStatic, oofem::NonStationaryTransportProblem, oofem::NlDEIDynamic, oofem::NonLinearDynamic, oofem::AdaptiveNonLinearStatic, oofem::DIIDynamic, oofem::StaticStructural, oofem::LinearStability, oofem::TransientTransportProblem, oofem::EigenValueDynamic, oofem::IncrementalLinearStatic, oofem::ProblemSequence, oofem::LinearStatic, oofem::StationaryTransportProblem, oofem::AdaptiveLinearStatic, and oofem::DarcyFlow.

Definition at line 1592 of file engngm.C.

References oofem::CIO_IOERR, oofem::CIO_OK, currentStep, domainList, domainNeqs, domainPrescribedNeqs, giveCurrentMetaStep(), giveMetaStep(), giveNumericalMethod(), initStepIncrements(), nMetaSteps, numberOfEquations, numberOfPrescribedEquations, previousStep, oofem::DataStream::read(), renumberFlag, oofem::NumericalMethod::restoreContext(), oofem::IntArray::restoreYourself(), THROW_CIOERR, updateAttributes(), and updateDomainLinks().

Referenced by oofem::HuertaErrorEstimator::estimateError(), oofem::StationaryTransportProblem::restoreContext(), oofem::LinearStatic::restoreContext(), oofem::ProblemSequence::restoreContext(), oofem::IncrementalLinearStatic::restoreContext(), oofem::EigenValueDynamic::restoreContext(), oofem::TransientTransportProblem::restoreContext(), oofem::LinearStability::restoreContext(), oofem::DIIDynamic::restoreContext(), oofem::StaticStructural::restoreContext(), oofem::NonLinearDynamic::restoreContext(), oofem::NlDEIDynamic::restoreContext(), oofem::NonStationaryTransportProblem::restoreContext(), oofem::NonLinearStatic::restoreContext(), oofem::SUPG::restoreContext(), oofem::StaggeredProblem::restoreContext(), oofem::PFEM::restoreContext(), and oofem::CBS::restoreContext().

contextIOResultType oofem::EngngModel::saveContext ( DataStream stream,
ContextMode  mode 
)
virtual

Stores the state of model to output stream.

Stores not only the receiver state, but also same function is invoked for all DofManagers and Elements in associated domain. Note that by storing element context also contexts of all associated integration points (and material statuses) are stored.

Parameters
streamContext stream.
modeDetermines amount of info in stream.
Returns
contextIOResultType.
Exceptions
ContextIOERRIf error encountered.

Reimplemented in oofem::CBS, oofem::PFEM, oofem::StaggeredProblem, oofem::SUPG, oofem::NonLinearStatic, oofem::NonStationaryTransportProblem, oofem::NlDEIDynamic, oofem::NonLinearDynamic, oofem::AdaptiveNonLinearStatic, oofem::DIIDynamic, oofem::StaticStructural, oofem::LinearStability, oofem::TransientTransportProblem, oofem::EigenValueDynamic, oofem::IncrementalLinearStatic, oofem::ProblemSequence, oofem::LinearStatic, oofem::StationaryTransportProblem, and oofem::DarcyFlow.

Definition at line 1527 of file engngm.C.

References oofem::CIO_IOERR, oofem::CIO_OK, domainList, domainNeqs, domainPrescribedNeqs, giveCurrentStep(), giveMetaStep(), giveNumericalMethod(), numberOfEquations, numberOfPrescribedEquations, renumberFlag, oofem::NumericalMethod::saveContext(), oofem::IntArray::storeYourself(), THROW_CIOERR, and oofem::DataStream::write().

Referenced by oofem::StationaryTransportProblem::saveContext(), oofem::LinearStatic::saveContext(), oofem::ProblemSequence::saveContext(), oofem::IncrementalLinearStatic::saveContext(), oofem::EigenValueDynamic::saveContext(), oofem::TransientTransportProblem::saveContext(), oofem::LinearStability::saveContext(), oofem::DIIDynamic::saveContext(), oofem::StaticStructural::saveContext(), oofem::NonLinearDynamic::saveContext(), oofem::NlDEIDynamic::saveContext(), oofem::NonStationaryTransportProblem::saveContext(), oofem::NonLinearStatic::saveContext(), oofem::SUPG::saveContext(), oofem::StaggeredProblem::saveContext(), oofem::PFEM::saveContext(), oofem::CBS::saveContext(), and saveStepContext().

void oofem::EngngModel::saveStepContext ( TimeStep tStep,
ContextMode  mode 
)
virtual void oofem::EngngModel::setActiveVector ( int  i)
inlinevirtual

Only relevant for eigen value analysis. Otherwise does noting.

Reimplemented in oofem::LinearStability, and oofem::EigenValueDynamic.

Definition at line 524 of file engngm.h.

void oofem::EngngModel::setContextOutputMode ( ContextOutputMode  contextMode)
inline

Sets context output mode of receiver.

Parameters
contextModedomain context mode.

Definition at line 388 of file engngm.h.

Referenced by oofem::InstanciateProblem(), and oofem::AdaptiveNonLinearStatic::solveYourselfAt().

void oofem::EngngModel::setDomain ( int  i,
Domain ptr,
bool  iDeallocateOld = true 
)

Sets i-th domain of receiver.

Given domain is assumed to be owned (and deleted) by receiver. The old domain, if defined, will be deleted.

Parameters
iDomain index.
ptrPointer to valid domain instance.

Definition at line 1732 of file engngm.C.

References domainList, and OOFEM_ERROR.

void oofem::EngngModel::setNumberOfEquations ( int  id,
int  neq 
)
inline

Definition at line 352 of file engngm.h.

References oofem::IntArray::at().

void oofem::EngngModel::setParallelMode ( bool  newParallelFlag)

Sets the problem to run in parallel (or not).

Parameters
parallelFlagDetermines parallel mode.

Definition at line 174 of file engngm.C.

References initParallel(), and parallelFlag.

Referenced by oofem::InstanciateProblem().

void oofem::EngngModel::setProblemMode ( problemMode  pmode)
inline

Sets domain mode to given mode.

Parameters
pmodeProblem mode.

Definition at line 404 of file engngm.h.

Referenced by oofem::InstanciateProblem().

void oofem::EngngModel::setProblemScale ( problemScale  pscale)
inline

Sets scale in multiscale simulation.

Parameters
pscaleProblem scale.

Definition at line 416 of file engngm.h.

Referenced by oofem::MacroLSpace::computeStiffnessMatrix().

virtual void oofem::EngngModel::setRenumberFlag ( )
inlinevirtual

Sets the renumber flag to true.

Reimplemented in oofem::StaggeredProblem.

Definition at line 420 of file engngm.h.

void oofem::EngngModel::setUDContextOutputMode ( int  cStep)
inline

Sets user defined context output mode (it sets contextOutputMode to contextOutputMode), setting contextOutputStep to given value.

Parameters
cStepnew context output step

Definition at line 395 of file engngm.h.

References oofem::COM_UserDefined.

Referenced by initializeFrom().

virtual void oofem::EngngModel::showSparseMtrxStructure ( int  type,
oofegGraphicContext gc,
TimeStep tStep 
)
inlinevirtual

Shows the sparse structure of required matrix, type == 1 stiffness.

Reimplemented in oofem::StaggeredProblem, oofem::StructuralEngngModel, oofem::NonLinearStatic, oofem::NonLinearDynamic, oofem::FluidStructureProblem, and oofem::ProblemSequence.

Definition at line 1130 of file engngm.h.

References oofem::errorInfo().

void oofem::EngngModel::solveYourself ( )
virtual

Starts solution process.

Implementation should invoke for each time step solveYourselfAt function with time step as parameter. Time steps are created using giveNextStep function (this will set current time step to newly created, and updates previous step).

Reimplemented in oofem::StaggeredProblem, oofem::NonLinearStatic, oofem::NlDEIDynamic, oofem::QClinearStatic, oofem::NonLinearDynamic, oofem::DIIDynamic, oofem::LinearStability, oofem::StaticStructural, oofem::FluidMaterialEvaluator, oofem::IncrementalLinearStatic, oofem::FreeWarping, oofem::StructuralMaterialEvaluator, oofem::LinearStatic, and oofem::ProblemSequence.

Definition at line 501 of file engngm.C.

References balanceLoad(), currentStep, oofem::EngngModelTimer::EMTT_AnalysisTimer, oofem::EngngModelTimer::EMTT_NetComputationalStepTimer, oofem::EngngModelTimer::EMTT_SolutionStepTimer, forceEquationNumbering(), giveCurrentStep(), giveMetaStep(), giveNextStep(), giveNumberOfDomainEquations(), giveOutputStream(), giveSolutionStepTime(), oofem::MetaStep::giveStepRelativeNumber(), initializeYourself(), initMetaStepAttributes(), oofem::EngngModelTimer::initTimer(), loadBalancingFlag, nMetaSteps, OOFEM_LOG_DEBUG, OOFEM_LOG_INFO, preInitializeNextStep(), requiresEquationRenumbering(), solveYourselfAt(), oofem::EngngModelTimer::startTimer(), oofem::EngngModelTimer::stopTimer(), suppressOutput, terminate(), timer, and updateYourself().

Referenced by oofem::HuertaErrorEstimator::solveRefinedElementProblem(), oofem::HuertaErrorEstimator::solveRefinedPatchProblem(), oofem::HuertaErrorEstimator::solveRefinedWholeProblem(), oofem::LinearStatic::solveYourself(), oofem::FreeWarping::solveYourself(), oofem::IncrementalLinearStatic::solveYourself(), oofem::StaticStructural::solveYourself(), oofem::DIIDynamic::solveYourself(), oofem::NonLinearDynamic::solveYourself(), oofem::NlDEIDynamic::solveYourself(), and oofem::NonLinearStatic::solveYourself().

virtual void oofem::EngngModel::solveYourselfAt ( TimeStep tStep)
inlinevirtual
void oofem::EngngModel::terminate ( TimeStep tStep)
virtual

Terminates the solution of time step.

Default implementation calls prinOutput() service and if specified, context of whole domain is stored and output for given time step is printed.

Reimplemented in oofem::StaggeredProblem, oofem::StructuralEngngModel, oofem::NonLinearStatic, and oofem::StaticStructural.

Definition at line 656 of file engngm.C.

References CM_Definition, CM_State, oofem::ExportModuleManager::doOutput(), doStepOutput(), exportModuleManager, giveOutputStream(), saveStepContext(), and suppressOutput.

Referenced by solveYourself(), oofem::StructuralEngngModel::terminate(), and oofem::MacroLSpace::updateYourself().

int oofem::EngngModel::unpackDofManagers ( ArrayWithNumbering dest,
ProcessCommunicator processComm 
)

Unpacking function for vector values of DofManagers .

Unpacks vector of shared/remote DofManagers from receive communication buffer of given process communicator.

Parameters
processCommTask communicator.
destDestination vector + equation numbering.
Returns
Nonzero if successful.
Todo:
Shouldn't hardcode domain number 1
Todo:
Must fix: Internal dofmanagers in bc

Definition at line 2164 of file engngm.C.

References oofem::EngngModel::ArrayWithNumbering::array, oofem::IntArray::at(), oofem::FloatArray::at(), oofem::DofManager_remote, oofem::DofManager_shared, oofem::Domain::giveDofManager(), giveDomain(), oofem::DofManager::giveParallelMode(), oofem::ProcessCommunicator::giveProcessCommunicatorBuff(), oofem::IntArray::giveSize(), oofem::ProcessCommunicator::giveToRecvMap(), oofem::EngngModel::ArrayWithNumbering::numbering, OOFEM_ERROR, and oofem::ProcessCommunicatorBuff::read().

Referenced by updateSharedDofManagers().

virtual void oofem::EngngModel::unpackMigratingData ( TimeStep tStep)
inlineprotectedvirtual

Unpacks receiver data when rebalancing load.

When rebalancing happens, the local numbering will be lost on majority of processors. Instead of identifying values of solution vectors that have to be send/received and then performing renumbering, all solution vectors are assumed to be stored in dof dictionaries before data migration. Then dofs will take care themselves for packing and unpacking. After data migration and local renumbering, the solution vectors will be restored from dof dictionary data back.

Reimplemented in oofem::NonLinearStatic, and oofem::NonLinearDynamic.

Definition at line 988 of file engngm.h.

Referenced by balanceLoad().

int oofem::EngngModel::unpackRemoteElementData ( ProcessCommunicator processComm)

Unpacks data for remote elements (which are mirrors of remote partition's local elements).

Remote elements are introduced when nonlocal constitutive models are used, in order to allow local averaging procedure (remote elements, which are involved in averaging on local partition are mirrored on this local partition) instead of implementing inefficient fine-grain communication. Remote element data are exchanged only if necessary and once for all of them. Current implementation calls unpackAndUpdateUnknowns service for all elements listed in given process communicator receive map.

Parameters
processCommCorresponding process communicator.
Returns
Nonzero if successful.

Definition at line 2114 of file engngm.C.

References oofem::IntArray::at(), oofem::Element_remote, giveCurrentStep(), giveDomain(), oofem::Domain::giveElement(), oofem::Element::giveParallelMode(), oofem::ProcessCommunicator::giveProcessCommunicatorBuff(), oofem::ProcessCommunicatorBuff::giveRecvBuff(), oofem::IntArray::giveSize(), oofem::ProcessCommunicator::giveToRecvMap(), OOFEM_ERROR, and oofem::Element::unpackAndUpdateUnknowns().

Referenced by exchangeRemoteElementData().

void oofem::EngngModel::updateAttributes ( MetaStep mStep)
virtual

Update receiver attributes according to step metaStep attributes.

Allows the certain parameters or attributes to be updated for particular metastep. The metastep provides the attributes record, from which the corresponding attributes can be read. The service takes a MetaStep parameter. It is recommended, to implement this service in such way, that multiple calls for steps belonging to same MetaStep does not change response. The default implementation updates the numerical method attributes.

Parameters
mStepMeta step.

Reimplemented in oofem::StaggeredProblem, oofem::NonLinearStatic, oofem::NonLinearDynamic, and oofem::StaticStructural.

Definition at line 589 of file engngm.C.

References oofem::MetaStep::giveAttributesRecord(), giveLoadBalancer(), giveLoadBalancerMonitor(), giveMetaStep(), oofem::MetaStep::giveNumber(), giveNumericalMethod(), oofem::LoadBalancerMonitor::initializeFrom(), oofem::NumericalMethod::initializeFrom(), and oofem::LoadBalancer::initializeFrom().

Referenced by initMetaStepAttributes(), restoreContext(), oofem::LinearStability::solveYourself(), oofem::StaticStructural::updateAttributes(), oofem::NonLinearDynamic::updateAttributes(), oofem::NonLinearStatic::updateAttributes(), and oofem::StaggeredProblem::updateAttributes().

void oofem::EngngModel::updateComponent ( TimeStep tStep,
NumericalCmpn  cmpn,
Domain d 
)
virtual

Updates components mapped to numerical method if necessary during solution process.

Some numerical methods may require updating mapped components during solution process (e.g., updating of tangent stiffness when using updated Newton-Raphson method).

Parameters
tStepTime when component is updated.
cmpnNumerical component to update.
dDomain.

Reimplemented in oofem::SUPG, oofem::NonLinearStatic, oofem::NonLinearDynamic, oofem::StokesFlow, oofem::StaticStructural, oofem::TransientTransportProblem, oofem::StationaryTransportProblem, and oofem::DarcyFlow.

Definition at line 1485 of file engngm.C.

References OOFEM_ERROR.

Referenced by oofem::CylindricalALM::do_lineSearch(), oofem::DynamicRelaxationSolver::solve(), oofem::LineSearchNM::solve(), oofem::NRSolver::solve(), and oofem::CylindricalALM::solve().

int oofem::EngngModel::updateSharedDofManagers ( FloatArray answer,
const UnknownNumberingScheme s,
int  ExchangeTag 
)

Exchanges necessary remote DofManagers data.

Todo:
The name and description of this function is misleading, the function really just accumulates the total values for shared "equations".
Parameters
answerArray with collected values.
ExchangeTagExchange tag used by communicator.
Returns
Nonzero if successful.

Definition at line 1957 of file engngm.C.

References oofem::EngngModel::ArrayWithNumbering::array, communicator, oofem::Communicator::finishExchange(), giveRank(), oofem::Communicator::initExchange(), isParallel(), oofem::EngngModel::ArrayWithNumbering::numbering, OOFEM_ERROR, oofem::Communicator::packAllData(), packDofManagers(), oofem::Communicator::unpackAllData(), unpackDofManagers(), and VERBOSEPARALLEL_PRINT.

Referenced by oofem::NonLinearStatic::assembleIncrementalReferenceLoadVectors(), oofem::DIIDynamic::assembleLoadVector(), oofem::NlDEIDynamic::computeLoadVector(), oofem::NlDEIDynamic::computeMassMtrx(), oofem::StructuralEngngModel::computeReaction(), oofem::StructuralEngngModel::giveInternalForces(), oofem::NonLinearDynamic::proceedStep(), oofem::DarcyFlow::solveYourselfAt(), oofem::StationaryTransportProblem::solveYourselfAt(), oofem::LinearStatic::solveYourselfAt(), oofem::FreeWarping::solveYourselfAt(), oofem::DEIDynamic::solveYourselfAt(), oofem::IncrementalLinearStatic::solveYourselfAt(), oofem::StaticStructural::solveYourselfAt(), oofem::StokesFlow::solveYourselfAt(), oofem::TransientTransportProblem::solveYourselfAt(), oofem::LinearStability::solveYourselfAt(), oofem::SUPG::solveYourselfAt(), oofem::NonLinearDynamic::timesMtrx(), oofem::DarcyFlow::updateComponent(), oofem::StationaryTransportProblem::updateComponent(), oofem::TransientTransportProblem::updateComponent(), oofem::StaticStructural::updateComponent(), oofem::StokesFlow::updateComponent(), and oofem::SUPG::updateComponent().

virtual int oofem::EngngModel::useNonlocalStiffnessOption ( )
inlinevirtual

Returns nonzero if nonlocal stiffness option activated.

Reimplemented in oofem::StaggeredProblem, oofem::NonLinearStatic, oofem::NonLinearDynamic, and oofem::FluidStructureProblem.

Definition at line 1054 of file engngm.h.

Referenced by oofem::SkylineUnsym::buildInternalStructure().

Member Data Documentation

MPI_Comm oofem::EngngModel::comm
protected

Communication object for this engineering model.

Definition at line 286 of file engngm.h.

Referenced by assembleVector(), EngngModel(), and initParallel().

EngngModelContext* oofem::EngngModel::context
protected

Context.

Definition at line 265 of file engngm.h.

Referenced by EngngModel(), and ~EngngModel().

ContextOutputMode oofem::EngngModel::contextOutputMode
protected
int oofem::EngngModel::contextOutputStep
protected

Definition at line 247 of file engngm.h.

Referenced by EngngModel(), and initializeFrom().

std :: string oofem::EngngModel::coreOutputFileName
protected

String with core output file name.

Definition at line 240 of file engngm.h.

Referenced by giveContextFileName(), giveDomainFileName(), and instanciateYourself().

ExportModuleManager* oofem::EngngModel::exportModuleManager
protected
bool oofem::EngngModel::force_load_rebalance_in_first_step
protected

Debug flag forcing load balancing after first step.

Definition at line 297 of file engngm.h.

Referenced by balanceLoad(), EngngModel(), and initializeFrom().

InitModuleManager* oofem::EngngModel::initModuleManager
protected

Initialization module manager.

Definition at line 252 of file engngm.h.

Referenced by EngngModel(), init(), instanciateYourself(), and ~EngngModel().

std :: vector< MetaStep > oofem::EngngModel::metaStepList
protected

List of problem metasteps.

Definition at line 227 of file engngm.h.

Referenced by giveMetaStep(), instanciateDefaultMetaStep(), instanciateMetaSteps(), and postInitialize().

enum fMode oofem::EngngModel::nonLinFormulation
protected

Type of non linear formulation (total or updated formulation).

Definition at line 271 of file engngm.h.

Referenced by EngngModel(), oofem::NLTransientTransportProblem::giveFormulation(), oofem::NonLinearDynamic::giveFormulation(), oofem::NonLinearStatic::giveFormulation(), and initializeFrom().

int oofem::EngngModel::nonlocalExt
protected

Flag indicating if nonlocal extension active, which will cause data to be sent between shared elements before computing the internal forces.

Definition at line 280 of file engngm.h.

Referenced by EngngModel(), exchangeRemoteElementData(), initializeCommMaps(), oofem::StaticStructural::initializeFrom(), oofem::NonLinearDynamic::initializeFrom(), oofem::NlDEIDynamic::initializeFrom(), oofem::NonLinearStatic::initializeFrom(), and oofem::StaticStructural::solveYourself().

int oofem::EngngModel::number
protected

Receivers id.

Definition at line 235 of file engngm.h.

Referenced by EngngModel().

int oofem::EngngModel::numberOfEquations
protected

Total number of equation in current time step.

Definition at line 211 of file engngm.h.

Referenced by oofem::AdaptiveNonLinearStatic::adaptiveRemap(), EngngModel(), forceEquationNumbering(), printYourself(), restoreContext(), and saveContext().

int oofem::EngngModel::numberOfPrescribedEquations
protected

Total number or prescribed equations in current time step.

Definition at line 213 of file engngm.h.

Referenced by oofem::AdaptiveNonLinearStatic::adaptiveRemap(), EngngModel(), forceEquationNumbering(), restoreContext(), and saveContext().

int oofem::EngngModel::numProcs
protected

Total number of collaborating processes.

Definition at line 278 of file engngm.h.

Referenced by EngngModel(), oofem::StaggeredProblem::initializeFrom(), initializeFrom(), and initParallel().

std :: vector< ParallelContext > oofem::EngngModel::parallelContextList
protected

List where parallel contexts are stored.

Definition at line 311 of file engngm.h.

Referenced by oofem::AdaptiveNonLinearStatic::adaptiveRemap(), forceEquationNumbering(), giveParallelContext(), and initParallelContexts().

int oofem::EngngModel::parallelFlag
protected

Flag indicating that the receiver runs in parallel.

Definition at line 269 of file engngm.h.

Referenced by EngngModel(), initializeFrom(), setParallelMode(), and oofem::DarcyFlow::solveYourselfAt().

problemMode oofem::EngngModel::pMode
protected
char oofem::EngngModel::processor_name[PROCESSOR_NAME_LENGTH]
protected

Processor name.

Definition at line 283 of file engngm.h.

Referenced by oofem::StaggeredProblem::initializeFrom(), initializeFrom(), and initParallel().

bool oofem::EngngModel::profileOpt
protected

Profile optimized numbering flag (using Sloan's algorithm).

Definition at line 221 of file engngm.h.

Referenced by EngngModel(), forceEquationNumbering(), and initializeFrom().

problemScale oofem::EngngModel::pScale
protected

Multiscale mode.

Definition at line 257 of file engngm.h.

Referenced by EngngModel(), oofem::NonLinearDynamic::giveNextStep(), and oofem::NonLinearStatic::giveNextStep().

int oofem::EngngModel::rank
protected

Domain rank in a group of collaborating processes (0..groupSize-1).

Definition at line 276 of file engngm.h.

Referenced by EngngModel(), errorInfo(), oofem::StaggeredProblem::initializeFrom(), initializeFrom(), and initParallel().

std :: string oofem::EngngModel::referenceFileName
protected

String with reference file name.

Definition at line 244 of file engngm.h.

Referenced by EngngModel(), and instanciateYourself().

bool oofem::EngngModel::renumberFlag
protected

Renumbering flag (renumbers equations after each step, necessary if Dirichlet BCs change).

Definition at line 219 of file engngm.h.

Referenced by EngngModel(), oofem::StaggeredProblem::initializeFrom(), initializeFrom(), restoreContext(), and saveContext().


The documentation for this class was generated from the following files:

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