OOFEM 3.0
Loading...
Searching...
No Matches
oofem::Dof Class Referenceabstract

#include <dof.h>

Inheritance diagram for oofem::Dof:
Collaboration diagram for oofem::Dof:

Public Member Functions

 Dof (DofManager *aNode, DofIDItem id=Undef)
virtual ~Dof ()
 Destructor.
virtual dofType giveDofType ()=0
 Returns the type of the receiver.
virtual const char * giveClassName () const
 Returns class name of the receiver.
int giveDofManNumber () const
DofManagergiveDofManager () const
int giveDofManGlobalNumber () const
virtual double giveBcValue (ValueModeType mode, TimeStep *tStep)
int giveEquationNumber (const UnknownNumberingScheme &s)
virtual int __giveEquationNumber () const =0
virtual void giveEquationNumbers (IntArray &masterEqNumbers, const UnknownNumberingScheme &s)
virtual void giveDofIDs (IntArray &masterDofIDs)
virtual int __givePrescribedEquationNumber ()=0
virtual int askNewEquationNumber (TimeStep *tStep)=0
virtual double giveUnknown (ValueModeType mode, TimeStep *tStep)=0
virtual double giveUnknown (PrimaryField &field, ValueModeType mode, TimeStep *tStep)=0
virtual void giveUnknowns (FloatArray &masterUnknowns, ValueModeType mode, TimeStep *tStep)
virtual void giveUnknowns (FloatArray &masterUnknowns, PrimaryField &field, ValueModeType mode, TimeStep *tStep)
virtual void computeDofTransformation (FloatArray &masterContribs)
virtual int giveNumberOfPrimaryMasterDofs ()
virtual bool hasBc (TimeStep *tStep)=0
virtual bool hasIc ()=0
virtual bool hasIcOn (ValueModeType u)=0
DofIDItem giveDofID () const
void setDofID (DofIDItem id)
virtual bool isPrimaryDof ()
virtual int giveBcId ()=0
virtual int giveIcId ()=0
virtual void giveMasterDofManArray (IntArray &answer)
virtual void updateLocalNumbering (EntityRenumberingFunctor &f)
virtual void printSingleOutputAt (FILE *file, TimeStep *tStep, char ch, ValueModeType mode, double scale=1.0)
virtual void printMultipleOutputAt (FILE *File, TimeStep *tStep, char *ch, ValueModeType *mode, int nite)
void printSingleOutputWithAdditionAt (FILE *File, TimeStep *tStep, char ch, ValueModeType mode, double addend)
virtual void printYourself ()
 Prints the receiver state on stdout.
virtual void updateYourself (TimeStep *tStep)
virtual void updateUnknownsDictionary (TimeStep *tStep, ValueModeType mode, double dofValue)
virtual double giveUnknownsDictionaryValue (TimeStep *tStep, ValueModeType mode)
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros).
virtual void saveContext (DataStream &stream, ContextMode mode)
 Stores receiver state to output stream.
virtual void restoreContext (DataStream &stream, ContextMode mode)
 Restores the receiver state previously written in stream.
virtual void setBcId (int bcId)
 Overwrites the boundary condition id (0-inactive BC), intended for specific purposes such as coupling of bc's in multiscale simulations.
virtual void setIcId (int icId)
 Overwrites the initial condition id (0-inactive IC).
virtual void setEquationNumber (int equationNumber)
virtual void setUnknowns (Dictionary *unknowns)
virtual DictionarygiveUnknowns ()
virtual int giveEqn ()
virtual int packUnknowns (DataStream &buff, ValueModeType mode, TimeStep *tStep)
virtual int unpackAndUpdateUnknown (DataStream &buff, ValueModeType mode, TimeStep *tStep)

Protected Member Functions

virtual BoundaryConditiongiveBc ()
virtual InitialConditiongiveIc ()

Protected Attributes

DofManagerdofManager
 Link to related DofManager.
DofIDItem dofID
 Physical meaning of DOF.

Friends

class SimpleSlaveDof

Detailed Description

Abstract class Dof represents Degree Of Freedom in finite element mesh. DOFs are possessed by DofManagers (i.e, nodes, sides or whatever) and one DOF belongs to only one DofManager. Dof maintain its related equation or prescribed equation number. This equation number is usually assigned by EngngModel, however, several numbering schemes can exists (see giveEquationNumber and similar services).

It maintains also its physical meaning and reference to related DofManager (reference to DofManager which possess particular DOF). To describe physical meaning of particular Dof, special enum type DofId has been introduced (see cltypes.h). This type is more descriptive than UnknownType, which determines physical meaning for unknowns generally (displacement or temperature). DofId type must distinguish between dofs having displacement unknown, but in different directions, because only some of these may be required by elements.

Dof can be subjected to boundary (BC) or initial (IC) condition. Method for obtaining corresponding DOF unknown value is provided. If no IC condition has been given, zero value IC is assumed otherwise when needed.

