OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
This class represents linear nonstationary transport problem. More...
#include <nonstationarytransportproblem.h>
Public Member Functions | |
NonStationaryTransportProblem (int i, EngngModel *_master) | |
Constructor. More... | |
virtual | ~NonStationaryTransportProblem () |
Destructor. More... | |
virtual void | solveYourselfAt (TimeStep *tStep) |
Solves problem for given time step. More... | |
virtual void | updateYourself (TimeStep *tStep) |
Updates internal state after finishing time step. More... | |
virtual double | giveUnknownComponent (ValueModeType, TimeStep *, Domain *, Dof *) |
Returns requested unknown. 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... | |
virtual TimeStep * | giveNextStep () |
Returns next time step (next to current step) of receiver. More... | |
virtual TimeStep * | giveSolutionStepWhenIcApply (bool force=false) |
Returns the solution step when Initial Conditions (IC) apply. More... | |
virtual NumericalMethod * | giveNumericalMethod (MetaStep *mStep) |
Returns reference to receiver's numerical method. More... | |
virtual IRResultType | initializeFrom (InputRecord *ir) |
Initializes receiver according to object description in input reader. More... | |
virtual int | checkConsistency () |
Allows programmer to test some receiver's internal data, before computation begins. More... | |
virtual const char * | giveInputRecordName () const |
virtual const char * | giveClassName () const |
Returns class name of the receiver. More... | |
virtual fMode | giveFormulation () |
Indicates type of non linear computation (total or updated formulation). More... | |
virtual int | requiresUnknownsDictionaryUpdate () |
Allows to change number of equations during solution. More... | |
virtual bool | requiresEquationRenumbering (TimeStep *) |
Returns true if equation renumbering is required for given solution step. 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... | |
Function * | giveDtFunction () |
Returns time function for time step increment. More... | |
double | giveDeltaT (int n) |
Returns the time step length for given step number n, initial step is number 0. More... | |
double | giveDiscreteTime (int n) |
Returns time for time step number n (array discreteTimes must be specified) More... | |
Public Member Functions inherited from oofem::StationaryTransportProblem | |
StationaryTransportProblem (int i, EngngModel *_master) | |
Constructor. More... | |
virtual | ~StationaryTransportProblem () |
Destructor. More... | |
virtual void | updateComponent (TimeStep *tStep, NumericalCmpn cmpn, Domain *d) |
Updates components mapped to numerical method if necessary during solution process. More... | |
virtual FieldPtr | giveField (FieldType key, TimeStep *) |
Returns the smart pointer to requested field, Null otherwise. More... | |
Public Member Functions inherited from oofem::EngngModel | |
EngngModel (int i, EngngModel *_master=NULL) | |
Constructor. More... | |
virtual | ~EngngModel () |
Destructor. More... | |
EngngModel (const EngngModel &)=delete | |
EngngModel & | operator= (const EngngModel &)=delete |
Domain * | giveDomain (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 ErrorEstimator * | giveDomainErrorEstimator (int n) |
Service for accessing ErrorEstimator corresponding to particular domain. More... | |
virtual MaterialInterface * | giveMaterialInterface (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 | 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 | 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... | |
EngngModel * | giveMasterEngngModel () |
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... | |
ProblemCommunicator * | giveProblemCommunicator (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... | |
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... | |
MetaStep * | giveCurrentMetaStep () |
Returns current meta step. More... | |
virtual TimeStep * | giveCurrentStep (bool force=false) |
Returns current time step. More... | |
virtual TimeStep * | givePreviousStep (bool force=false) |
Returns previous time step. More... | |
TimeStep * | generateNextStep () |
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 int | giveNumberOfFirstStep (bool force=false) |
Returns number of first time step used by receiver. More... | |
int | giveNumberOfMetaSteps () |
Return number of meta steps. More... | |
MetaStep * | giveMetaStep (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... | |
ExportModuleManager * | giveExportModuleManager () |
Returns receiver's export module manager. More... | |
EngngModelTimer * | giveTimer () |
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 | 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 void | updateDofUnknownsDictionary (DofManager *, TimeStep *) |
Updates necessary values in Dofs unknown dictionaries. More... | |
virtual ParallelContext * | giveParallelContext (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 | 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 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... | |
EngngModelContext * | giveContext () |
Context requesting service. More... | |
virtual int | giveNumberOfSlaveProblems () |
Returns number of slave problems. More... | |
virtual EngngModel * | giveSlaveProblem (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 LoadBalancer * | giveLoadBalancer () |
Returns reference to receiver's load balancer. More... | |
virtual LoadBalancerMonitor * | giveLoadBalancerMonitor () |
Returns reference to receiver's load balancer monitor. More... | |
void | initParallel () |
Request domain rank and problem size. More... | |
EngngModel * | giveEngngModel () |
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 Member Functions | |
virtual void | assembleAlgorithmicPartOfRhs (FloatArray &rhs, const UnknownNumberingScheme &s, TimeStep *tStep) |
virtual void | applyIC (TimeStep *tStep) |
This function is normally called at the first time to project initial conditions to previous (0^th) solution vector. More... | |
virtual void | assembleDirichletBcRhsVector (FloatArray &answer, TimeStep *tStep, ValueModeType mode, const UnknownNumberingScheme &s, Domain *d) |
Assembles part of RHS due to Dirichlet boundary conditions. More... | |
virtual void | copyUnknownsInDictionary (ValueModeType mode, TimeStep *fromTime, TimeStep *toTime) |
Copy unknowns in DOF's from previous to current position. More... | |
virtual void | updateInternalState (TimeStep *tStep) |
Updates IP values on elements. More... | |
Protected Member Functions inherited from oofem::EngngModel | |
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 | |
StateCounterType | internalVarUpdateStamp |
Contains last time stamp of internal variable update. More... | |
LinSystSolverType | solverType |
std::unique_ptr< SparseLinearSystemNM > | linSolver |
FloatArray | bcRhs |
Right hand side vector from boundary conditions. More... | |
double | initT |
Initial time from which the computation runs. Default is zero. More... | |
double | deltaT |
Length of time step. More... | |
double | alpha |
int | lumpedCapacityStab |
If set then stabilization using lumped capacity will be used. More... | |
int | dtFunction |
Associated time function for time step increment. More... | |
FloatArray | discreteTimes |
Specified times where the problem is solved. More... | |
bool | changingProblemSize |
Determines if there are change in the problem size (no application/removal of Dirichlet boundary conditions). More... | |
Protected Attributes inherited from oofem::StationaryTransportProblem | |
SparseMtrxType | sparseMtrxType |
std::unique_ptr< PrimaryField > | UnknownsField |
This field stores solution vector. For fixed size of problem, the PrimaryField is used, for growing/decreasing size, DofDistributedPrimaryField applies. More... | |
std::unique_ptr< SparseMtrx > | conductivityMatrix |
FloatArray | internalForces |
FloatArray | eNorm |
SparseNonLinearSystemNM * | nMethod |
Numerical method used to solve the problem. More... | |
bool | keepTangent |
Protected Attributes inherited from oofem::EngngModel | |
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< MetaStep > | metaStepList |
List of problem metasteps. More... | |
std::unique_ptr< TimeStep > | stepWhenIcApply |
Solution step when IC (initial conditions) apply. More... | |
std::unique_ptr< TimeStep > | currentStep |
Current time step. More... | |
std::unique_ptr< TimeStep > | previousStep |
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 |
ExportModuleManager * | exportModuleManager |
Export module manager. More... | |
InitModuleManager * | initModuleManager |
Initialization module manager. More... | |
problemMode | pMode |
Domain mode. More... | |
problemScale | pScale |
Multiscale mode. More... | |
time_t | startTime |
Solution start time. More... | |
EngngModel * | master |
Master e-model; if defined receiver is in maintained (slave) mode. More... | |
EngngModelContext * | context |
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... | |
ErrorEstimator * | defaultErrEstimator |
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... | |
CommunicatorBuff * | commBuff |
Common Communicator buffer. More... | |
ProblemCommunicator * | communicator |
Communicator. More... | |
ProblemCommunicator * | nonlocCommunicator |
NonLocal Communicator. Necessary when nonlocal constitutive models are used. More... | |
std::vector< ParallelContext > | parallelContextList |
List where parallel contexts are stored. More... | |
bool | suppressOutput |
Flag for suppressing output to file. More... | |
std::string | simulationDescription |
LoadBalancer * | lb |
Load Balancer. More... | |
LoadBalancerMonitor * | lbm |
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... | |
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 } |
Means to choose methods for finding a good initial guess. More... | |
Protected Types inherited from oofem::EngngModel | |
enum | { InternalForcesExchangeTag, MassExchangeTag, LoadExchangeTag, ReactionExchangeTag, RemoteElementExchangeTag } |
Message tags. More... | |
This class represents linear nonstationary transport problem.
Definition at line 104 of file nonstationarytransportproblem.h.
oofem::NonStationaryTransportProblem::NonStationaryTransportProblem | ( | int | i, |
EngngModel * | _master = NULL |
||
) |
Constructor.
Definition at line 90 of file nonstationarytransportproblem.C.
References changingProblemSize, deltaT, dtFunction, initT, internalVarUpdateStamp, lumpedCapacityStab, oofem::EngngModel::ndomains, solverType, and oofem::ST_Direct.
|
virtual |
Destructor.
Definition at line 102 of file nonstationarytransportproblem.C.
|
protectedvirtual |
This function is normally called at the first time to project initial conditions to previous (0^th) solution vector.
tStep | Previous solution step. |
Reimplemented in oofem::NLTransientTransportProblem.
Definition at line 593 of file nonstationarytransportproblem.C.
References oofem::FloatArray::at(), oofem::CemhydMat::averageTemperature(), changingProblemSize, oofem::CemhydMat::clearWeightTemperatureProductVolume(), oofem::Domain::giveDofManagers(), oofem::EngngModel::giveDomain(), oofem::Domain::giveElements(), oofem::TransportElement::giveMaterial(), oofem::Domain::giveMaterials(), oofem::EngngModel::giveNumberOfDomainEquations(), oofem::CemhydMat::initMaterial(), OOFEM_LOG_INFO, oofem::FloatArray::resize(), oofem::CemhydMat::storeWeightTemperatureProductVolume(), oofem::StationaryTransportProblem::UnknownsField, oofem::TransportElement::updateInternalState(), oofem::Element::updateYourself(), and oofem::FloatArray::zero().
Referenced by oofem::NLTransientTransportProblem::applyIC(), and solveYourselfAt().
|
protectedvirtual |
Reimplemented in oofem::NLTransientTransportProblem.
Definition at line 555 of file nonstationarytransportproblem.C.
References oofem::FloatMatrix::add(), alpha, oofem::FloatArray::assemble(), oofem::FloatArray::beProductOf(), oofem::Element::computeVectorOf(), oofem::Element_remote, oofem::Element::giveCharacteristicMatrix(), oofem::EngngModel::giveDomain(), oofem::Domain::giveElement(), oofem::Element::giveLocationArray(), oofem::Domain::giveNumberOfElements(), oofem::Element::giveParallelMode(), oofem::TimeStep::giveTimeIncrement(), oofem::FloatMatrix::isNotEmpty(), lumpedCapacityStab, and oofem::FloatMatrix::times().
Referenced by solveYourselfAt().
|
protectedvirtual |
Assembles part of RHS due to Dirichlet boundary conditions.
answer | Global vector where the contribution will be added. |
tStep | Solution step. |
mode | Mode of result. |
s | A map of non-default equation numbering if required. |
d | Domain. |
Definition at line 673 of file nonstationarytransportproblem.C.
References oofem::FloatMatrix::add(), alpha, oofem::FloatArray::assemble(), oofem::FloatArray::beProductOf(), oofem::Element::computeVectorOfPrescribed(), oofem::FloatArray::containsOnlyZeroes(), oofem::Element::giveCharacteristicMatrix(), oofem::EngngModel::giveDomain(), oofem::Domain::giveElement(), oofem::Element::giveElementDofIDMask(), oofem::Domain::giveElements(), oofem::CemhydMat::giveIPValue(), oofem::Element::giveLocationArray(), oofem::Domain::giveMaterials(), oofem::Domain::giveNumberOfElements(), oofem::TimeStep::giveTimeIncrement(), lumpedCapacityStab, oofem::FloatArray::negated(), and oofem::FloatMatrix::times().
Referenced by solveYourselfAt().
|
virtual |
Allows programmer to test some receiver's internal data, before computation begins.
Reimplemented from oofem::StationaryTransportProblem.
Definition at line 512 of file nonstationarytransportproblem.C.
References oofem::EngngModel::checkConsistency(), oofem::EngngModel::giveDomain(), oofem::Domain::giveElements(), and OOFEM_WARNING.
|
protectedvirtual |
Copy unknowns in DOF's from previous to current position.
mode | What the unknown describes (increment, total value etc.). |
fromTime | From which time step to obtain value. |
toTime | To which time to copy. |
Definition at line 442 of file nonstationarytransportproblem.C.
References oofem::Domain::giveDofManagers(), and oofem::EngngModel::giveDomain().
Referenced by oofem::NLTransientTransportProblem::solveYourselfAt(), and solveYourselfAt().
|
inlinevirtual |
Returns class name of the receiver.
Reimplemented from oofem::StationaryTransportProblem.
Reimplemented in oofem::NLTransientTransportProblem.
Definition at line 161 of file nonstationarytransportproblem.h.
double oofem::NonStationaryTransportProblem::giveDeltaT | ( | int | n | ) |
Returns the time step length for given step number n, initial step is number 0.
Definition at line 235 of file nonstationarytransportproblem.C.
References deltaT, discreteTimes, oofem::Function::evaluateAtTime(), giveDiscreteTime(), giveDtFunction(), and oofem::FloatArray::giveSize().
Referenced by giveNextStep(), and giveSolutionStepWhenIcApply().
double oofem::NonStationaryTransportProblem::giveDiscreteTime | ( | int | n | ) |
Returns time for time step number n (array discreteTimes must be specified)
Definition at line 249 of file nonstationarytransportproblem.C.
References oofem::FloatArray::at(), discreteTimes, oofem::FloatArray::giveSize(), initT, and OOFEM_ERROR.
Referenced by giveDeltaT().
Function * oofem::NonStationaryTransportProblem::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 224 of file nonstationarytransportproblem.C.
References dtFunction, oofem::EngngModel::giveDomain(), and oofem::Domain::giveFunction().
Referenced by giveDeltaT().
|
inlinevirtual |
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::StationaryTransportProblem.
Reimplemented in oofem::NLTransientTransportProblem.
Definition at line 162 of file nonstationarytransportproblem.h.
References oofem::TL.
|
inlinevirtual |
Reimplemented from oofem::StationaryTransportProblem.
Reimplemented in oofem::NLTransientTransportProblem.
Definition at line 160 of file nonstationarytransportproblem.h.
References _IFT_NonStationaryTransportProblem_Name.
|
virtual |
Returns next time step (next to current step) of receiver.
Reimplemented from oofem::StationaryTransportProblem.
Reimplemented in oofem::NLTransientTransportProblem.
Definition at line 265 of file nonstationarytransportproblem.C.
References oofem::EngngModel::currentStep, giveDeltaT(), oofem::EngngModel::giveNumberOfFirstStep(), giveSolutionStepWhenIcApply(), initT, and oofem::EngngModel::previousStep.
Referenced by oofem::NLTransientTransportProblem::giveNextStep().
|
virtual |
Returns reference to receiver's numerical method.
Reimplemented from oofem::StationaryTransportProblem.
Definition at line 107 of file nonstationarytransportproblem.C.
References oofem::classFactory, oofem::ClassFactory::createSparseLinSolver(), linSolver, OOFEM_ERROR, and solverType.
Referenced by oofem::NLTransientTransportProblem::solveYourselfAt(), solveYourselfAt(), and updateDomainLinks().
|
virtual |
Returns the solution step when Initial Conditions (IC) apply.
force | when set to true then receiver reply is returned instead of master (default) |
Reimplemented from oofem::EngngModel.
Definition at line 208 of file nonstationarytransportproblem.C.
References giveDeltaT(), oofem::EngngModel::giveNumberOfFirstStep(), oofem::EngngModel::giveNumberOfTimeStepWhenIcApply(), oofem::EngngModel::giveSolutionStepWhenIcApply(), initT, oofem::EngngModel::master, and oofem::EngngModel::stepWhenIcApply.
Referenced by giveNextStep(), and solveYourselfAt().
|
virtual |
Returns requested unknown.
Unknown at give time step is characterized by its type and mode and by its equation number. This function is used by Dofs, when they are requested for their associated unknowns.
Reimplemented from oofem::StationaryTransportProblem.
Reimplemented in oofem::NLTransientTransportProblem.
Definition at line 173 of file nonstationarytransportproblem.C.
References oofem::Dof::__giveEquationNumber(), oofem::__ValueModeTypeToString(), oofem::Dof::giveDofID(), giveUnknownDictHashIndx(), oofem::Dof::giveUnknowns(), OOFEM_ERROR, requiresUnknownsDictionaryUpdate(), and oofem::StationaryTransportProblem::UnknownsField.
|
virtual |
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 from oofem::EngngModel.
Reimplemented in oofem::NLTransientTransportProblem.
Definition at line 540 of file nonstationarytransportproblem.C.
References oofem::__ValueModeTypeToString(), and OOFEM_ERROR.
Referenced by giveUnknownComponent().
|
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 from oofem::StationaryTransportProblem.
Reimplemented in oofem::NLTransientTransportProblem.
Definition at line 122 of file nonstationarytransportproblem.C.
References _IFT_EngngModel_lstype, _IFT_NonStationaryTransportProblem_alpha, _IFT_NonStationaryTransportProblem_changingproblemsize, _IFT_NonStationaryTransportProblem_deltat, _IFT_NonStationaryTransportProblem_deltatfunction, _IFT_NonStationaryTransportProblem_initt, _IFT_NonStationaryTransportProblem_lumpedcapa, _IFT_NonStationaryTransportProblem_prescribedtimes, alpha, changingProblemSize, deltaT, discreteTimes, dtFunction, oofem::InputRecord::hasField(), oofem::StationaryTransportProblem::initializeFrom(), oofem::EngngModel::initializeFrom(), initT, IR_GIVE_FIELD, IR_GIVE_OPTIONAL_FIELD, oofem::IRRT_BAD_FORMAT, oofem::IRRT_OK, lumpedCapacityStab, OOFEM_WARNING, solverType, and oofem::StationaryTransportProblem::UnknownsField.
Referenced by oofem::NLTransientTransportProblem::initializeFrom().
|
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 from oofem::EngngModel.
Definition at line 166 of file nonstationarytransportproblem.h.
|
inlinevirtual |
Allows to change number of equations during solution.
Reimplemented from oofem::EngngModel.
Definition at line 165 of file nonstationarytransportproblem.h.
Referenced by oofem::NLTransientTransportProblem::createPreviousSolutionInDofUnknownsDictionary(), oofem::NLTransientTransportProblem::giveUnknownComponent(), giveUnknownComponent(), oofem::NLTransientTransportProblem::updateInternalState(), and updateInternalState().
|
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.
stream | Context file. |
mode | Determines amount of info in stream. |
ContextIOERR | exception if error encountered. |
Reimplemented from oofem::StationaryTransportProblem.
Definition at line 495 of file nonstationarytransportproblem.C.
References oofem::CIO_OK, oofem::EngngModel::restoreContext(), THROW_CIOERR, and oofem::StationaryTransportProblem::UnknownsField.
|
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.
stream | Context stream. |
mode | Determines amount of info in stream. |
ContextIOERR | If error encountered. |
Reimplemented from oofem::StationaryTransportProblem.
Definition at line 477 of file nonstationarytransportproblem.C.
References oofem::CIO_OK, oofem::EngngModel::saveContext(), THROW_CIOERR, and oofem::StationaryTransportProblem::UnknownsField.
|
virtual |
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::StationaryTransportProblem.
Reimplemented in oofem::NLTransientTransportProblem.
Definition at line 291 of file nonstationarytransportproblem.C.
References alpha, applyIC(), oofem::EngngModel::assemble(), assembleAlgorithmicPartOfRhs(), assembleDirichletBcRhsVector(), oofem::EngngModel::assembleVectorFromDofManagers(), oofem::EngngModel::assembleVectorFromElements(), oofem::FloatArray::at(), bcRhs, changingProblemSize, oofem::classFactory, oofem::StationaryTransportProblem::conductivityMatrix, copyUnknownsInDictionary(), oofem::ClassFactory::createSparseMtrx(), oofem::EngngModel::giveCurrentMetaStep(), oofem::EngngModel::giveDomain(), oofem::TimeStep::giveNumber(), oofem::EngngModel::giveNumberOfDomainEquations(), giveNumericalMethod(), oofem::TimeStep::givePreviousStep(), giveSolutionStepWhenIcApply(), oofem::TimeStep::giveTargetTime(), oofem::TimeStep::incrementStateCounter(), oofem::TimeStep::isTheFirstStep(), linSolver, lumpedCapacityStab, OOFEM_ERROR, OOFEM_LOG_INFO, OOFEM_LOG_RELEVANT, oofem::FloatArray::resize(), oofem::StationaryTransportProblem::sparseMtrxType, oofem::FloatArray::times(), oofem::StationaryTransportProblem::UnknownsField, and oofem::FloatArray::zero().
|
virtual |
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::StationaryTransportProblem.
Definition at line 533 of file nonstationarytransportproblem.C.
References oofem::EngngModel::giveCurrentMetaStep(), oofem::EngngModel::giveDomain(), giveNumericalMethod(), oofem::NumericalMethod::setDomain(), and oofem::EngngModel::updateDomainLinks().
|
protectedvirtual |
Updates IP values on elements.
tStep | Solution step. |
Reimplemented from oofem::StationaryTransportProblem.
Reimplemented in oofem::NLTransientTransportProblem.
Definition at line 456 of file nonstationarytransportproblem.C.
References bcRhs, oofem::EngngModel::domainList, oofem::TimeStep::giveSolutionStateCounter(), internalVarUpdateStamp, requiresUnknownsDictionaryUpdate(), and oofem::StationaryTransportProblem::UnknownsField.
Referenced by updateYourself().
|
virtual |
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::StationaryTransportProblem.
Reimplemented in oofem::NLTransientTransportProblem.
Definition at line 410 of file nonstationarytransportproblem.C.
References oofem::CemhydMat::averageTemperature(), oofem::CemhydMat::clearWeightTemperatureProductVolume(), oofem::EngngModel::domainList, oofem::TransportElement::giveMaterial(), oofem::CemhydMat::storeWeightTemperatureProductVolume(), updateInternalState(), oofem::EngngModel::updateYourself(), and VERBOSE_PRINT0.
Referenced by oofem::NLTransientTransportProblem::updateYourself().
|
protected |
Definition at line 124 of file nonstationarytransportproblem.h.
Referenced by oofem::NLTransientTransportProblem::assembleAlgorithmicPartOfRhs(), assembleAlgorithmicPartOfRhs(), assembleDirichletBcRhsVector(), oofem::NLTransientTransportProblem::giveNextStep(), oofem::NLTransientTransportProblem::giveUnknownComponent(), initializeFrom(), oofem::NLTransientTransportProblem::solveYourselfAt(), solveYourselfAt(), and oofem::NLTransientTransportProblem::updateYourself().
|
protected |
Right hand side vector from boundary conditions.
Definition at line 118 of file nonstationarytransportproblem.h.
Referenced by solveYourselfAt(), and updateInternalState().
|
protected |
Determines if there are change in the problem size (no application/removal of Dirichlet boundary conditions).
Definition at line 136 of file nonstationarytransportproblem.h.
Referenced by applyIC(), initializeFrom(), NonStationaryTransportProblem(), oofem::NLTransientTransportProblem::solveYourselfAt(), and solveYourselfAt().
|
protected |
Length of time step.
Definition at line 123 of file nonstationarytransportproblem.h.
Referenced by giveDeltaT(), initializeFrom(), and NonStationaryTransportProblem().
|
protected |
Specified times where the problem is solved.
Definition at line 133 of file nonstationarytransportproblem.h.
Referenced by giveDeltaT(), giveDiscreteTime(), and initializeFrom().
|
protected |
Associated time function for time step increment.
Definition at line 130 of file nonstationarytransportproblem.h.
Referenced by giveDtFunction(), initializeFrom(), and NonStationaryTransportProblem().
|
protected |
Initial time from which the computation runs. Default is zero.
Definition at line 121 of file nonstationarytransportproblem.h.
Referenced by giveDiscreteTime(), giveNextStep(), giveSolutionStepWhenIcApply(), initializeFrom(), and NonStationaryTransportProblem().
|
protected |
Contains last time stamp of internal variable update.
This update is made via various services (like those for computing real internal forces or updating the internal state).
Definition at line 112 of file nonstationarytransportproblem.h.
Referenced by NonStationaryTransportProblem(), and updateInternalState().
|
protected |
Definition at line 115 of file nonstationarytransportproblem.h.
Referenced by giveNumericalMethod(), oofem::NLTransientTransportProblem::solveYourselfAt(), and solveYourselfAt().
|
protected |
If set then stabilization using lumped capacity will be used.
Definition at line 127 of file nonstationarytransportproblem.h.
Referenced by oofem::NLTransientTransportProblem::assembleAlgorithmicPartOfRhs(), assembleAlgorithmicPartOfRhs(), assembleDirichletBcRhsVector(), initializeFrom(), NonStationaryTransportProblem(), oofem::NLTransientTransportProblem::solveYourselfAt(), and solveYourselfAt().
|
protected |
Definition at line 114 of file nonstationarytransportproblem.h.
Referenced by giveNumericalMethod(), initializeFrom(), and NonStationaryTransportProblem().