OOFEM 3.0
Loading...
Searching...
No Matches
oofem::AdditiveManufacturingProblem Class Reference

#include <additivemanufacturingproblem.h>

Inheritance diagram for oofem::AdditiveManufacturingProblem:
Collaboration diagram for oofem::AdditiveManufacturingProblem:

Public Member Functions

 AdditiveManufacturingProblem (int i, EngngModel *_master=nullptr)
virtual ~AdditiveManufacturingProblem ()
 Destructor.
 AdditiveManufacturingProblem (const AdditiveManufacturingProblem &)=delete
AdditiveManufacturingProblemoperator= (const AdditiveManufacturingProblem &)=delete
void setContextOutputMode (ContextOutputMode contextMode)
void setUDContextOutputMode (int cStep)
void setProblemMode (problemMode pmode)
void setRenumberFlag () override
 Sets the renumber flag to true.
void solveYourself () override
void solveYourselfAt (TimeStep *tStep) override
int forceEquationNumbering () override
void updateYourself (TimeStep *tStep) override
void initializeYourself (TimeStep *tStep) override
int initializeAdaptive (int tStepNumber) override
void terminate (TimeStep *tStep) override
void doStepOutput (TimeStep *tStep) override
int instanciateYourself (DataReader &dr, InputRecord &ir, const char *outFileName, const char *desc) override
void initializeFrom (InputRecord &ir) override
void updateAttributes (MetaStep *mStep) override
void saveContext (DataStream &stream, ContextMode mode) override
void restoreContext (DataStream &stream, ContextMode mode) override
void updateDomainLinks () override
void printYourself ()
void printOutputAt (FILE *file, TimeStep *tStep) override
TimeStepgiveCurrentStep (bool force=false) override
TimeStepgivePreviousStep (bool force=false) override
TimeStepgiveSolutionStepWhenIcApply (bool force=false) override
EngngModelgiveTimeControl ()
int giveNumberOfFirstStep (bool force=false) override
TimeStepgiveNextStep () override
 Returns next time step (next to current step) of receiver.
const char * giveClassName () const override
 Returns class name of the receiver.
virtual const char * giveInputRecordName () const
int useNonlocalStiffnessOption () override
 Returns nonzero if nonlocal stiffness option activated.
fMode giveFormulation () override
FunctiongiveDtFunction ()
double giveDeltaT (int n)
double giveDiscreteTime (int n)
void giveCoupledModels (IntArray &answer)
 Returns list of model number that this model is coupled with. Used for staggered approach.
FieldPtr giveField (FieldType key, TimeStep *tStep) override
void drawYourself (oofegGraphicContext &gc) override
void drawElements (oofegGraphicContext &gc) override
void drawNodes (oofegGraphicContext &gc) override
void showSparseMtrxStructure (int type, oofegGraphicContext &gc, TimeStep *tStep) override
int checkProblemConsistency () override
EngngModelgiveSlaveProblem (int i) override
 Returns i-th slave problem.
int giveNumberOfSlaveProblems () override
 Returns number of slave problems.
int instanciateDefaultMetaStep (InputRecord &ir) override
 Instanciate default metastep, if nmsteps is zero.
 EngngModel (int i, EngngModel *_master=NULL)
virtual ~EngngModel ()
 Destructor.
 EngngModel (const EngngModel &)=delete
EngngModeloperator= (const EngngModel &)=delete
DomaingiveDomain (int n)
void setDomain (int i, Domain *ptr, bool iDeallocateOld=true)
int giveNumberOfDomains ()
 Returns number of domains in problem.
const std::string & giveDescription () const
const time_t & giveStartTime ()
bool giveSuppressOutput () const
virtual ErrorEstimatorgiveDomainErrorEstimator (int n)
virtual MaterialInterfacegiveMaterialInterface (int n)
void setNumberOfEquations (int id, int neq)
FILE * giveOutputStream ()
 Returns file descriptor of output file.
std::string giveOutputBaseFileName ()
std::string giveReferenceFileName ()
void letOutputBaseFileNameBe (const std ::string &src)
ContextOutputMode giveContextOutputMode () const
int giveContextOutputStep () const
void setContextOutputMode (ContextOutputMode contextMode)
void setUDContextOutputMode (int cStep)
double giveDeltaT ()
 Returns time step size from the time step controlelr.
void setDeltaT (double dT)
 Returns time step size through the time step controlelr.
void setProblemMode (problemMode pmode)
void setParallelMode (bool newParallelFlag)
problemMode giveProblemMode () const
 Returns domain mode.
void setProblemScale (problemScale pscale)
problemScale giveProblemScale () const
 Returns scale in multiscale simulation.
virtual void resetRenumberFlag ()
 Sets the renumber flag to false.
double giveSolutionStepTime ()
void giveAnalysisTime (int &rhrs, int &rmin, int &rsec, int &uhrs, int &umin, int &usec)
void terminateAnalysis ()
virtual void restartYourself (TimeStep *tS)
void saveStepContext (TimeStep *tStep, ContextMode mode)
virtual int giveNumberOfDomainEquations (int di, const UnknownNumberingScheme &num)
virtual double giveUnknownComponent (ValueModeType, TimeStep *, Domain *, Dof *)
virtual FieldPtr giveField (InternalStateType key, TimeStep *)
EngngModelgiveMasterEngngModel ()
 Returns the master engnmodel.
virtual double giveLoadLevel ()
 Returns the current load level.
virtual double giveEigenValue (int eigNum)
 Only relevant for eigen value analysis. Otherwise returns zero.
virtual void setActiveVector (int i)
 Only relevant for eigen value analysis. Otherwise does noting.