Dof class generally supports changes of static system during computation. This feature generally leads to equation renumbering. Then because equation number associated to dof may change, it may become extremely complicated to ask EngngModel for unknown from previous time step (because equation number may have been changed). To overcome this problem, derived class will implement so called unknown dictionary, which is updated after finishing each time step and where unknowns for particular dof are stored. Dof then uses this dictionary for requests for unknowns instead of asking EngngModel for unknowns. Unknowns in dof dictionary are updated by EngngModel automatically (if EngngModel supports changes of static system) after finishing time step.

Definition at line 93 of file dof.h.

Constructor & Destructor Documentation

◆ Dof()

oofem::Dof::Dof ( DofManager * aNode,
DofIDItem id = Undef )

Constructor. Creates DOF with number i, belonging to DofManager aNode and with physical meaning described by id.

Parameters
aNodeDofManager which possess DOF.
idPhysical meaning type.
See also
cltypes.h, DofIDItem type

Definition at line 50 of file dof.C.

References dofID, and dofManager.

Referenced by oofem::ActiveDof::ActiveDof(), oofem::ActiveDof::giveMasterDof(), oofem::SimpleSlaveDof::giveMasterDof(), oofem::MasterDof::MasterDof(), oofem::MasterDof::MasterDof(), oofem::SimpleSlaveDof::SimpleSlaveDof(), oofem::SimpleSlaveDof::SimpleSlaveDof(), and oofem::SlaveDof::SlaveDof().

◆ ~Dof()

virtual oofem::Dof::~Dof ( )
inlinevirtual

Destructor.

Definition at line 112 of file dof.h.

Member Function Documentation

◆ __giveEquationNumber()

virtual int oofem::Dof::__giveEquationNumber ( ) const
pure virtual

Returns equation number of receiver, usually assigned by emodel. If Dof has active BC, returned equation number is zero. After initializing Dof by calling constructor, Dof has no equation number assigned. When firstly invoked, this function asks EngngModel object for next equation prescribed equation number (this will increase also total number of equation at EngngModel level). Note: By asking nodal code numbers or element code numbers when initializing code numbers in EngngMode, designer should alter equation numbering strategy.

Returns
Equation number of DOF.

Implemented in oofem::ActiveDof, oofem::MasterDof, oofem::SimpleSlaveDof, and oofem::SlaveDof.

References giveDofIDs(), and giveEquationNumbers().

Referenced by oofem::DofIDEquationNumbering::giveDofEquationNumber(), oofem::EModelDefaultEquationNumbering::giveDofEquationNumber(), oofem::PressureEquationNumbering::giveDofEquationNumber(), oofem::VelocityEquationNumbering::giveDofEquationNumber(), oofem::VelocityNumberingScheme::giveDofEquationNumber(), oofem::AdaptiveNonLinearStatic::giveUnknownComponent(), oofem::DEIDynamic::giveUnknownComponent(), oofem::DIIDynamic::giveUnknownComponent(), oofem::FreeWarping::giveUnknownComponent(), oofem::LinearStatic::giveUnknownComponent(), oofem::NlDEIDynamic::giveUnknownComponent(), oofem::NLTransientTransportProblem::giveUnknownComponent(), oofem::NonLinearDynamic::giveUnknownComponent(), oofem::NonLinearStatic::giveUnknownComponent(), oofem::NonStationaryTransportProblem::giveUnknownComponent(), oofem::StaticStructural::giveUnknownComponent(), oofem::StationaryTransportProblem::giveUnknownComponent(), oofem::SUPG::giveUnknownComponent(), oofem::REGISTER_SparseNonLinearSystemNM(), oofem::HuertaErrorEstimator::solveRefinedElementProblem(), and oofem::HuertaErrorEstimator::solveRefinedWholeProblem().

◆ __givePrescribedEquationNumber()

virtual int oofem::Dof::__givePrescribedEquationNumber ( )
pure virtual

Returns prescribed equation number of receiver. If Dof has inactive BC, returned prescribed equation number is zero. If Dof has active BC, then the corresponding prescribed equation number is returned. is zero. After initializing Dof by calling constructor, Dof has no prescribed equation number assigned. When firstly invoked, this function asks EngngModel object for next equation or prescribed equation number (this will increase also total number of equation at EngngModel level). Note: By asking nodal code numbers or element code numbers when initializing code numbers in EngngMode, designer should alter equation numbering strategy.

Returns
Prescribed equation number.

Implemented in oofem::ActiveDof, oofem::MasterDof, oofem::SimpleSlaveDof, and oofem::SlaveDof.

Referenced by oofem::TransportGradientDirichlet::computeCoefficientMatrix(), oofem::PrescribedDispSlipBCDirichletRC::computeReinfStress(), oofem::PrescribedDispSlipBCDirichletRC::computeTransferStress(), oofem::DofIDEquationNumbering::giveDofEquationNumber(), oofem::EModelDefaultPrescribedEquationNumbering::giveDofEquationNumber(), oofem::PressureEquationNumbering::giveDofEquationNumber(), oofem::VelocityEquationNumbering::giveDofEquationNumber(), oofem::VelocityNumberingScheme::giveDofEquationNumber(), oofem::CBS::giveTractionPressure(), oofem::REGISTER_SparseNonLinearSystemNM(), oofem::PrescribedDispSlipBCDirichletRC::updateCoefficientMatrix(), oofem::PrescribedGenStrainShell7::updateCoefficientMatrix(), and oofem::PrescribedGradient::updateCoefficientMatrix().

