81 if ( result !=
IRRT_OK )
return result;
95 for (
int i = 1; i <= exportFields.
giveSize(); i++ ) {
96 if ( exportFields.
at(i) == FT_Temperature ) {
99 }
else if ( exportFields.
at(i) == FT_HumidityConcentration ) {
123 if (mode == VM_TotalIntrinsic) mode = VM_Total;
135 OOFEM_ERROR(
"Unable to return field representation for non-current time step");
137 if ( key == FT_Temperature ) {
140 }
else if ( key == FT_HumidityConcentration ) {
157 counter =
currentStep->giveSolutionStateCounter() + 1;
180 solutionVector->
resize(neq);
181 solutionVector->
zero();
211 externalForces.
zero();
223 int currentIterations;
310 if ( !dynamic_cast< TransportElement * >( elem.get() ) ) {
311 OOFEM_WARNING(
"Element %d has no TransportElement base", elem->giveLabel());
333 for (
auto &elem : domain->giveElements() ) {
334 elem->updateInternalState(tStep);
virtual void updateInternalState(TimeStep *tStep)
Updates IP values on elements.
The representation of EngngModel default unknown numbering.
#define _IFT_StationaryTransportProblem_keepTangent
std::unique_ptr< TimeStep > currentStep
Current time step.
std::shared_ptr< Field > FieldPtr
SparseNonLinearSystemNM * nMethod
Numerical method used to solve the problem.
FloatArray internalForces
Implementation for assembling internal forces vectors in standard monolithic, nonlinear FE-problems...
virtual int giveNumberOfDomainEquations(int di, const UnknownNumberingScheme &num)
Returns number of equations for given domain in active (current time step) time step.
Abstract class representing subset of DOFs (identified by DofId mask) of primary field.
FieldType
Physical type of field.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
This class implements Newton-Raphson Method, derived from abstract NumericalMethod class for solving ...
SparseMtrx * createSparseMtrx(SparseMtrxType type)
Creates new instance of sparse matrix corresponding to given keyword.
Abstract class representing field of primary variables (those, which are unknown and are typically as...
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
std::vector< std::unique_ptr< Domain > > domainList
List of problem domains.
std::unique_ptr< TimeStep > previousStep
Previous time step.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
long StateCounterType
StateCounterType type used to indicate solution state.
This base class is an abstraction for numerical algorithm.
StationaryTransportProblem(int i, EngngModel *_master)
Constructor.
Implementation for assembling tangent matrices in standard monolithic FE-problems.
virtual void updateYourself(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
virtual int checkConsistency()
Allows programmer to test some receiver's internal data, before computation begins.
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
virtual int __giveEquationNumber() const =0
Returns equation number of receiver, usually assigned by emodel.
FieldManager * giveFieldManager()
REGISTER_EngngModel(ProblemSequence)
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
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.
MetaStep * giveCurrentMetaStep()
Returns current meta step.
virtual ~StationaryTransportProblem()
Destructor.
#define OOFEM_LOG_INFO(...)
int giveNumber()
Returns receiver's number.
std::unique_ptr< SparseMtrx > conductivityMatrix
virtual void updateComponent(TimeStep *tStep, NumericalCmpn cmpn, Domain *d)
Updates components mapped to numerical method if necessary during solution process.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the state of model to output stream.
NumericalCmpn
Type representing numerical component.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode)
Restores the state of model from output stream.
#define _IFT_EngngModel_smtype
virtual NumericalMethod * giveNumericalMethod(MetaStep *mStep)
Returns reference to receiver's numerical method.
EngngModelContext * giveContext()
Context requesting service.
int ndomains
Number of receiver domains.
int updateSharedDofManagers(FloatArray &answer, const UnknownNumberingScheme &s, int ExchangeTag)
Exchanges necessary remote DofManagers data.
SparseMtrxType
Enumerative type used to identify the sparse matrix type.
The reference incremental load vector is defined as totalLoadVector assembled at given time...
Implementation for assembling external forces vectors in standard monolithic FE-problems.
This abstract class represent a general base element class for transport problems.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
virtual void updateYourself(TimeStep *tStep)
Updates internal state after finishing time step.
virtual int giveNumberOfFirstStep(bool force=false)
Returns number of first time step used by receiver.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the state of model to output stream.
std::unique_ptr< PrimaryField > UnknownsField
This field stores solution vector. For fixed size of problem, the PrimaryField is used...
SparseMtrxType sparseMtrxType
Initializes the variable VERBOSE, in order to get a few intermediate messages on screen: beginning an...
void registerField(FieldPtr eField, FieldType key)
Registers the given field (the receiver is not assumed to own given field).
Class representing vector of real numbers.
virtual int checkConsistency()
Allows programmer to test some receiver's internal data, before computation begins.
virtual TimeStep * giveNextStep()
Returns next time step (next to current step) of receiver.
IRResultType
Type defining the return values of InputRecord reading operations.
void zero()
Zeroes all coefficients of receiver.
virtual void updateDomainLinks()
Updates domain links after the domains of receiver have changed.
virtual double giveUnknownComponent(ValueModeType mode, TimeStep *tStep, Domain *d, Dof *dof)
Returns requested unknown.
ClassFactory & classFactory
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
virtual void updateYourself(TimeStep *tStep)
Updates internal state after finishing time step.
#define _IFT_StationaryTransportProblem_exportfields
std::vector< std::unique_ptr< Element > > & giveElements()
virtual FieldPtr giveField(FieldType key, TimeStep *)
Returns the smart pointer to requested field, Null otherwise.
Abstract base class representing the "problem" under consideration.
virtual void setDomain(Domain *d)
virtual TimeStep * giveCurrentStep(bool force=false)
Returns current time step.
virtual void updateDomainLinks()
Updates domain links after the domains of receiver have changed.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode)
Restores the state of model from output stream.
the oofem namespace is to define a context or scope in which all oofem names are defined.
Domain * giveDomain(int n)
Service for accessing particular problem domain.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
virtual void updateInternalState(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
#define OOFEM_WARNING(...)
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 condi...
Class representing solution step.
virtual NM_Status solve(SparseMtrx &K, FloatArray &R, FloatArray *R0, FloatArray &X, FloatArray &dX, FloatArray &F, const FloatArray &internalForcesEBENorm, double &s, referenceLoadInputModeType rlm, int &nite, TimeStep *tStep)=0
Solves the given sparse linear system of equations .
void resize(int s)
Resizes receiver towards requested size.