int updateSharedDofManagers (FloatArray &answer, const UnknownNumberingScheme &s, int ExchangeTag)
int exchangeRemoteElementData (int ExchangeTag)
virtual int giveCurrentNumberOfIterations ()
MPI_Comm giveParallelComm ()
 Returns the communication object of reciever.
int packRemoteElementData (ProcessCommunicator &processComm)
int unpackRemoteElementData (ProcessCommunicator &processComm)
int packDofManagers (ArrayWithNumbering *src, ProcessCommunicator &processComm)
int unpackDofManagers (ArrayWithNumbering *dest, ProcessCommunicator &processComm)
ProblemCommunicatorgiveProblemCommunicator (EngngModelCommType t)
void initializeCommMaps (bool forceInit=false)
void Instanciate_init ()
int instanciateDomains (DataReader &dr)
 Instanciate problem domains by calling their instanciateYourself() service.
int instanciateMetaSteps (DataReader &dr)
 Instanciate problem meta steps by calling their instanciateYourself() service.
void initMetaStepAttributes (MetaStep *mStep)
MetaStepgiveCurrentMetaStep ()
 Returns current meta step.
virtual void adaptTimeStep (double nIter)
virtual void preInitializeNextStep ()
 Does a pre-initialization of the next time step (implement if necessarry).
int giveNumberOfMetaSteps ()
 Return number of meta steps.
MetaStepgiveMetaStep (int i)
 Returns the i-th meta step.
int giveNumberOfSteps (bool force=false)
virtual double giveEndOfTimeOfInterest ()
 Returns end of time interest (time corresponding to end of time integration).
int giveNumberOfTimeStepWhenIcApply ()
 Returns the time step number, when initial conditions should apply.
virtual NumericalMethodgiveNumericalMethod (MetaStep *mStep)
 Returns reference to receiver's numerical method.
ExportModuleManagergiveExportModuleManager ()
 Returns receiver's export module manager.
EngngModelTimergiveTimer ()
 Returns reference to receiver timer (EngngModelTimer).
virtual double giveInitialTime ()
 return time at the begining of analysis