◆ askNewEquationNumber()

virtual int oofem::Dof::askNewEquationNumber ( TimeStep * tStep)
pure virtual

Asks EngngModel for new equation number. Necessary for EngngModels supporting changes of static system during solution. Then it is necessary to force equation renumbering after finishing each time step.

Parameters
tStepTime step determining the time.
See also
Dof::updateUnknownsDictionary
EngngModel::requiresUnknownsDictionaryUpdate

Implemented in oofem::ActiveDof, oofem::MasterDof, oofem::SimpleSlaveDof, and oofem::SlaveDof.

Referenced by oofem::DofManager::askNewEquationNumbers().

◆ computeDofTransformation()

void oofem::Dof::computeDofTransformation ( FloatArray & masterContribs)
virtual

Computes dof transformation array, which describes the dependence of receiver value on values of master dofs. For primary dof, this transformation is unity, however, for slave DOFs, this array contains weights, which are multiplied by corresponding master DOF values to obtain slave value.

Parameters
masterContribsContributions of master dofs for receiver.

Reimplemented in oofem::ActiveDof, and oofem::SlaveDof.

Definition at line 173 of file dof.C.

References oofem::FloatArray::at(), and oofem::FloatArray::resize().

Referenced by oofem::DofManager::computeM2LTransformation(), and giveUnknown().

◆ errorInfo()

std::string oofem::Dof::errorInfo ( const char * func) const

Returns string for prepending output (used by error reporting macros).

Definition at line 113 of file dof.C.

References dofID, dofManager, and giveClassName().

◆ giveBc()

virtual BoundaryCondition * oofem::Dof::giveBc ( )
inlineprotectedvirtual

Returns boundary condition of dof if it is prescribed.

Returns
NULL if no BC applied, otherwise pointer to corresponding BC.

Reimplemented in oofem::MasterDof, and oofem::SimpleSlaveDof.

Definition at line 448 of file dof.h.

Referenced by oofem::ActiveDof::giveActiveBoundaryCondition(), and giveBcValue().

◆ giveBcId()

virtual int oofem::Dof::giveBcId ( )
pure virtual

Returns the id of associated boundary condition, if there is any. Used only for printing purposes. In general, id could not be used to decide whether BC is active. Use appropriate services instead.

Returns
Id of associated Boundary condition, zero otherwise

Implemented in oofem::ActiveDof, oofem::MasterDof, oofem::SimpleSlaveDof, and oofem::SlaveDof.

Referenced by oofem::RefinedElement::giveCompatibleBcDofArray(), oofem::DofManager::giveInputRecord(), oofem::GnuplotExportModule::outputReactionForces(), oofem::TransientTransportProblem::printOutputAt(), oofem::StructuralEngngModel::printReactionForces(), oofem::SolutionbasedShapeFunction::setBoundaryConditionOnDof(), and oofem::HuertaErrorEstimatorInterface::setupRefinedElementProblem3D().

◆ giveBcValue()

double oofem::Dof::giveBcValue ( ValueModeType mode,
TimeStep * tStep )
virtual

Returns value of boundary condition of dof if it is prescribed. Use hasBc service to determine, if boundary condition is active. The physical meaning of BC is determined by corresponding DOF.

Parameters
modeUnknown char type (if total or incremental value is returned).
tStepTime step.
Returns
Prescribed value of unknown or zero if not prescribed.

Reimplemented in oofem::ActiveDof, and oofem::SimpleSlaveDof.

Definition at line 120 of file dof.C.

References giveBc(), giveDofManager(), giveIc(), hasBc(), hasIcOn(), and oofem::TimeStep::isTheFirstStep().

Referenced by oofem::RefinedElement::giveCompatibleBcDofArray(), oofem::MasterDof::giveUnknown(), oofem::MasterDof::giveUnknown(), and oofem::PFEM::updateDofUnknownsDictionaryPressure().

◆ giveClassName()

virtual const char * oofem::Dof::giveClassName ( ) const
inlinevirtual

Returns class name of the receiver.

Reimplemented in oofem::ActiveDof, oofem::MasterDof, oofem::SimpleSlaveDof, and oofem::SlaveDof.

Definition at line 117 of file dof.h.

Referenced by errorInfo().

◆ giveDofID()

DofIDItem oofem::Dof::giveDofID ( ) const
inline

Returns DofID value of receiver, which determines type of of unknown connected to receiver (e.g., u-displacement, v-displacement, ...).

Definition at line 276 of file dof.h.

References dofID.

