OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Class representing field of primary variables, which are typically allocated on nodes. More...
#include <dofdistributedprimaryfield.h>
Public Member Functions | |
DofDistributedPrimaryField (EngngModel *a, int idomain, FieldType ft, int nHist) | |
Constructor. More... | |
virtual | ~DofDistributedPrimaryField () |
virtual void | initialize (ValueModeType mode, TimeStep *tStep, FloatArray &answer, const UnknownNumberingScheme &s) |
Copy unknowns from previous solution or DOF's dictionary to the solution vector. More... | |
virtual double | giveUnknownValue (Dof *dof, ValueModeType mode, TimeStep *tStep) |
virtual void | update (ValueModeType mode, TimeStep *tStep, const FloatArray &vectorToStore, const UnknownNumberingScheme &s) |
Project vectorToStore back to DOF's dictionary. More... | |
virtual void | applyDefaultInitialCondition () |
Applies the default initial values values for all DOFs (0) in given domain. More... | |
void | applyInitialCondition (InitialCondition &ic) |
virtual void | applyBoundaryCondition (TimeStep *tStep) |
Applies all boundary conditions to all prescribed DOFs. More... | |
virtual void | applyBoundaryCondition (BoundaryCondition &bc, TimeStep *tStep) |
virtual FloatArray * | giveSolutionVector (TimeStep *tStep) |
void | setInitialGuess (DofManager &dman, TimeStep *tStep, TimeStep *prev) |
virtual void | advanceSolution (TimeStep *tStep) |
Brings up a new solution vector for given time step. More... | |
virtual contextIOResultType | saveContext (DataStream &stream, ContextMode mode) |
Stores receiver state to output stream. More... | |
virtual contextIOResultType | restoreContext (DataStream &stream, ContextMode mode) |
Restores the receiver state previously written in stream. More... | |
Public Member Functions inherited from oofem::PrimaryField | |
PrimaryField (EngngModel *a, int idomain, FieldType ft, int nHist) | |
Constructor. More... | |
virtual | ~PrimaryField () |
void | storeDofManager (TimeStep *tStep, DofManager &dman) |
void | storeInDofDictionaries (TimeStep *tStep) |
void | readDofManager (TimeStep *tStep, DofManager &dman) |
void | readFromDofDictionaries (TimeStep *tStep) |
void | applyInitialCondition (InitialCondition &ic) |
Applies initial condition to all DOFs. More... | |
void | applyBoundaryCondition (BoundaryCondition &bc, TimeStep *tStep) |
Applies the boundary condition to all prescribed DOFs in given domain. More... | |
virtual int | evaluateAt (FloatArray &answer, const FloatArray &coords, ValueModeType mode, TimeStep *tStep) |
Evaluates the field at given point. More... | |
virtual int | evaluateAt (FloatArray &answer, DofManager *dman, ValueModeType mode, TimeStep *tStep) |
Evaluates the field at given DofManager. More... | |
virtual int | __evaluateAt (FloatArray &answer, DofManager *dman, ValueModeType mode, TimeStep *tStep, IntArray *dofId) |
Evaluates the field at given DOF manager, allows to select specific dofs using mask. More... | |
virtual int | __evaluateAt (FloatArray &answer, const FloatArray &coords, ValueModeType mode, TimeStep *tStep, IntArray *dofId) |
Evaluates the field at given point, allows to select specific dofs using mask. More... | |
virtual const char * | giveClassName () const |
int | giveActualStepNumber () |
Public Member Functions inherited from oofem::Field | |
Field (FieldType b) | |
Constructor. More... | |
virtual | ~Field () |
FieldType | giveType () |
Returns the type of receiver. More... | |
std::string | errorInfo (const char *func) const |
Returns string for prepending output (used by error reporting macros). More... | |
Additional Inherited Members | |
Protected Member Functions inherited from oofem::PrimaryField | |
int | resolveIndx (TimeStep *tStep, int shift) |
FloatArray * | giveSolutionVector (int) |
FloatArray * | givePrescribedVector (int) |
Protected Attributes inherited from oofem::PrimaryField | |
int | actualStepNumber |
int | actualStepIndx |
int | nHistVectors |
std::vector< FloatArray > | solutionVectors |
std::vector< FloatArray > | prescribedVectors |
std::vector< TimeStep > | solStepList |
EngngModel * | emodel |
int | domainIndx |
Protected Attributes inherited from oofem::Field | |
FieldType | type |
Class representing field of primary variables, which are typically allocated on nodes.
The field is determined by DOF values stored in DOF repositories (unknown dictionary). These repositories are maintained and updated by engineering models since the algorithms are very specific to each model. The class can return several variables stored in DOF. The purpose of this class is to provide a shell that allows to access these repositories using field services. The class contains also a solution vector for temporal storage of unknowns. The vector needs to be projected back to DOFs.
Definition at line 49 of file dofdistributedprimaryfield.h.
oofem::DofDistributedPrimaryField::DofDistributedPrimaryField | ( | EngngModel * | a, |
int | idomain, | ||
FieldType | ft, | ||
int | nHist | ||
) |
Constructor.
Creates a field of given type associated to given domain. Not using pointer to domain, because this will prevent the use of PrimaryField as an EngngModel attribute. This is because the domain does not exists when PrimaryField is created (this is when EngngModel is created).
a | Engineering model which field belongs to. |
idomain | Index of domain for field. |
ft | Type of stored field. |
nHist | Number of old time steps to store. |
Definition at line 50 of file dofdistributedprimaryfield.C.
|
virtual |
Definition at line 55 of file dofdistributedprimaryfield.C.
|
virtual |
Brings up a new solution vector for given time step.
tStep | Time step for new solution vector. |
Reimplemented from oofem::PrimaryField.
Definition at line 340 of file dofdistributedprimaryfield.C.
References oofem::PrimaryField::advanceSolution(), oofem::Element_remote, oofem::PrimaryField::emodel, oofem::Domain::giveBcs(), oofem::Domain::giveDofManagers(), oofem::EngngModel::giveDomain(), oofem::Domain::giveElements(), oofem::TimeStep::givePreviousStep(), and setInitialGuess().
|
virtual |
Applies all boundary conditions to all prescribed DOFs.
tStep | Current time step. |
Reimplemented from oofem::PrimaryField.
Definition at line 272 of file dofdistributedprimaryfield.C.
References oofem::PrimaryField::domainIndx, oofem::PrimaryField::emodel, oofem::Domain::giveBc(), oofem::Domain::giveBcs(), oofem::ActiveBoundaryCondition::giveBcValue(), oofem::Domain::giveDofManagers(), oofem::EngngModel::giveDomain(), oofem::GeneralBoundaryCondition::giveInternalDofManager(), oofem::TimeStep::giveTargetTime(), oofem::ActiveBoundaryCondition::hasBc(), oofem::GeneralBoundaryCondition::isImposed(), and oofem::DofManager::isNull().
|
virtual |
Definition at line 306 of file dofdistributedprimaryfield.C.
References oofem::BoundaryCondition::give(), oofem::GeneralBoundaryCondition::giveDofIDs(), oofem::Domain::giveDofManager(), oofem::DofManager::giveDofWithID(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveSet(), oofem::GeneralBoundaryCondition::giveSetNumber(), oofem::TimeStep::giveTargetTime(), oofem::DofManager::hasDofID(), oofem::DofManager::isNull(), oofem::Dof::isPrimaryDof(), and oofem::Dof::updateUnknownsDictionary().
|
virtual |
Applies the default initial values values for all DOFs (0) in given domain.
domain | Domain number |
Reimplemented from oofem::PrimaryField.
Definition at line 183 of file dofdistributedprimaryfield.C.
References applyInitialCondition(), oofem::PrimaryField::domainIndx, oofem::Element_remote, oofem::PrimaryField::emodel, oofem::InitialCondition::give(), oofem::Domain::giveBcs(), oofem::Domain::giveDofManagers(), oofem::EngngModel::giveDomain(), oofem::Domain::giveElements(), oofem::Domain::giveIc(), oofem::Domain::giveIcs(), oofem::EngngModel::giveSolutionStepWhenIcApply(), and oofem::InitialCondition::hasConditionOn().
void oofem::DofDistributedPrimaryField::applyInitialCondition | ( | InitialCondition & | ic | ) |
Definition at line 230 of file dofdistributedprimaryfield.C.
References oofem::PrimaryField::emodel, oofem::DofManager::end(), oofem::DofManager::findDofWithDofId(), oofem::InitialCondition::give(), oofem::InitialCondition::giveDofIDs(), oofem::Domain::giveDofManager(), oofem::DofManager::giveDofWithID(), oofem::FEMComponent::giveDomain(), oofem::Domain::giveSet(), oofem::InitialCondition::giveSetNumber(), oofem::EngngModel::giveSolutionStepWhenIcApply(), oofem::TimeStep::giveTimeIncrement(), oofem::InitialCondition::hasConditionOn(), oofem::DofManager::isNull(), and oofem::Dof::updateUnknownsDictionary().
Referenced by applyDefaultInitialCondition().
|
virtual |
tStep | Time step to take solution for. |
Reimplemented from oofem::PrimaryField.
Definition at line 80 of file dofdistributedprimaryfield.C.
References oofem::PrimaryField::giveSolutionVector().
|
virtual |
dof | Pointer to DOF. |
mode | What the unknown describes (increment, total value etc.). |
tStep | Time step of interest. |
Reimplemented from oofem::PrimaryField.
Definition at line 59 of file dofdistributedprimaryfield.C.
References oofem::TimeStep::givePreviousStep(), oofem::TimeStep::giveTimeIncrement(), oofem::Dof::giveUnknownsDictionaryValue(), and OOFEM_ERROR.
|
virtual |
Copy unknowns from previous solution or DOF's dictionary to the solution vector.
mode | what the unknown describes (increment, total value etc.). |
tStep | Time of interest. |
answer | Resulting vector. |
Reimplemented from oofem::PrimaryField.
Definition at line 87 of file dofdistributedprimaryfield.C.
References oofem::FloatArray::at(), oofem::PrimaryField::domainIndx, oofem::PrimaryField::emodel, oofem::Domain::giveBcs(), oofem::Domain::giveDofManagers(), oofem::EngngModel::giveDomain(), oofem::Domain::giveElements(), oofem::EngngModel::giveNumberOfDomainEquations(), oofem::FloatArray::resize(), and oofem::FloatArray::zero().
|
virtual |
Restores the receiver state previously written in stream.
Reads the FEMComponent class-id in order to allow test consistency.
stream | Input stream. |
mode | Determines amount of info in stream (state, definition,...). |
Throws | an ContextIOERR exception if error encountered. |
Reimplemented from oofem::PrimaryField.
Definition at line 382 of file dofdistributedprimaryfield.C.
References oofem::CIO_OK.
|
virtual |
Stores receiver state to output stream.
Writes the FEMComponent class-id in order to allow test whether correct data are then restored.
stream | Output stream. |
mode | Determines amount of info in stream (state, definition,...). |
Throws | an ContextIOERR exception if error encountered. |
Reimplemented from oofem::PrimaryField.
Definition at line 375 of file dofdistributedprimaryfield.C.
References oofem::CIO_OK.
void oofem::DofDistributedPrimaryField::setInitialGuess | ( | DofManager & | dman, |
TimeStep * | tStep, | ||
TimeStep * | prev | ||
) |
Definition at line 331 of file dofdistributedprimaryfield.C.
Referenced by advanceSolution().
|
virtual |
Project vectorToStore back to DOF's dictionary.
vectorToStore | Vector with the size of number of equations. |
mode | Mode of the unknown (increment, total value etc.) |
tStep | Time step unknowns belong to. |
Reimplemented from oofem::PrimaryField.
Definition at line 134 of file dofdistributedprimaryfield.C.
References oofem::FloatArray::at(), oofem::PrimaryField::domainIndx, oofem::PrimaryField::emodel, oofem::Domain::giveBcs(), oofem::Domain::giveDofManagers(), oofem::EngngModel::giveDomain(), and oofem::Domain::giveElements().