virtual double giveFinalTime ()
virtual int giveNewEquationNumber (int domain, DofIDItem)
virtual int giveNewPrescribedEquationNumber (int domain, DofIDItem)
std::string giveContextFileName (int tStepNumber, int stepVersion) const
std::string giveDomainFileName (int domainNum, int domainSerNum) const
virtual void updateComponent (TimeStep *tStep, NumericalCmpn cmpn, Domain *d)
virtual void initForNewIteration (Domain *d, TimeStep *tStep, int iterationNumber, const FloatArray &solution)
virtual void updateSolution (FloatArray &solutionVector, TimeStep *tStep, Domain *d)
virtual void updateInternalRHS (FloatArray &answer, TimeStep *tStep, Domain *d, FloatArray *eNorm)
virtual void updateMatrix (SparseMtrx &mat, TimeStep *tStep, Domain *d)
virtual void initStepIncrements ()
virtual int forceEquationNumbering (int i)
virtual int requiresUnknownsDictionaryUpdate ()
virtual bool requiresEquationRenumbering (TimeStep *tStep)
virtual void updateDofUnknownsDictionary (DofManager *, TimeStep *)
virtual int giveUnknownDictHashIndx (ValueModeType mode, TimeStep *tStep)
virtual bool newDofHandling ()
virtual ParallelContextgiveParallelContext (int n)
virtual void initParallelContexts ()
virtual void assemble (SparseMtrx &answer, TimeStep *tStep, const MatrixAssembler &ma, const UnknownNumberingScheme &s, Domain *domain)
virtual void assemble (SparseMtrx &answer, TimeStep *tStep, const MatrixAssembler &ma, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, Domain *domain)
void assembleVector (FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
void assembleVectorFromDofManagers (FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
void assembleVectorFromElements (FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
void assembleVectorFromBC (FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
void assembleExtrapolatedForces (FloatArray &answer, TimeStep *tStep, CharType type, Domain *domain)
void assemblePrescribedExtrapolatedForces (FloatArray &answer, TimeStep *tStep, CharType type, Domain *domain)
virtual int checkConsistency ()
virtual void init ()
virtual void postInitialize ()
virtual void printOutputAt (FILE *file, TimeStep *tStep, const IntArray &nodeSets, const IntArray &elementSets)
void outputNodes (FILE *file, Domain &domain, TimeStep *tStep, int setNum)
void outputElements (FILE *file, Domain &domain, TimeStep *tStep, int setNum)
void printYourself ()
 Prints state of receiver. Useful for debugging.
virtual void printDofOutputAt (FILE *stream, Dof *iDof, TimeStep *tStep)
bool isParallel () const
 Returns true if receiver in parallel mode.
int giveRank () const
 Returns domain rank in a group of collaborating processes (0..groupSize-1).
int giveNumberOfProcesses () const
 Returns the number of collaborating processes.
EngngModelContextgiveContext ()
 Context requesting service.
virtual bool giveEquationScalingFlag ()
 Returns the Equation scaling flag, which is used to indicate that governing equation(s) are scaled, or non-dimensionalized.
virtual double giveVariableScale (VarScaleType varId)
 Returns the scale factor for given variable type.
virtual int estimateMaxPackSize (IntArray &commMap, DataStream &buff, int packUnpackType)
virtual void balanceLoad (TimeStep *tStep)
virtual LoadBalancergiveLoadBalancer ()
virtual LoadBalancerMonitorgiveLoadBalancerMonitor ()
void initParallel ()
 Request domain rank and problem size.
EngngModelgiveEngngModel ()
 Returns reference to itself -> required by communicator.h.
virtual bool isElementActivated (int elemNum)
virtual bool isElementActivated (Element *e)
TimeStepControllergiveTimeStepController ()
 Returns the time step controller.
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros).

Protected Member Functions

int instanciateSlaveProblems ()
bool add_node_if_not_exists2 (EngngModel *emodel, const VoxelNode &cn)
void add_element_if_not_exists2 (EngngModel *emodel, Voxel &cn)
bool add_sm_node_if_not_exists2 (EngngModel *emodel, const VoxelNode &cn)
void add_sm_element_if_not_exists2 (EngngModel *emodel, Voxel &cn)
virtual void packMigratingData (TimeStep *tStep)
virtual void unpackMigratingData (TimeStep *tStep)

Protected Attributes

Printer printer = Printer()
double stepX
double stepY
double stepZ
double minVOF
bool skipSM = true
Timer totalTimer
std ::vector< std ::unique_ptr< EngngModel > > emodelList
 List of engineering models to solve sequentially.
double deltaT
std ::vector< std ::string > inputStreamNames
int dtFunction
 Associated time function for time step increment.
double stepMultiplier
FloatArray discreteTimes
 Specified times where the problem is solved.
int timeDefinedByProb
 Optional parameter which specify problems to define load time functions.
IntArray coupledModels
 List of slave models to which this model is coupled.
bool adaptiveStepLength
double minStepLength
 adaptive time step length - minimum
double maxStepLength
 adaptive time step length - maximum
double reqIterations
 adaptive time step length - required (=optimum) number of iterations
double adaptiveStepSince
 adaptive time step length applies after prescribed time
double endOfTimeOfInterest
double prevStepLength
double currentStepLength
std::string gCodeFilePath = ""
int maxPrinterCommands = -1
std ::shared_ptr< VoxelVOFFieldvoxelVofField
Protected Attributes inherited from oofem::EngngModel
int ndomains
 Number of receiver domains.
std ::vector< std ::unique_ptr< Domain > > domainList
 List of problem domains.
int numberOfSteps
 Total number of time steps.
int numberOfEquations
 Total number of equation in current time step.
int numberOfPrescribedEquations
 Total number or prescribed equations in current time step.
IntArray domainNeqs
 Number of equations per domain.
IntArray domainPrescribedNeqs
 Number of prescribed equations per domain.
bool renumberFlag
 Renumbering flag (renumbers equations after each step, necessary if Dirichlet BCs change).
bool profileOpt
 Profile optimized numbering flag (using Sloan's algorithm).
int equationNumberingCompleted
 Equation numbering completed flag.
int nMetaSteps
 Number of meta steps.
std ::vector< MetaStepmetaStepList
 List of problem metasteps.
std ::unique_ptr< TimeStepstepWhenIcApply
 Solution step when IC (initial conditions) apply.
std ::unique_ptr< TimeStepcurrentStep
 Current time step.
std ::unique_ptr< TimeSteppreviousStep
 Previous time step.
int number
 Receivers id.
std::string dataOutputFileName
 Path to output stream.
std::string coreOutputFileName
 String with core output file name.
FILE * outputStream
 Output stream.
std::string referenceFileName
 String with reference file name.
ContextOutputMode contextOutputMode
 Domain context output mode.
int contextOutputStep
ExportModuleManager exportModuleManager
 Export module manager.
InitModuleManager initModuleManager
 Initialization module manager.
MonitorManager monitorManager
 Monitor manager.
problemMode pMode
 Domain mode.
problemScale pScale
 Multiscale mode.
time_t startTime
 Solution start time.
EngngModelmaster
 Master e-model; if defined receiver is in maintained (slave) mode.
EngngModelContextcontext
 Context.
EngngModelTimer timer
 E-model timer.
int parallelFlag
 Flag indicating that the receiver runs in parallel.
enum fMode nonLinFormulation
 Type of non linear formulation (total or updated formulation).
std::unique_ptr< ErrorEstimatordefaultErrEstimator
 Error estimator. Useful for adaptivity, or simply printing errors output.
std::unique_ptr< TimeStepControllertimeStepController
 Time Step controller is responsible for collecting data from analysis, elements, and materials, and select the appropriate timestep size for the next step, or reduce the step in case of convergence problems.
int rank
 Domain rank in a group of collaborating processes (0..groupSize-1).
int numProcs
 Total number of collaborating processes.
int nonlocalExt
 Flag indicating if nonlocal extension active, which will cause data to be sent between shared elements before computing the internal forces.
char processor_name [PROCESSOR_NAME_LENGTH]
 Processor name.
MPI_Comm comm
 Communication object for this engineering model.
std::unique_ptr< LoadBalancerlb
 Load Balancer.
std::unique_ptr< LoadBalancerMonitorlbm
bool loadBalancingFlag
 If set to true, load balancing is active.
bool force_load_rebalance_in_first_step
 Debug flag forcing load balancing after first step.
CommunicatorBuffcommBuff
 Common Communicator buffer.
ProblemCommunicatorcommunicator
 Communicator.
ProblemCommunicatornonlocCommunicator
 NonLocal Communicator. Necessary when nonlocal constitutive models are used.
std ::vector< ParallelContextparallelContextList
 List where parallel contexts are stored.
bool suppressOutput
 Flag for suppressing output to file.
std::string simulationDescription

Additional Inherited Members

Public Types inherited from oofem::EngngModel
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 }
Protected Types inherited from oofem::EngngModel
enum  {
  InternalForcesExchangeTag , MassExchangeTag , LoadExchangeTag , ReactionExchangeTag ,
  RemoteElementExchangeTag
}
 Message tags. More...

Detailed Description

Implementation of general sequence (staggered) problem. The problem consists in sequence of low level problems (slaves) which are executed sequentially and where the results of particular slave depends on the results of previous slaves in sequence. Typical example is heat&mass transfer analysis followed by mechanical one, which takes into account the temperature field from the first analysis.

The sequence problem is represented by this class. It maintains list of subsequent (slave) problems and it is executes the slave problems. It is responsible for solution step generation and synchronization between slave problems. The transfer of required state variables is done by mapping of corresponding variables between problem domains. This allows to to transfer primary (nodal) values of one problem to integration points of subsequent problem or to use completely different discretizations for slave problems.

Since the master problem is responsible for synchronization, it is responsible for generation the solution steps. Therefore, the solution step specification, as well as relevant meta step attributes are specified at master level.

Note
To avoid confusion, the slaves are treated in so-called maintained mode. In this mode, the attributes and meta step attributes are taken from the master. The local attributes, even if specified, are ignored.

Definition at line 109 of file additivemanufacturingproblem.h.

Constructor & Destructor Documentation

◆ AdditiveManufacturingProblem() [1/2]

oofem::AdditiveManufacturingProblem::AdditiveManufacturingProblem ( int i,
EngngModel * _master = nullptr )

◆ ~AdditiveManufacturingProblem()

oofem::AdditiveManufacturingProblem::~AdditiveManufacturingProblem ( )
virtual

Destructor.

Definition at line 530 of file additivemanufacturingproblem.C.

References OOFEM_LOG_INFO, and totalTimer.

◆ AdditiveManufacturingProblem() [2/2]

oofem::AdditiveManufacturingProblem::AdditiveManufacturingProblem ( const AdditiveManufacturingProblem & )
delete

Member Function Documentation

◆ add_element_if_not_exists2()

◆ add_node_if_not_exists2()

◆ add_sm_element_if_not_exists2()

◆ add_sm_node_if_not_exists2()

◆ checkProblemConsistency()

int oofem::AdditiveManufacturingProblem::checkProblemConsistency ( )
overridevirtual

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

Returns
Nonzero if receiver check is o.k.

Reimplemented from oofem::EngngModel.

Definition at line 1176 of file additivemanufacturingproblem.C.

References emodelList, OOFEM_LOG_DEBUG, and VERBOSE_PRINTS.

◆ doStepOutput()

void oofem::AdditiveManufacturingProblem::doStepOutput ( TimeStep * tStep)
overridevirtual

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 from oofem::EngngModel.

Definition at line 1131 of file additivemanufacturingproblem.C.

References emodelList.

◆ drawElements()

void oofem::AdditiveManufacturingProblem::drawElements ( oofegGraphicContext & gc)
overridevirtual

Reimplemented from oofem::EngngModel.

Definition at line 1221 of file additivemanufacturingproblem.C.

References gc, giveNumberOfSlaveProblems(), and giveSlaveProblem().

◆ drawNodes()

void oofem::AdditiveManufacturingProblem::drawNodes ( oofegGraphicContext & gc)
overridevirtual

Reimplemented from oofem::EngngModel.

Definition at line 1229 of file additivemanufacturingproblem.C.

References gc, giveNumberOfSlaveProblems(), and giveSlaveProblem().

◆ drawYourself()

void oofem::AdditiveManufacturingProblem::drawYourself ( oofegGraphicContext & gc)
overridevirtual

Reimplemented from oofem::EngngModel.

Definition at line 1213 of file additivemanufacturingproblem.C.

References gc, giveNumberOfSlaveProblems(), and giveSlaveProblem().

◆ forceEquationNumbering()

int oofem::AdditiveManufacturingProblem::forceEquationNumbering ( )
overridevirtual

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 from oofem::EngngModel.

Definition at line 1098 of file additivemanufacturingproblem.C.

References emodelList.

Referenced by setProblemMode(), and solveYourself().

◆ giveClassName()

const char * oofem::AdditiveManufacturingProblem::giveClassName ( ) const
inlineoverridevirtual

Returns class name of the receiver.

Implements oofem::EngngModel.

Definition at line 219 of file additivemanufacturingproblem.h.

◆ giveCoupledModels()

void oofem::AdditiveManufacturingProblem::giveCoupledModels ( IntArray & answer)
inline

Returns list of model number that this model is coupled with. Used for staggered approach.

Definition at line 242 of file additivemanufacturingproblem.h.

References coupledModels.

◆ giveCurrentStep()

TimeStep * oofem::AdditiveManufacturingProblem::giveCurrentStep ( bool force = false)
overridevirtual

Returns current time step.

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

Reimplemented from oofem::EngngModel.

Definition at line 870 of file additivemanufacturingproblem.C.

References emodelList, and timeDefinedByProb.

Referenced by printYourself().

◆ giveDeltaT()

◆ giveDiscreteTime()

double oofem::AdditiveManufacturingProblem::giveDiscreteTime ( int n)

Returns time for time step number n (array discreteTimes must be specified)

Definition at line 855 of file additivemanufacturingproblem.C.

References discreteTimes, and OOFEM_ERROR.

Referenced by giveDeltaT().

◆ giveDtFunction()

Function * oofem::AdditiveManufacturingProblem::giveDtFunction ( )

Returns time function for time step increment. Used time function should provide step lengths as function of step number. Initial step with number 0 is considered as [ -dt(0), 0 ], first step is [ 0, dt(1) ], ...

Definition at line 784 of file additivemanufacturingproblem.C.

References dtFunction, and oofem::EngngModel::giveDomain().

Referenced by giveDeltaT().

◆ giveField()

FieldPtr oofem::AdditiveManufacturingProblem::giveField ( FieldType key,
TimeStep *  )
inlineoverridevirtual

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 from oofem::EngngModel.

Definition at line 243 of file additivemanufacturingproblem.h.

◆ giveFormulation()

fMode oofem::AdditiveManufacturingProblem::giveFormulation ( )
inlineoverridevirtual

Indicates type of non linear computation (total or updated formulation). This is used for example on Nodal level to update coordinates if updated formulation is done, or on element level, when non linear contributions are computed.

Reimplemented from oofem::EngngModel.

Definition at line 223 of file additivemanufacturingproblem.h.

References oofem::UNKNOWN.

◆ giveInputRecordName()

virtual const char * oofem::AdditiveManufacturingProblem::giveInputRecordName ( ) const
inlinevirtual

◆ giveNextStep()

TimeStep * oofem::AdditiveManufacturingProblem::giveNextStep ( )
overridevirtual

◆ giveNumberOfFirstStep()

int oofem::AdditiveManufacturingProblem::giveNumberOfFirstStep ( bool force = false)
overridevirtual

Returns number of first time step used by receiver.

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

Reimplemented from oofem::EngngModel.

Definition at line 917 of file additivemanufacturingproblem.C.

References emodelList, and timeDefinedByProb.

Referenced by giveNextStep(), giveSolutionStepWhenIcApply(), and printYourself().

◆ giveNumberOfSlaveProblems()

int oofem::AdditiveManufacturingProblem::giveNumberOfSlaveProblems ( )
inlineoverridevirtual

Returns number of slave problems.

Reimplemented from oofem::EngngModel.

Definition at line 261 of file additivemanufacturingproblem.h.

References inputStreamNames.

Referenced by drawElements(), drawNodes(), drawYourself(), giveDeltaT(), and giveSlaveProblem().

◆ givePreviousStep()

TimeStep * oofem::AdditiveManufacturingProblem::givePreviousStep ( bool force = false)
overridevirtual

Returns previous time step.

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

Reimplemented from oofem::EngngModel.

Definition at line 880 of file additivemanufacturingproblem.C.

References emodelList, and timeDefinedByProb.

Referenced by printYourself().

◆ giveSlaveProblem()

EngngModel * oofem::AdditiveManufacturingProblem::giveSlaveProblem ( int i)
overridevirtual

Returns i-th slave problem.

Reimplemented from oofem::EngngModel.

Definition at line 1164 of file additivemanufacturingproblem.C.

References emodelList, giveNumberOfSlaveProblems(), and OOFEM_ERROR.

Referenced by drawElements(), drawNodes(), drawYourself(), giveDeltaT(), and giveTimeControl().

◆ giveSolutionStepWhenIcApply()

TimeStep * oofem::AdditiveManufacturingProblem::giveSolutionStepWhenIcApply ( bool force = false)
overridevirtual

Returns the solution step when Initial Conditions (IC) apply.

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

Reimplemented from oofem::EngngModel.

Definition at line 890 of file additivemanufacturingproblem.C.

References emodelList, giveDeltaT(), giveNumberOfFirstStep(), oofem::EngngModel::giveNumberOfTimeStepWhenIcApply(), oofem::EngngModel::stepWhenIcApply, and timeDefinedByProb.

Referenced by giveNextStep(), and printYourself().

◆ giveTimeControl()

EngngModel * oofem::AdditiveManufacturingProblem::giveTimeControl ( )

Definition at line 907 of file additivemanufacturingproblem.C.

References giveSlaveProblem(), and timeDefinedByProb.

Referenced by printYourself(), and solveYourself().

◆ initializeAdaptive()

int oofem::AdditiveManufacturingProblem::initializeAdaptive ( int tStepNumber)
inlineoverridevirtual

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 from oofem::EngngModel.

Definition at line 195 of file additivemanufacturingproblem.h.

◆ initializeFrom()

void oofem::AdditiveManufacturingProblem::initializeFrom ( InputRecord & ir)
overridevirtual

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 from oofem::EngngModel.

Definition at line 587 of file additivemanufacturingproblem.C.

References _IFT_AdditiveManufacturingProblem_adaptiveStepLength, _IFT_AdditiveManufacturingProblem_adaptivestepsince, _IFT_AdditiveManufacturingProblem_coupling, _IFT_AdditiveManufacturingProblem_deltat, _IFT_AdditiveManufacturingProblem_dtf, _IFT_AdditiveManufacturingProblem_endoftimeofinterest, _IFT_AdditiveManufacturingProblem_gcode, _IFT_AdditiveManufacturingProblem_maxprintercommands, _IFT_AdditiveManufacturingProblem_maxsteplength, _IFT_AdditiveManufacturingProblem_minsteplength, _IFT_AdditiveManufacturingProblem_minvof, _IFT_AdditiveManufacturingProblem_prescribedtimes, _IFT_AdditiveManufacturingProblem_Printer_chambertemperature, _IFT_AdditiveManufacturingProblem_Printer_depositedmaterialheatpower, _IFT_AdditiveManufacturingProblem_Printer_depositiontemperature, _IFT_AdditiveManufacturingProblem_Printer_extrusionwidth, _IFT_AdditiveManufacturingProblem_Printer_heatbedtemperature, _IFT_AdditiveManufacturingProblem_Printer_heattransferfilmcoefficient, _IFT_AdditiveManufacturingProblem_Printer_layerheight, _IFT_AdditiveManufacturingProblem_prob1, _IFT_AdditiveManufacturingProblem_prob2, _IFT_AdditiveManufacturingProblem_prob3, _IFT_AdditiveManufacturingProblem_reqiterations, _IFT_AdditiveManufacturingProblem_skipsm, _IFT_AdditiveManufacturingProblem_stepmultiplier, _IFT_AdditiveManufacturingProblem_stepx, _IFT_AdditiveManufacturingProblem_stepy, _IFT_AdditiveManufacturingProblem_stepz, _IFT_AdditiveManufacturingProblem_timeDefinedByProb, _IFT_EngngModel_nsteps, _IFT_EngngModel_suppressOutput, adaptiveStepLength, adaptiveStepSince, PrinterOptions::chamberTemperature, Constant, coupledModels, oofem::EngngModel::dataOutputFileName, deltaT, PrinterOptions::depositedMaterialHeatPower, PrinterOptions::depositionTemperature, discreteTimes, PrintStatistics::distance_moved, oofem::EngngModel::domainList, oofem::EngngModel::domainNeqs, oofem::EngngModel::domainPrescribedNeqs, dtFunction, endOfTimeOfInterest, PrinterOptions::extrusionWidth, PrintStatistics::filament_extruded, gCodeFilePath, oofem::EngngModel::giveContext(), oofem::InputRecord::hasField(), PrinterOptions::heatBedTemperature, PrinterOptions::heatTransferFilmCoefficient, inputStreamNames, IR_GIVE_FIELD, IR_GIVE_OPTIONAL_FIELD, oofem::EngngModel::isParallel(), PrinterOptions::layerHeight, PrinterOptions::layerHeightModel, maxPrinterCommands, maxStepLength, minStepLength, minVOF, oofem::EngngModel::ndomains, oofem::EngngModel::numberOfSteps, oofem::EngngModel::numProcs, OOFEM_LOG_INFO, OOFEM_LOG_RELEVANT, oofem::EngngModel::outputStream, GCodeParser::parseFile(), PRG_HEADER, printer, oofem::printProgress(), oofem::EngngModel::processor_name, oofem::EngngModel::rank, oofem::EngngModel::renumberFlag, reqIterations, oofem::EngngModel::simulationDescription, PrinterOptions::sizes, skipSM, oofem::EngngModel::startTime, stepMultiplier, PrinterOptions::steps, stepX, stepY, stepZ, oofem::EngngModel::suppressOutput, PrintStatistics::time, timeDefinedByProb, and voxelVofField.

◆ initializeYourself()

void oofem::AdditiveManufacturingProblem::initializeYourself ( TimeStep * tStep)
inlineoverridevirtual

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 from oofem::EngngModel.

Definition at line 194 of file additivemanufacturingproblem.h.

Referenced by solveYourself().

◆ instanciateDefaultMetaStep()

int oofem::AdditiveManufacturingProblem::instanciateDefaultMetaStep ( InputRecord & ir)
overridevirtual

Instanciate default metastep, if nmsteps is zero.

Reimplemented from oofem::EngngModel.

Definition at line 547 of file additivemanufacturingproblem.C.

References oofem::EngngModel::numberOfSteps, and timeDefinedByProb.

◆ instanciateSlaveProblems()

int oofem::AdditiveManufacturingProblem::instanciateSlaveProblems ( )
protected

◆ instanciateYourself()

int oofem::AdditiveManufacturingProblem::instanciateYourself ( DataReader & dr,
InputRecord & ir,
const char * outFileName,
const char * desc )
overridevirtual

Initializes whole problem according to its description stored in inputStream. Prints header, opens the outFileName, instanciate itself the receiver using using virtual initializeFrom service and instanciates all problem domains.

Reimplemented from oofem::EngngModel.

Definition at line 537 of file additivemanufacturingproblem.C.

References oofem::EngngModel::dataOutputFileName, oofem::InputRecord::finish(), and instanciateSlaveProblems().

◆ operator=()

AdditiveManufacturingProblem & oofem::AdditiveManufacturingProblem::operator= ( const AdditiveManufacturingProblem & )
delete

◆ printOutputAt()

void oofem::AdditiveManufacturingProblem::printOutputAt ( FILE * file,
TimeStep * tStep )
overridevirtual

Prints output of receiver to output domain stream, for given time step. Corresponding function for element gauss points is invoked (gaussPoint::printOutputAt).

Reimplemented from oofem::EngngModel.

Definition at line 1139 of file additivemanufacturingproblem.C.

Referenced by printYourself().

◆ printYourself()

◆ restoreContext()

void oofem::AdditiveManufacturingProblem::restoreContext ( DataStream & stream,
ContextMode mode )
overridevirtual

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.
Exceptions
ContextIOERRexception if error encountered.

Reimplemented from oofem::EngngModel.

Definition at line 1154 of file additivemanufacturingproblem.C.

References emodelList.

◆ saveContext()

void oofem::AdditiveManufacturingProblem::saveContext ( DataStream & stream,
ContextMode mode )
overridevirtual

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.
Exceptions
ContextIOERRIf error encountered.

Reimplemented from oofem::EngngModel.

Definition at line 1145 of file additivemanufacturingproblem.C.

References emodelList.

◆ setContextOutputMode()

void oofem::AdditiveManufacturingProblem::setContextOutputMode ( ContextOutputMode contextMode)

◆ setProblemMode()

void oofem::AdditiveManufacturingProblem::setProblemMode ( problemMode pmode)

◆ setRenumberFlag()

void oofem::AdditiveManufacturingProblem::setRenumberFlag ( )
overridevirtual

Sets the renumber flag to true.

Reimplemented from oofem::EngngModel.

Definition at line 1205 of file additivemanufacturingproblem.C.

References emodelList.

Referenced by setProblemMode().

◆ setUDContextOutputMode()

void oofem::AdditiveManufacturingProblem::setUDContextOutputMode ( int cStep)

◆ showSparseMtrxStructure()

void oofem::AdditiveManufacturingProblem::showSparseMtrxStructure ( int type,
oofegGraphicContext & gc,
TimeStep * tStep )
inlineoverridevirtual

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

Reimplemented from oofem::EngngModel.

Definition at line 255 of file additivemanufacturingproblem.h.

References gc.

◆ solveYourself()

void oofem::AdditiveManufacturingProblem::solveYourself ( )
overridevirtual

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 from oofem::EngngModel.

Definition at line 965 of file additivemanufacturingproblem.C.

References add_element_if_not_exists2(), add_node_if_not_exists2(), add_sm_element_if_not_exists2(), add_sm_node_if_not_exists2(), oofem::EngngModel::balanceLoad(), emodelList, oofem::EngngModel::EngngModel(), forceEquationNumbering(), oofem::Timer::getUtime(), oofem::Domain::giveConnectivityTable(), oofem::EngngModel::giveCurrentStep(), oofem::EngngModel::giveDomain(), oofem::EngngModel::giveExportModuleManager(), oofem::EngngModel::giveMetaStep(), oofem::TimeStep::giveMetaStepNumber(), oofem::ModuleManager< M >::giveModule(), oofem::EngngModel::giveNextStep(), oofem::TimeStep::giveNumber(), oofem::EngngModel::giveNumberOfMetaSteps(), oofem::ModuleManager< M >::giveNumberOfModules(), oofem::MetaStep::giveNumberOfSteps(), oofem::EngngModel::giveOutputStream(), oofem::MetaStep::giveStepRelativeNumber(), oofem::TimeStep::giveTargetTime(), giveTimeControl(), oofem::ExportModule::initialize(), initializeYourself(), oofem::EngngModel::initMetaStepAttributes(), oofem::EngngModel::loadBalancingFlag, OOFEM_LOG_INFO, oofem::EngngModel::preInitializeNextStep(), printer, oofem::EngngModel::requiresEquationRenumbering(), oofem::ConnectivityTable::reset(), oofem::Domain::resizeDofManagers(), oofem::Domain::resizeElements(), skipSM, solveYourselfAt(), oofem::Timer::stopTimer(), oofem::EngngModel::suppressOutput, terminate(), oofem::EngngModel::timer, and updateYourself().

Referenced by setProblemMode().

◆ solveYourselfAt()

void oofem::AdditiveManufacturingProblem::solveYourselfAt ( TimeStep * tStep)
overridevirtual

Solves problem for given time step. Should assemble characteristic matrices and vectors if necessary and solve problem using appropriate numerical method. After finishing solution, this->updateYourself function for updating solution state and then this->terminate function (for updating nodal and element values) should be called.

Reimplemented from oofem::EngngModel.

Definition at line 1085 of file additivemanufacturingproblem.C.

References emodelList, oofem::TimeStep::giveNumber(), oofem::TimeStep::giveTargetTime(), oofem::TimeStep::incrementStateCounter(), and OOFEM_LOG_RELEVANT.

Referenced by setProblemMode(), and solveYourself().

◆ terminate()

void oofem::AdditiveManufacturingProblem::terminate ( TimeStep * tStep)
overridevirtual

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 from oofem::EngngModel.

Definition at line 1124 of file additivemanufacturingproblem.C.

References emodelList.

Referenced by solveYourself().

◆ updateAttributes()

void oofem::AdditiveManufacturingProblem::updateAttributes ( MetaStep * mStep)
overridevirtual

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 from oofem::EngngModel.

Definition at line 759 of file additivemanufacturingproblem.C.

References _IFT_AdditiveManufacturingProblem_deltat, _IFT_AdditiveManufacturingProblem_dtf, _IFT_AdditiveManufacturingProblem_prescribedtimes, _IFT_AdditiveManufacturingProblem_stepmultiplier, deltaT, discreteTimes, dtFunction, emodelList, oofem::MetaStep::giveAttributesRecord(), IR_GIVE_FIELD, IR_GIVE_OPTIONAL_FIELD, OOFEM_ERROR, stepMultiplier, and timeDefinedByProb.

◆ updateDomainLinks()

void oofem::AdditiveManufacturingProblem::updateDomainLinks ( )
overridevirtual

Updates domain links after the domains of receiver have changed. Used mainly after restoring context - the domains may change and this service is then used to update domain variables in all components belonging to receiver like error estimators, solvers, etc, having domains as attributes.

Reimplemented from oofem::EngngModel.

Definition at line 1198 of file additivemanufacturingproblem.C.

References emodelList.

◆ updateYourself()

void oofem::AdditiveManufacturingProblem::updateYourself ( TimeStep * tStep)
overridevirtual

Updates internal state after finishing time step. (for example total values may be updated according to previously solved increments). Then element values are also updated (together with related integration points and material statuses).

Reimplemented from oofem::EngngModel.

Definition at line 1111 of file additivemanufacturingproblem.C.

References adaptiveStepLength, currentStepLength, emodelList, and prevStepLength.

Referenced by setProblemMode(), and solveYourself().

◆ useNonlocalStiffnessOption()

int oofem::AdditiveManufacturingProblem::useNonlocalStiffnessOption ( )
inlineoverridevirtual

Returns nonzero if nonlocal stiffness option activated.

Reimplemented from oofem::EngngModel.

Definition at line 221 of file additivemanufacturingproblem.h.

Member Data Documentation

◆ adaptiveStepLength

bool oofem::AdditiveManufacturingProblem::adaptiveStepLength
protected

◆ adaptiveStepSince

double oofem::AdditiveManufacturingProblem::adaptiveStepSince
protected

adaptive time step length applies after prescribed time

Definition at line 157 of file additivemanufacturingproblem.h.

Referenced by AdditiveManufacturingProblem(), and initializeFrom().

◆ coupledModels

IntArray oofem::AdditiveManufacturingProblem::coupledModels
protected

List of slave models to which this model is coupled.

Definition at line 148 of file additivemanufacturingproblem.h.

Referenced by giveCoupledModels(), and initializeFrom().

◆ currentStepLength

double oofem::AdditiveManufacturingProblem::currentStepLength
protected

◆ deltaT

double oofem::AdditiveManufacturingProblem::deltaT
protected

Definition at line 124 of file additivemanufacturingproblem.h.

Referenced by giveDeltaT(), initializeFrom(), and updateAttributes().

◆ discreteTimes

FloatArray oofem::AdditiveManufacturingProblem::discreteTimes
protected

Specified times where the problem is solved.

Time lag specifying how much is the second sub-problem delayed after the first one during this period the second subproblem isn't solved at all. Efficient tool for coupling structural problem with hydration.

Definition at line 142 of file additivemanufacturingproblem.h.

Referenced by giveDeltaT(), giveDiscreteTime(), initializeFrom(), and updateAttributes().

◆ dtFunction

int oofem::AdditiveManufacturingProblem::dtFunction
protected

Associated time function for time step increment.

Definition at line 127 of file additivemanufacturingproblem.h.

Referenced by AdditiveManufacturingProblem(), giveDtFunction(), initializeFrom(), and updateAttributes().

◆ emodelList

◆ endOfTimeOfInterest

double oofem::AdditiveManufacturingProblem::endOfTimeOfInterest
protected

alternative overriding the number of steps "nsteps" - necessary for time-driven analyses when the appropriate number of steps is apriori unknow. If used, set "nsteps" to a high number e.g. 100000000

Definition at line 162 of file additivemanufacturingproblem.h.

Referenced by AdditiveManufacturingProblem(), giveNextStep(), and initializeFrom().

◆ gCodeFilePath

std::string oofem::AdditiveManufacturingProblem::gCodeFilePath = ""
protected

Definition at line 168 of file additivemanufacturingproblem.h.

Referenced by initializeFrom().

◆ inputStreamNames

std ::vector<std ::string> oofem::AdditiveManufacturingProblem::inputStreamNames
protected

◆ maxPrinterCommands

int oofem::AdditiveManufacturingProblem::maxPrinterCommands = -1
protected

Definition at line 171 of file additivemanufacturingproblem.h.

Referenced by initializeFrom().

◆ maxStepLength

double oofem::AdditiveManufacturingProblem::maxStepLength
protected

adaptive time step length - maximum

Definition at line 153 of file additivemanufacturingproblem.h.

Referenced by AdditiveManufacturingProblem(), giveDeltaT(), and initializeFrom().

◆ minStepLength

double oofem::AdditiveManufacturingProblem::minStepLength
protected

adaptive time step length - minimum

Definition at line 151 of file additivemanufacturingproblem.h.

Referenced by AdditiveManufacturingProblem(), giveDeltaT(), and initializeFrom().

◆ minVOF

double oofem::AdditiveManufacturingProblem::minVOF
protected

Definition at line 117 of file additivemanufacturingproblem.h.

Referenced by initializeFrom().

◆ prevStepLength

double oofem::AdditiveManufacturingProblem::prevStepLength
protected

◆ printer

Printer oofem::AdditiveManufacturingProblem::printer = Printer()
protected

◆ reqIterations

double oofem::AdditiveManufacturingProblem::reqIterations
protected

adaptive time step length - required (=optimum) number of iterations

Definition at line 155 of file additivemanufacturingproblem.h.

Referenced by AdditiveManufacturingProblem(), giveDeltaT(), and initializeFrom().

◆ skipSM

bool oofem::AdditiveManufacturingProblem::skipSM = true
protected

Definition at line 119 of file additivemanufacturingproblem.h.

Referenced by initializeFrom(), and solveYourself().

◆ stepMultiplier

double oofem::AdditiveManufacturingProblem::stepMultiplier
protected

Constant multiplier, optional input parameter. This parameter determines the ratio of two consecutive time steps. Efficient for creep and relaxation analyses.

Definition at line 132 of file additivemanufacturingproblem.h.

Referenced by AdditiveManufacturingProblem(), giveDeltaT(), initializeFrom(), and updateAttributes().

◆ stepX

double oofem::AdditiveManufacturingProblem::stepX
protected

Definition at line 113 of file additivemanufacturingproblem.h.

Referenced by initializeFrom().

◆ stepY

double oofem::AdditiveManufacturingProblem::stepY
protected

Definition at line 114 of file additivemanufacturingproblem.h.

Referenced by initializeFrom().

◆ stepZ

double oofem::AdditiveManufacturingProblem::stepZ
protected

Definition at line 115 of file additivemanufacturingproblem.h.

Referenced by initializeFrom().

◆ timeDefinedByProb

int oofem::AdditiveManufacturingProblem::timeDefinedByProb
protected

◆ totalTimer

Timer oofem::AdditiveManufacturingProblem::totalTimer
protected

◆ voxelVofField

std :: shared_ptr< VoxelVOFField > oofem::AdditiveManufacturingProblem::voxelVofField
protected

Definition at line 174 of file additivemanufacturingproblem.h.

Referenced by initializeFrom().


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

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011