Referenced by oofem::DofManager::appendDof(), oofem::MixedGradientPressureDirichlet::assembleVector(), oofem::MixedGradientPressureDirichlet::computeDofTransformation(), oofem::SolutionbasedShapeFunction::computeDofTransformation(), oofem::Node::computeL2GTransformation(), oofem::RigidArmNode::computeMasterContribution(), oofem::Node::drawYourself(), oofem::DofManager::findDofWithDofId(), oofem::BoundaryCondition::give(), oofem::InteractionBoundaryCondition::give(), oofem::PrescribedDispSlipBCDirichletRC::give(), oofem::PrescribedGenStrainShell7::give(), oofem::PrescribedGradient::give(), oofem::RotatingBoundary::give(), oofem::UserDefDirichletBC::give(), oofem::MixedGradientPressureDirichlet::giveBcValue(), oofem::PrescribedGradientBCPeriodic::giveBcValue(), oofem::TransportGradientPeriodic::giveBcValue(), oofem::RefinedElement::giveCompatibleBcDofArray(), oofem::DofManager::giveCompleteMasterDofIDArray(), oofem::AuxVelocityNumberingScheme::giveDofEquationNumber(), oofem::DofIDEquationNumbering::giveDofEquationNumber(), oofem::MicroMaterial::giveDofEquationNumber(), oofem::PressureEquationNumbering::giveDofEquationNumber(), oofem::PressureNumberingScheme::giveDofEquationNumber(), oofem::QuasicontinuumNumberingscheme::giveDofEquationNumber(), oofem::VelocityEquationNumbering::giveDofEquationNumber(), oofem::VelocityNumberingScheme::giveDofEquationNumber(), oofem::ActiveDof::giveDofIDs(), giveDofIDs(), oofem::DofManager::giveInputRecord(), oofem::PrescribedGradientBCPeriodic::giveMasterDof(), oofem::TransportGradientPeriodic::giveMasterDof(), oofem::MixedGradientPressureDirichlet::giveUnknown(), oofem::MixedGradientPressureDirichlet::giveUnknown(), oofem::MixedGradientPressureDirichlet::giveUnknown(), oofem::PrescribedGradientBCPeriodic::giveUnknown(), oofem::PrescribedGradientBCPeriodic::giveUnknown(), oofem::PrescribedGradientBCPeriodic::giveUnknown(), oofem::TransportGradientPeriodic::giveUnknown(), oofem::TransportGradientPeriodic::giveUnknown(), oofem::CBS::giveUnknownComponent(), oofem::NLTransientTransportProblem::giveUnknownComponent(), oofem::NonStationaryTransportProblem::giveUnknownComponent(), oofem::DofManager::giveUnknownVectorOfType(), oofem::Node::giveUpdatedCoordinate(), oofem::DofManager::hasDofID(), oofem::HangingNode::postInitialize(), oofem::RigidArmNode::postInitialize(), oofem::qcNode::postInitializeAsHangingNode(), oofem::CBS::printDofOutputAt(), oofem::PFEM::printDofOutputAt(), oofem::SUPG::printDofOutputAt(), oofem::REGISTER_SparseNonLinearSystemNM(), oofem::DofManager::removeDof(), oofem::HuertaErrorEstimatorInterface::setupRefinedElementProblem3D(), and oofem::Node::updateYourself().

◆ giveDofIDs()

void oofem::Dof::giveDofIDs ( IntArray & masterDofIDs)
virtual

As giveEquationNumbers but for dof IDs.

Parameters
[out]masterDofIDsDof IDs of master DOFs for receiver.

Reimplemented in oofem::ActiveDof, and oofem::SlaveDof.

Definition at line 67 of file dof.C.

References giveDofID().

Referenced by __giveEquationNumber(), and oofem::DofManager::giveCompleteMasterDofIDArray().

◆ giveDofManager()

DofManager * oofem::Dof::giveDofManager ( ) const
inline

◆ giveDofManGlobalNumber()

int oofem::Dof::giveDofManGlobalNumber ( ) const

Definition at line 74 of file dof.C.

References dofManager.

Referenced by oofem::PrescribedDispSlipBCDirichletRC::give().

◆ giveDofManNumber()

◆ giveDofType()

virtual dofType oofem::Dof::giveDofType ( )
pure virtual

Returns the type of the receiver.

Implemented in oofem::ActiveDof, oofem::MasterDof, oofem::SimpleSlaveDof, and oofem::SlaveDof.

◆ giveEqn()

virtual int oofem::Dof::giveEqn ( )
inlinevirtual

Gives number for equation, negative for prescribed equations.

Returns
Equation number of receiver.

Reimplemented in oofem::MasterDof.

Definition at line 407 of file dof.h.

Referenced by oofem::PrimaryField::applyBoundaryCondition(), and oofem::PrimaryField::giveUnknownValue().

◆ giveEquationNumber()

int oofem::Dof::giveEquationNumber ( const UnknownNumberingScheme & s)

Returns equation number of receiver for given equation numbering scheme.

Parameters
sNumbering scheme used to obtain equation number.
Returns
Equation number for DOF.

