59 #ifdef __PARALLEL_MODE 68 #define _IFT_EngngModel_nsteps "nsteps" 69 #define _IFT_EngngModel_contextoutputstep "contextoutputstep" 70 #define _IFT_EngngModel_renumberFlag "renumber" 71 #define _IFT_EngngModel_profileOpt "profileopt" 72 #define _IFT_EngngModel_nmsteps "nmsteps" 73 #define _IFT_EngngModel_nonLinFormulation "nonlinform" 74 #define _IFT_EngngModel_eetype "eetype" 75 #define _IFT_EngngModel_parallelflag "parallelflag" 76 #define _IFT_EngngModel_loadBalancingFlag "lbflag" 77 #define _IFT_EngngModel_forceloadBalancingFlag "forcelb1" 78 #define _IFT_EngngModel_initialGuess "initialguess" 79 #define _IFT_EngngModel_referenceFile "referencefile" 81 #define _IFT_EngngModel_lstype "lstype" 82 #define _IFT_EngngModel_smtype "smtype" 84 #define _IFT_EngngModel_suppressOutput "suppress_output" // Suppress writing to .out file 97 class MaterialInterface;
99 class NumericalMethod;
100 class InitModuleManager;
101 class ExportModuleManager;
105 class LoadBalancerMonitor;
106 class oofegGraphicContext;
107 class ProblemCommunicator;
108 class ProcessCommunicatorBuff;
109 class CommunicatorBuff;
110 class ProcessCommunicator;
111 class UnknownNumberingScheme;
281 #ifdef __PARALLEL_MODE 308 enum { InternalForcesExchangeTag, MassExchangeTag, LoadExchangeTag, ReactionExchangeTag, RemoteElementExchangeTag };
333 Domain *giveDomain(
int n);
340 void setDomain(
int i,
Domain *ptr,
bool iDeallocateOld =
true);
353 numberOfEquations = neq;
354 domainNeqs.
at(
id) = neq;
358 FILE *giveOutputStream();
375 void letOutputBaseFileNameBe(
const std :: string &src);
389 { contextOutputMode = contextMode; }
398 contextOutputStep = cStep;
409 void setParallelMode(
bool newParallelFlag);
427 double giveSolutionStepTime();
431 void giveAnalysisTime(
int &rhrs,
int &rmin,
int &rsec,
int &uhrs,
int &umin,
int &usec);
435 void terminateAnalysis();
444 virtual void solveYourself();
456 virtual void terminate(
TimeStep *tStep);
462 virtual void doStepOutput(
TimeStep *tStep);
472 virtual void updateYourself(
TimeStep *tStep);
540 int exchangeRemoteElementData(
int ExchangeTag);
547 #ifdef __PARALLEL_MODE 548 MPI_Comm giveParallelComm() {
return this->comm; }
592 if ( t == PC_default ) {
594 }
else if ( t == PC_nonlocal ) {
595 return nonlocCommunicator;
601 void initializeCommMaps(
bool forceInit =
false);
607 virtual int instanciateYourself(
DataReader &dr,
InputRecord *ir,
const char *outFileName,
const char *desc);
614 void Instanciate_init();
626 virtual int instanciateDefaultMetaStep(
InputRecord *ir);
637 virtual void updateAttributes(
MetaStep *mStep);
643 void initMetaStepAttributes(
MetaStep *mStep);
677 virtual void updateDomainLinks();
684 if ( master && (!force)) {
687 return currentStep.get();
694 if ( master && (!force)) {
697 return previousStep.get();
721 if ( master && (!force)) {
724 return stepWhenIcApply.get();
731 if ( master && (!force)) {
745 if ( master && (!force)) {
748 return numberOfSteps;
783 std :: string giveContextFileName(
int tStepNumber,
int stepVersion)
const;
789 std :: string giveDomainFileName(
int domainNum,
int domainSerNum)
const;
806 virtual void initStepIncrements();
815 virtual int forceEquationNumbering(
int i);
825 virtual int forceEquationNumbering();
878 virtual void initParallelContexts();
1000 virtual int checkProblemConsistency();
1005 virtual void init();
1010 virtual void postInitialize();
1016 virtual void printOutputAt(FILE *file,
TimeStep *tStep);
1025 void outputNodes(FILE *file,
Domain &domain,
TimeStep *tStep,
int setNum);
1033 void outputElements(FILE *file,
Domain &domain,
TimeStep *tStep,
int setNum);
1037 void printYourself();
1047 virtual void printDofOutputAt(FILE *stream,
Dof *iDof,
TimeStep *tStep);
1052 virtual const char *giveClassName()
const = 0;
1100 #ifdef __PARALLEL_MODE 1108 virtual void balanceLoad(
TimeStep *tStep);
1114 void initParallel();
1134 std :: string
errorInfo(
const char *func)
const;
EngngModelTimer timer
E-model timer.
virtual EngngModel * giveSlaveProblem(int i)
Returns i-th slave problem.
virtual void setActiveVector(int i)
Only relevant for eigen value analysis. Otherwise does noting.
FILE * outputStream
Output stream.
std::unique_ptr< TimeStep > currentStep
Current time step.
virtual FieldPtr giveField(FieldType key, TimeStep *)
Returns the smart pointer to requested field, Null otherwise.
std::string simulationDescription
std::string giveOutputBaseFileName()
Returns base output file name to which extensions, like .out .vtu .osf should be added.
virtual bool isElementActivated(Element *e)
bool profileOpt
Profile optimized numbering flag (using Sloan's algorithm).
std::shared_ptr< Field > FieldPtr
virtual bool requiresEquationRenumbering(TimeStep *tStep)
Returns true if equation renumbering is required for given solution step.
LoadBalancerMonitor * lbm
problemScale giveProblemScale()
Returns scale in multiscale simulation.
std::string dataOutputFileName
Path to output stream.
FieldType
Physical type of field.
Base class for all matrices stored in sparse format.
ProblemCommunicator * giveProblemCommunicator(EngngModelCommType t)
ContextOutputMode giveContextOutputMode()
Returns domain context output mode.
Class representing communicator for engng model.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
std::string coreOutputFileName
String with core output file name.
virtual void packMigratingData(TimeStep *tStep)
Packs receiver data when rebalancing load.
std::vector< std::unique_ptr< Domain > > domainList
List of problem domains.
problemMode giveProblemMode()
Returns domain mode.
std::unique_ptr< TimeStep > previousStep
Previous time step.
ExportModuleManager * giveExportModuleManager()
Returns receiver's export module manager.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
virtual int requiresUnknownsDictionaryUpdate()
Indicates if EngngModel requires Dofs dictionaries to be updated.
int nonlocalExt
Flag indicating if nonlocal extension active, which will cause data to be sent between shared element...
VarScaleType
Type determining the scale corresponding to particular variable.
bool giveSuppressOutput() const
This base class is an abstraction for numerical algorithm.
virtual MaterialInterface * giveMaterialInterface(int n)
Returns material interface representation for given domain.
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
std::unique_ptr< TimeStep > stepWhenIcApply
Solution step when IC (initial conditions) apply.
time_t startTime
Solution start time.
ErrorEstimator * defaultErrEstimator
Error estimator. Useful for adaptivity, or simply printing errors output.
int numProcs
Total number of collaborating processes.
bool isParallel() const
Returns true if receiver in parallel mode.
Abstract base class for all finite elements.
virtual TimeStep * giveNextStep()
Returns next time step (next to current step) of receiver.
Base class for dof managers.
int giveNumberOfProcesses() const
Returns the number of collaborating processes.
bool force_load_rebalance_in_first_step
Debug flag forcing load balancing after first step.
Class representing the abstraction for input data source.
virtual int giveNewPrescribedEquationNumber(int domain, DofIDItem)
Increases number of prescribed equations of receiver's domain and returns newly created equation numb...
virtual void setRenumberFlag()
Sets the renumber flag to true.
FieldManager * giveFieldManager()
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
void setProblemMode(problemMode pmode)
Sets domain mode to given mode.
virtual int useNonlocalStiffnessOption()
Returns nonzero if nonlocal stiffness option activated.
void setNumberOfEquations(int id, int neq)
problemScale
Corresponds to macro- and micro-problem in multiscale simulations.
const UnknownNumberingScheme * numbering
Class representing and implementing InitModuleManager.
problemMode pMode
Domain mode.
InitModuleManager * initModuleManager
Initialization module manager.
Class representing and implementing ExportModuleManager.
virtual int giveNewEquationNumber(int domain, DofIDItem)
Increases number of equations of receiver's domain and returns newly created equation number...
bool loadBalancingFlag
If set to true, load balancing is active.
ProblemCommunicator * nonlocCommunicator
NonLocal Communicator. Necessary when nonlocal constitutive models are used.
virtual void preInitializeNextStep()
Does a pre-initialization of the next time step (implement if necessarry)
int giveContextOutputStep()
Returns domain context output step.
virtual NumericalMethod * giveNumericalMethod(MetaStep *mStep)
Returns reference to receiver's numerical method.
Callback class for assembling specific types of vectors.
NumericalCmpn
Type representing numerical component.
IntArray domainPrescribedNeqs
Number of prescribed equations per domain.
EngngModelContext * giveContext()
Context requesting service.
virtual double giveVariableScale(VarScaleType varId)
Returns the scale factor for given variable type.
Callback class for assembling specific types of matrices.
int numberOfSteps
Total number of time steps.
int ndomains
Number of receiver domains.
DofIDItem
Type representing particular dof type.
int rank
Domain rank in a group of collaborating processes (0..groupSize-1).
EngngModelContext * context
Context.
Abstract base class representing (moving) material interfaces.
virtual void resetRenumberFlag()
Sets the renumber flag to false.
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
std::string giveReferenceFileName()
Returns reference file name.
int giveNumberOfSteps(bool force=false)
Returns total number of steps.
ProblemCommunicator * communicator
Communicator.
InitialGuess
Means to choose methods for finding a good initial guess.
Class representing process communicator for engineering model.
virtual fMode giveFormulation()
Indicates type of non linear computation (total or updated formulation).
EngngModel * master
Master e-model; if defined receiver is in maintained (slave) mode.
const time_t & giveStartTime()
virtual double giveLoadLevel()
Returns the current load level.
CommunicatorBuff * commBuff
Common Communicator buffer.
int nMetaSteps
Number of meta steps.
virtual int giveNumberOfFirstStep(bool force=false)
Returns number of first time step used by receiver.
ExportModuleManager * exportModuleManager
Export module manager.
EngngModel * giveMasterEngngModel()
Returns the master engnmodel.
virtual int initializeAdaptive(int tStepNumber)
Initializes the newly generated discretization state according to previous solution.
virtual double giveEndOfTimeOfInterest()
Returns end of time interest (time corresponding to end of time integration).
virtual int giveCurrentNumberOfIterations()
Returns number of iterations that was required to reach equilibrium - used for adaptive step length i...
The base class for all error estimation or error indicator algorithms.
Abstract base class representing general load balancer.
virtual void unpackMigratingData(TimeStep *tStep)
Unpacks receiver data when rebalancing load.
int giveNumberOfMetaSteps()
Return number of meta steps.
Class representing vector of real numbers.
virtual int checkConsistency()
Allows programmer to test some receiver's internal data, before computation begins.
IntArray domainNeqs
Number of equations per domain.
Input attribute of domain (each n-th step).
IRResultType
Type defining the return values of InputRecord reading operations.
virtual void initializeYourself(TimeStep *tStep)
Provides the opportunity to initialize state variables stored in element integration points according...
virtual int estimateMaxPackSize(IntArray &commMap, DataStream &buff, int packUnpackType)
Determines the space necessary for send/receive buffer.
virtual void updateDofUnknownsDictionary(DofManager *, TimeStep *)
Updates necessary values in Dofs unknown dictionaries.
virtual int giveNumberOfSlaveProblems()
Returns number of slave problems.
Timer class, assumed to be an attribute of engineering model, serving stop-watch facility for enginee...
virtual bool isElementActivated(int elemNum)
int giveNumberOfTimeStepWhenIcApply()
Returns the time step number, when initial conditions should apply.
This class provides an communication context for distributed memory parallelism.
#define PROCESSOR_NAME_LENGTH
virtual bool giveEquationScalingFlag()
Returns the Equation scaling flag, which is used to indicate that governing equation(s) are scaled...
virtual int giveUnknownDictHashIndx(ValueModeType mode, TimeStep *tStep)
This method is responsible for computing unique dictionary id (ie hash value) from given valueModeTyp...
fMode
Type representing the type of formulation (total or updated) of non-linear computation.
int parallelFlag
Flag indicating that the receiver runs in parallel.
int giveNumberOfDomains()
Returns number of domains in problem.
std::string referenceFileName
String with reference file name.
int giveRank() const
Returns domain rank in a group of collaborating processes (0..groupSize-1)
Class EngngModelContext represents a context, which is shared by all problem engng sub-models...
virtual double giveEigenValue(int eigNum)
Only relevant for eigen value analysis. Otherwise returns zero.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
const std::string & giveDescription() const
virtual ErrorEstimator * giveDomainErrorEstimator(int n)
Service for accessing ErrorEstimator corresponding to particular domain.
bool renumberFlag
Renumbering flag (renumbers equations after each step, necessary if Dirichlet BCs change)...
std::string errorInfo(const char *func)
virtual TimeStep * givePreviousStep(bool force=false)
Returns previous time step.
bool suppressOutput
Flag for suppressing output to file.
virtual TimeStep * giveSolutionStepWhenIcApply(bool force=false)
Returns the solution step when Initial Conditions (IC) apply.
void setUDContextOutputMode(int cStep)
Sets user defined context output mode (it sets contextOutputMode to contextOutputMode), setting contextOutputStep to given value.
virtual double giveUnknownComponent(ValueModeType, TimeStep *, Domain *, Dof *)
Returns requested unknown.
The Communicator and corresponding buffers (represented by this class) are separated in order to allo...
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
void setContextOutputMode(ContextOutputMode contextMode)
Sets context output mode of receiver.
Abstract base class representing the "problem" under consideration.
virtual TimeStep * giveCurrentStep(bool force=false)
Returns current time step.
the oofem namespace is to define a context or scope in which all oofem names are defined.
problemScale pScale
Multiscale mode.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
std::vector< MetaStep > metaStepList
List of problem metasteps.
ContextOutputMode contextOutputMode
Domain context output mode.
virtual void showSparseMtrxStructure(int type, oofegGraphicContext &gc, TimeStep *tStep)
Shows the sparse structure of required matrix, type == 1 stiffness.
virtual LoadBalancer * giveLoadBalancer()
Returns reference to receiver's load balancer.
int numberOfPrescribedEquations
Total number or prescribed equations in current time step.
FieldManager fieldManager
Common fieldManager providing shared field register for the problem.
virtual LoadBalancerMonitor * giveLoadBalancerMonitor()
Returns reference to receiver's load balancer monitor.
std::vector< ParallelContext > parallelContextList
List where parallel contexts are stored.
Helper struct to pass array and numbering scheme as a single argument.
EngngModelTimer * giveTimer()
Returns reference to receiver timer (EngngModelTimer).
EngngModel * giveEngngModel()
Returns reference to itself -> required by communicator.h.
Class representing solution step.
void setProblemScale(problemScale pscale)
Sets scale in multiscale simulation.
Abstract base class representing general load balancer monitor.
int numberOfEquations
Total number of equation in current time step.
int equationNumberingCompleted
Equation numbering completed flag.