Definition at line 56 of file dof.C.

References oofem::UnknownNumberingScheme::giveDofEquationNumber().

Referenced by oofem::MixedGradientPressureDirichlet::assembleVector(), oofem::VTKBaseExportModule::exportExternalForces(), oofem::ActiveDof::giveEquationNumbers(), and oofem::EIPrimaryUnknownMapper::mapAndUpdate().

◆ giveEquationNumbers()

void oofem::Dof::giveEquationNumbers ( IntArray & masterEqNumbers,
const UnknownNumberingScheme & s )
virtual

Returns equation number of receiver. If Dof has active BC, returned equation number is zero. After initializing Dof by calling constructor, Dof has no equation number assigned. When firstly invoked, this function asks EngngModel object for next equation prescribed equation number (this will increase also total number of equation at EngngModel level). Note: By asking nodal code numbers or element code numbers when initializing code numbers in EngngMode, designer should alter equation numbering strategy.

For slave dofs (dependent on other primary dofs) the array of master equation numbers is returned.

Parameters
[out]masterEqNumbersEquation numbers of master DOFs for receiver.
[in]sNumbering scheme used enumeration of equations.

Reimplemented in oofem::ActiveDof, and oofem::SlaveDof.

Definition at line 61 of file dof.C.

References oofem::IntArray::at(), oofem::UnknownNumberingScheme::giveDofEquationNumber(), and oofem::IntArray::resize().

Referenced by __giveEquationNumber(), and oofem::DofManager::giveCompleteLocationArray().

◆ giveIc()

virtual InitialCondition * oofem::Dof::giveIc ( )
inlineprotectedvirtual

Returns initial condition of dof if it is prescribed.

Returns
NULL if no IC applied, otherwise pointer to corresponding IC.

Reimplemented in oofem::ActiveDof, oofem::MasterDof, and oofem::SimpleSlaveDof.

Definition at line 453 of file dof.h.

Referenced by giveBcValue().

◆ giveIcId()

virtual int oofem::Dof::giveIcId ( )
pure virtual

Returns the id of associated initial condition, if there is any. Used only for printing purposes. In general, id could not be used to decide whether IC is active. Use appropriate services instead.

Returns
Id of associated initial condition, zero otherwise

Implemented in oofem::ActiveDof, oofem::MasterDof, oofem::SimpleSlaveDof, and oofem::SlaveDof.

References giveMasterDofManArray().

◆ giveMasterDofManArray()

void oofem::Dof::giveMasterDofManArray ( IntArray & answer)
virtual
Returns
Array of master DofManagers to which the receiver is linked.

Reimplemented in oofem::ActiveDof, oofem::SimpleSlaveDof, and oofem::SlaveDof.

Definition at line 180 of file dof.C.

References oofem::IntArray::at(), giveDofManNumber(), and oofem::IntArray::resize().

Referenced by giveIcId(), and oofem::DofManager::giveMasterDofMans().

◆ giveNumberOfPrimaryMasterDofs()

virtual int oofem::Dof::giveNumberOfPrimaryMasterDofs ( )
inlinevirtual
Returns
Number of primary dofs, on which receiver value depends on (even recursively).

Reimplemented in oofem::ActiveDof, and oofem::SlaveDof.

Definition at line 252 of file dof.h.

Referenced by oofem::DofManager::computeM2LTransformation().

◆ giveUnknown() [1/2]

virtual double oofem::Dof::giveUnknown ( PrimaryField & field,
ValueModeType mode,
TimeStep * tStep )
pure virtual

The key method of class Dof. Returns the value of the unknown of the receiver at given time step associated to given field.

Parameters
fieldField used to provide values.
modeMode of unknown.
tStepTime step when unknown is requested. See documentation of particular EngngModel class for valid tStep values (most implementation can return only values for current and possibly for previous time step).
Returns
Value of unknown. If activeBC exist then returns value prescribed by BC. If tStep is time step when IC apply, returns value given by this IC.

Implemented in oofem::ActiveDof, oofem::MasterDof, oofem::SimpleSlaveDof, and oofem::SlaveDof.

References computeDofTransformation(), and giveUnknowns().

◆ giveUnknown() [2/2]

virtual double oofem::Dof::giveUnknown ( ValueModeType mode,
TimeStep * tStep )
pure virtual

The key method of class Dof. Returns the value of the unknown of the receiver at given time step. Unknown is characterized by its physical meaning (i.g., displacement) an by its mode (e.g., value of displacement, velocity of displacement or acceleration of displacement). UnknownType of requested unknown must be same as UnknownType of Dof.

Parameters
modeMode of unknown (e.g, total value, velocity or acceleration of unknown).
tStepTime step when unknown is requested. See documentation of particular EngngModel class for valid tStep values (most implementation can return only values for current and possibly for previous time step).
Returns
Value of unknown. If activeBC exist then returns value prescribed by BC. If tStep is time step when IC apply, returns value given by this IC.

Implemented in oofem::ActiveDof, oofem::MasterDof, oofem::SimpleSlaveDof, and oofem::SlaveDof.

Referenced by oofem::LinearConstraintBC::assembleVector(), oofem::InternalElementDofManErrorCheckingRule::check(), oofem::NodeErrorCheckingRule::check(), oofem::LatticeNeumannCouplingNode::computeLoadCouplingContribution(), oofem::CoupledFieldsElement::computeVectorOfDofIDs(), oofem::Node::drawYourself(), oofem::tet21ghostsolid::EIPrimaryUnknownMI_computePrimaryUnknownVectorAtLocal(), oofem::VTKXMLLatticeExportModule::exportPrimaryVars(), oofem::VTKXMLPeriodicExportModule::exportPrimaryVars(), oofem::VTKExportModule::getDofManPrimaryVariable(), oofem::VTKBaseExportModule::getNodalVariableFromPrimaryField(), oofem::InternalElementDofManErrorCheckingRule::getValue(), oofem::NodeErrorCheckingRule::getValue(), oofem::DofManager::giveCompleteUnknownVector(), oofem::PrescribedGradientBCPeriodic::giveUnknown(), oofem::PrescribedGradientBCPeriodic::giveUnknown(), oofem::PrescribedGradientBCPeriodic::giveUnknown(), oofem::TransportGradientPeriodic::giveUnknown(), oofem::TransportGradientPeriodic::giveUnknown(), giveUnknowns(), giveUnknowns(), oofem::DofManager::giveUnknownVectorOfType(), oofem::Node::giveUpdatedCoordinate(), oofem::tet21ghostsolid::NodalAveragingRecoveryMI_computeNodalValue(), oofem::GnuplotExportModule::outputBoundaryCondition(), printMultipleOutputAt(), printSingleOutputAt(), printSingleOutputWithAdditionAt(), and oofem::Node::updateYourself().

◆ giveUnknowns() [1/3]

virtual Dictionary * oofem::Dof::giveUnknowns ( )
inlinevirtual

Receives the dictionary of unknowns in receiver.

Returns
Dictionary of unknowns for DOF.

Reimplemented in oofem::MasterDof.

Definition at line 401 of file dof.h.

◆ giveUnknowns() [2/3]

void oofem::Dof::giveUnknowns ( FloatArray & masterUnknowns,
PrimaryField & field,
ValueModeType mode,
TimeStep * tStep )
virtual

The key method of class Dof. Returns the value of the unknown of the receiver at given time step associated to given field. For primary dof it returns is associated unknown value, for slave dofs it returns an array of master values (in recursive way).

Parameters
masterUnknowns
fieldThe field to pick unknowns from.
modeValue mode for unknowns.
tStepTime step for when unknowns are requested.

Reimplemented in oofem::ActiveDof, and oofem::SlaveDof.

Definition at line 166 of file dof.C.

References oofem::FloatArray::at(), giveUnknown(), and oofem::FloatArray::resize().

◆ giveUnknowns() [3/3]

void oofem::Dof::giveUnknowns ( FloatArray & masterUnknowns,
ValueModeType mode,
TimeStep * tStep )
virtual

The key method of class Dof. Returns the value of the unknown of the receiver at given time step associated to given field. For primary dof it returns is associated unknown value, for slave dofs it returns an array of master values (in recursive way).

Parameters
masterUnknownsValues of master unknowns for receiver.
modeValue mode for unknowns.
tStepTime step for when unknowns are requested.

Reimplemented in oofem::ActiveDof, and oofem::SlaveDof.

Definition at line 159 of file dof.C.

References oofem::FloatArray::at(), giveUnknown(), and oofem::FloatArray::resize().

Referenced by giveUnknown(), oofem::IncrementalLinearStatic::giveUnknownComponent(), oofem::NLTransientTransportProblem::giveUnknownComponent(), oofem::NonStationaryTransportProblem::giveUnknownComponent(), oofem::PFEM::giveUnknownComponent(), and oofem::SUPG::giveUnknownComponent().

◆ giveUnknownsDictionaryValue()

virtual double oofem::Dof::giveUnknownsDictionaryValue ( TimeStep * tStep,
ValueModeType mode )
inlinevirtual

Access dictionary value, if not present zero is returned.

Parameters
tStepTime step.
modeMode of value.
Returns
The requested value.

Reimplemented in oofem::MasterDof.

Definition at line 373 of file dof.h.

Referenced by oofem::EigenVectorPrimaryField::giveUnknownValue().

◆ hasBc()

◆ hasIc()

virtual bool oofem::Dof::hasIc ( )
pure virtual

Test if Dof has initial condition.

Returns
True if IC exists, false otherwise.

Implemented in oofem::ActiveDof, oofem::MasterDof, oofem::SimpleSlaveDof, and oofem::SlaveDof.

◆ hasIcOn()

virtual bool oofem::Dof::hasIcOn ( ValueModeType u)
pure virtual

Test if Dof has initial condition of required ValueModeType.

Parameters
uType of required IC.
Returns
True if IC exists, false otherwise.
See also
ValueModeType

Implemented in oofem::ActiveDof, oofem::MasterDof, oofem::SimpleSlaveDof, and oofem::SlaveDof.

Referenced by giveBcValue().

◆ isPrimaryDof()

virtual bool oofem::Dof::isPrimaryDof ( )
inlinevirtual

Tests if receiver is primary DOF. Dof is primary if it possess or directly represent certain DOF. If it is linked somehow (rigid arm, doubled node) to other DOF(s) then it is not primary DOF.

Returns
True if receiver is primary DOF, false otherwise (default).

Reimplemented in oofem::ActiveDof, and oofem::MasterDof.

Definition at line 287 of file dof.h.

Referenced by oofem::Node::drawYourself(), oofem::DofManager::giveMasterDofMans(), oofem::DofManager::hasAnySlaveDofs(), oofem::EIPrimaryUnknownMapper::mapAndUpdate(), and oofem::DofManager::postInitialize().

◆ packUnknowns()

virtual int oofem::Dof::packUnknowns ( DataStream & buff,
ValueModeType mode,
TimeStep * tStep )
inlinevirtual

Packs specific DOF Manager's dofs unknowns into communication buffer. If dof is slave, then no packing is done, this is maintained by master. This requires master be available at same partition as slave.

Parameters
buffCommunication buffer to pack data.
modeMode of unknown (e.g, total value, velocity or acceleration of unknown).
tStepTime step when unknown requested. See documentation of particular EngngModel class for valid tStep values (most implementations can return only values for current and possibly for previous time step).
Returns
Nonzero if successful.
Todo
Remove this? It is not inherited by MasterDof. Is this leftovers? / Mikael

Definition at line 421 of file dof.h.

◆ printMultipleOutputAt()

void oofem::Dof::printMultipleOutputAt ( FILE * File,
TimeStep * tStep,
char * ch,
ValueModeType * mode,
int nite )
virtual

Prints Dof output (it prints value of unknown related to dof at given timeStep). The format of output depends on analysis type. Called from corresponding e-model.

Definition at line 92 of file dof.C.

References dofID, and giveUnknown().

Referenced by oofem::DEIDynamic::printDofOutputAt(), oofem::DIIDynamic::printDofOutputAt(), oofem::NlDEIDynamic::printDofOutputAt(), and oofem::NonLinearDynamic::printDofOutputAt().

◆ printSingleOutputAt()

void oofem::Dof::printSingleOutputAt ( FILE * file,
TimeStep * tStep,
char ch,
ValueModeType mode,
double scale = 1.0 )
virtual

Prints Dof output (it prints value of unknown related to dof at given timeStep). The format of output depends on analysis type. Called from corresponding e-model.

Definition at line 76 of file dof.C.

References dofID, and giveUnknown().

Referenced by oofem::CBS::printDofOutputAt(), oofem::EngngModel::printDofOutputAt(), oofem::PFEM::printDofOutputAt(), and oofem::SUPG::printDofOutputAt().

◆ printSingleOutputWithAdditionAt()

void oofem::Dof::printSingleOutputWithAdditionAt ( FILE * File,
TimeStep * tStep,
char ch,
ValueModeType mode,
double addend )

Definition at line 84 of file dof.C.

References dofID, and giveUnknown().

◆ printYourself()

void oofem::Dof::printYourself ( )
virtual

Prints the receiver state on stdout.

Reimplemented in oofem::MasterDof.

Definition at line 107 of file dof.C.

References dofID, and dofManager.

Referenced by oofem::DofManager::printYourself(), oofem::ElementDofManager::printYourself(), oofem::ElementSide::printYourself(), and oofem::Node::printYourself().

◆ restoreContext()

void oofem::Dof::restoreContext ( DataStream & stream,
ContextMode mode )
virtual

Restores the receiver state previously written in stream.

Reimplemented in oofem::ActiveDof, oofem::MasterDof, oofem::SimpleSlaveDof, and oofem::SlaveDof.

Definition at line 147 of file dof.C.

References oofem::CIO_IOERR, dofID, oofem::DataStream::read(), and THROW_CIOERR.

Referenced by oofem::DofManager::restoreContext().

◆ saveContext()

void oofem::Dof::saveContext ( DataStream & stream,
ContextMode mode )
virtual

Stores receiver state to output stream.

Reimplemented in oofem::ActiveDof, oofem::MasterDof, oofem::SimpleSlaveDof, and oofem::SlaveDof.

Definition at line 137 of file dof.C.

References oofem::CIO_IOERR, dofID, THROW_CIOERR, and oofem::DataStream::write().

◆ setBcId()

virtual void oofem::Dof::setBcId ( int bcId)
inlinevirtual

◆ setDofID()

void oofem::Dof::setDofID ( DofIDItem id)
inline

Sets the ID of receiver.

Definition at line 280 of file dof.h.

◆ setEquationNumber()

virtual void oofem::Dof::setEquationNumber ( int equationNumber)
inlinevirtual

Sets a specific equation number to receiver.

Parameters
equationNumberNew equation number.

Reimplemented in oofem::MasterDof.

Definition at line 390 of file dof.h.

◆ setIcId()

virtual void oofem::Dof::setIcId ( int icId)
inlinevirtual

Overwrites the initial condition id (0-inactive IC).

Reimplemented in oofem::MasterDof.

Definition at line 384 of file dof.h.

◆ setUnknowns()

virtual void oofem::Dof::setUnknowns ( Dictionary * unknowns)
inlinevirtual

Sets the dictionary of unknowns for receiver.

Parameters
unknownsNew dictionary of unknowns.

Definition at line 396 of file dof.h.

◆ unpackAndUpdateUnknown()

virtual int oofem::Dof::unpackAndUpdateUnknown ( DataStream & buff,
ValueModeType mode,
TimeStep * tStep )
inlinevirtual

Unpacks DOF unknown from communication buffer and updates unknown if necessary. Unknown is always updated using EngngModel::updateUnknownComponent, if DOFManager to which receiver belongs has DofManager_shared dofManagerParallelMode type. Unknown is unpacked and stored in unknowns dictionary, if DOFManager to which receiver belongs has DofManager_remote dofManagerParallelMode type. There is no reason for invoking this service if DOFManager has DofManager_local mode. If do is slave, then no unpacking and updating is done. This is left on master, which must be available on same partition.

Parameters
buffBuffer containing packed message.
modeMode of unknown (e.g, total value, velocity or acceleration of unknown).
tStepTime step when unknown requested. See documentation of particular EngngModel class for valid tStep values (most implementations can return only values for current and possibly for previous time step).
Returns
Nonzero if successful.
Todo
Remove this? It is not inherited by MasterDof. Is this leftovers? / Mikael

Definition at line 440 of file dof.h.

◆ updateLocalNumbering()

virtual void oofem::Dof::updateLocalNumbering ( EntityRenumberingFunctor & f)
inlinevirtual

Local renumbering support. For some tasks (parallel load balancing, for example) it is necessary to renumber the entities. The various FEM components (such as nodes or elements) typically contain links to other entities in terms of their local numbers, etc. This service allows to update these relations to reflect updated numbering. The renumbering function is passed, which is supposed to return an updated number of specified entity type based on old number.

Parameters
fFunction that converts old to new equation number.

Reimplemented in oofem::ActiveDof, oofem::SimpleSlaveDof, and oofem::SlaveDof.

Definition at line 315 of file dof.h.

Referenced by oofem::DofManager::updateLocalNumbering().

◆ updateUnknownsDictionary()

virtual void oofem::Dof::updateUnknownsDictionary ( TimeStep * tStep,
ValueModeType mode,
double dofValue )
inlinevirtual

Abstract function, allowing Dof to store its unknowns in its own private dictionary. Dof then uses this dictionary instead of forwarding the requests to EngngModel (with equationNUmber as parameter). If EngngModel does not support changes of static system (see EngngModel::requiresUnknownsDictionaryUpdate method), the dof forwards the requests for its unknowns to EngngModel, where unknowns are naturally kept. This is possible, because dof equation number is same during whole solution. But when changes of static system are allowed, several problem arise. For example by solving simple incremental static with allowed static changes, the incremental displacement vector of structure can not be added to total displacement vector of structure, because equation numbers may have changed, and one can not simply add these vector to obtain new total displacement vector, because incompatible displacement will be added. To solve this problem, unknown dictionary at dof level has been assumed. Dof then keeps its unknowns in its own private dictionary. After computing increment of solution, engngModel updates for each dof its unknowns in its dictionary (using updateUnknownsDictionary function). For aforementioned example engngModel updates incremental values but also total value by asking dof for previous total value (dof will use its dictionary, does not asks back EngngModel) adds corresponding increment and updates total value in dictionary. In fact on EngngModel level only incremental solution is stored, but total values are always stored in dofs dictionaries. Implementation is not provided, only interface declared. Children must implement this method.

Parameters
tStepTime step when unknowns are updated. In current version it is unused parameter. It is EngngModel responsibility to update values, and values stored in dictionary are always related to timeStep when they were lastly updated.
modeMode of stored unknown.
dofValueValue of unknown. Old value will generally be lost.
See also
EngngModel::requiresUnknownsDictionaryUpdate

Reimplemented in oofem::MasterDof.

Definition at line 366 of file dof.h.

Referenced by oofem::PFEM::updateDofUnknownsDictionaryPressure().

◆ updateYourself()

virtual void oofem::Dof::updateYourself ( TimeStep * tStep)
inlinevirtual

Updates receiver after finishing time step.

Parameters
tStepFinished time step.

Reimplemented in oofem::MasterDof.

Definition at line 336 of file dof.h.

Referenced by oofem::DofManager::updateYourself().

◆ SimpleSlaveDof

friend class SimpleSlaveDof
friend

Definition at line 455 of file dof.h.

References SimpleSlaveDof.

Referenced by SimpleSlaveDof.

Member Data Documentation

◆ dofID

◆ dofManager


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