OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::Dof Class Referenceabstract

Abstract class Dof represents Degree Of Freedom in finite element mesh. More...

#include <dof.h>

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

Public Member Functions

 Dof (DofManager *aNode, DofIDItem id=Undef)
 Constructor. More...
 
virtual ~Dof ()
 Destructor. More...
 
virtual dofType giveDofType ()=0
 Returns the type of the receiver. More...
 
virtual const char * giveClassName () const
 Returns class name of the receiver. More...
 
int giveDofManNumber () const
 
DofManagergiveDofManager () const
 
int giveDofManGlobalNumber () const
 
virtual double giveBcValue (ValueModeType mode, TimeStep *tStep)
 Returns value of boundary condition of dof if it is prescribed. More...
 
int giveEquationNumber (const UnknownNumberingScheme &s)
 Returns equation number of receiver for given equation numbering scheme. More...
 
virtual int __giveEquationNumber () const =0
 Returns equation number of receiver, usually assigned by emodel. More...
 
virtual void giveEquationNumbers (IntArray &masterEqNumbers, const UnknownNumberingScheme &s)
 Returns equation number of receiver. More...
 
virtual void giveDofIDs (IntArray &masterDofIDs)
 As giveEquationNumbers but for dof IDs. More...
 
virtual int __givePrescribedEquationNumber ()=0
 Returns prescribed equation number of receiver. More...
 
virtual int askNewEquationNumber (TimeStep *tStep)=0
 Asks EngngModel for new equation number. More...
 
virtual double giveUnknown (ValueModeType mode, TimeStep *tStep)=0
 The key method of class Dof. More...
 
virtual double giveUnknown (PrimaryField &field, ValueModeType mode, TimeStep *tStep)=0
 The key method of class Dof. More...
 
virtual void giveUnknowns (FloatArray &masterUnknowns, ValueModeType mode, TimeStep *tStep)
 The key method of class Dof. More...
 
virtual void giveUnknowns (FloatArray &masterUnknowns, PrimaryField &field, ValueModeType mode, TimeStep *tStep)
 The key method of class Dof. More...
 
virtual void computeDofTransformation (FloatArray &masterContribs)
 Computes dof transformation array, which describes the dependence of receiver value on values of master dofs. More...
 
virtual int giveNumberOfPrimaryMasterDofs ()
 
virtual bool hasBc (TimeStep *tStep)=0
 Test if Dof has active boundary condition. More...
 
virtual bool hasIc ()=0
 Test if Dof has initial condition. More...
 
virtual bool hasIcOn (ValueModeType u)=0
 Test if Dof has initial condition of required ValueModeType. More...
 
DofIDItem giveDofID () const
 Returns DofID value of receiver, which determines type of of unknown connected to receiver (e.g., u-displacement, v-displacement, ...). More...
 
void setDofID (DofIDItem id)
 Sets the ID of receiver. More...
 
virtual bool isPrimaryDof ()
 Tests if receiver is primary DOF. More...
 
virtual int giveBcId ()=0
 Returns the id of associated boundary condition, if there is any. More...
 
virtual int giveIcId ()=0
 Returns the id of associated initial condition, if there is any. More...
 
virtual void giveMasterDofManArray (IntArray &answer)
 
virtual void updateLocalNumbering (EntityRenumberingFunctor &f)
 Local renumbering support. More...
 
virtual void printSingleOutputAt (FILE *file, TimeStep *tStep, char ch, ValueModeType mode, double scale=1.0)
 Prints Dof output (it prints value of unknown related to dof at given timeStep). More...
 
virtual void printMultipleOutputAt (FILE *File, TimeStep *tStep, char *ch, ValueModeType *mode, int nite)
 Prints Dof output (it prints value of unknown related to dof at given timeStep). More...
 
void printSingleOutputWithAdditionAt (FILE *File, TimeStep *tStep, char ch, ValueModeType mode, double addend)
 
virtual void printYourself ()
 Prints the receiver state on stdout. More...
 
virtual void updateYourself (TimeStep *tStep)
 Updates receiver after finishing time step. More...
 
virtual void updateUnknownsDictionary (TimeStep *tStep, ValueModeType mode, double dofValue)
 Abstract function, allowing Dof to store its unknowns in its own private dictionary. More...
 
virtual double giveUnknownsDictionaryValue (TimeStep *tStep, ValueModeType mode)
 Access dictionary value, if not present zero is returned. More...
 
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros). More...
 
virtual contextIOResultType saveContext (DataStream &stream, ContextMode mode, void *obj=NULL)
 Stores receiver state to output stream. More...
 
virtual contextIOResultType restoreContext (DataStream &stream, ContextMode mode, void *obj=NULL)
 Restores the receiver state previously written in stream. More...
 
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. More...
 
virtual void setIcId (int icId)
 Overwrites the initial condition id (0-inactive IC) More...
 
virtual void setEquationNumber (int equationNumber)
 Sets a specific equation number to receiver. More...
 
virtual void setUnknowns (Dictionary *unknowns)
 Sets the dictionary of unknowns for receiver. More...
 
virtual DictionarygiveUnknowns ()
 Receives the dictionary of unknowns in receiver. More...
 
virtual int giveEqn ()
 Gives number for equation, negative for prescribed equations. More...
 
virtual int packUnknowns (DataStream &buff, ValueModeType mode, TimeStep *tStep)
 Packs specific DOF Manager's dofs unknowns into communication buffer. More...
 
virtual int unpackAndUpdateUnknown (DataStream &buff, ValueModeType mode, TimeStep *tStep)
 Unpacks DOF unknown from communication buffer and updates unknown if necessary. More...
 

Protected Member Functions

virtual BoundaryConditiongiveBc ()
 Returns boundary condition of dof if it is prescribed. More...
 
virtual InitialConditiongiveIc ()
 Returns initial condition of dof if it is prescribed. More...
 

Protected Attributes

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

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

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.

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

Destructor.

Definition at line 112 of file dof.h.

Member Function Documentation

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::MasterDof, oofem::SlaveDof, oofem::SimpleSlaveDof, and oofem::ActiveDof.

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

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::MasterDof, oofem::SlaveDof, oofem::SimpleSlaveDof, and oofem::ActiveDof.

Referenced by oofem::SimpleSlaveDof::__givePrescribedEquationNumber(), oofem::TransportGradientDirichlet::computeCoefficientMatrix(), oofem::PrescribedGenStrainShell7::evaluateHigherOrderContribution(), oofem::EModelDefaultPrescribedEquationNumbering::giveDofEquationNumber(), oofem::VelocityNumberingScheme::giveDofEquationNumber(), oofem::DofIDEquationNumbering::giveDofEquationNumber(), oofem::VelocityEquationNumbering::giveDofEquationNumber(), oofem::PressureEquationNumbering::giveDofEquationNumber(), oofem::CBS::giveTractionPressure(), oofem::PrescribedGradient::updateCoefficientMatrix(), and oofem::PrescribedGenStrainShell7::updateCoefficientMatrix().

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::MasterDof, oofem::SlaveDof, oofem::SimpleSlaveDof, and oofem::ActiveDof.

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

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::SlaveDof, and oofem::ActiveDof.

Definition at line 176 of file dof.C.

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

Referenced by oofem::ActiveDof::computeDofTransformation(), oofem::SlaveDof::computeDofTransformation(), and oofem::DofManager::computeM2LTransformation().

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, giveClassName(), and oofem::FEMComponent::giveNumber().

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::SimpleSlaveDof::giveBc(), and giveBcValue().

virtual int oofem::Dof::giveBcId ( )
pure virtual
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::SimpleSlaveDof, and oofem::ActiveDof.

Definition at line 120 of file dof.C.

References oofem::InitialCondition::give(), oofem::BoundaryCondition::give(), giveBc(), giveIc(), hasBc(), hasIcOn(), and oofem::TimeStep::isTheFirstStep().

Referenced by oofem::SimpleSlaveDof::giveBcValue(), oofem::RefinedElement::giveCompatibleBcDofArray(), oofem::InteractionPFEMParticle::givePrescribedUnknownVector(), oofem::DofManager::givePrescribedUnknownVector(), oofem::MasterDof::giveUnknown(), and oofem::PFEM::updateDofUnknownsDictionaryPressure().

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

Returns class name of the receiver.

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

Definition at line 117 of file dof.h.

Referenced by errorInfo().

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.

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

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::SlaveDof, and oofem::ActiveDof.

Definition at line 67 of file dof.C.

References giveDofID().

Referenced by oofem::DofManager::giveCompleteMasterDofIDArray(), oofem::ActiveDof::giveDofIDs(), and oofem::SlaveDof::giveDofIDs().

int oofem::Dof::giveDofManGlobalNumber ( ) const

Definition at line 74 of file dof.C.

References dofManager, and oofem::DofManager::giveGlobalNumber().

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

Returns the type of the receiver.

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

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(), oofem::MixedGradientPressureDirichlet::computeTangents(), and oofem::PrimaryField::giveUnknownValue().

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::SparseNonLinearSystemNM::convertPertMap(), oofem::VTKXMLExportModule::exportExternalForces(), oofem::ActiveDof::giveEquationNumbers(), oofem::NRSolver::initPrescribedEqs(), and oofem::EIPrimaryUnknownMapper::mapAndUpdate().

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::SlaveDof, and oofem::ActiveDof.

Definition at line 61 of file dof.C.

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

Referenced by oofem::DofManager::giveCompleteLocationArray(), oofem::ActiveDof::giveEquationNumbers(), and oofem::SlaveDof::giveEquationNumbers().

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::MasterDof, oofem::SimpleSlaveDof, and oofem::ActiveDof.

Definition at line 453 of file dof.h.

Referenced by giveBcValue(), and oofem::SimpleSlaveDof::giveIc().

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::MasterDof, oofem::SlaveDof, oofem::SimpleSlaveDof, and oofem::ActiveDof.

Referenced by oofem::SimpleSlaveDof::giveIcId().

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

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

Definition at line 183 of file dof.C.

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

Referenced by oofem::ActiveDof::giveMasterDofManArray(), oofem::SlaveDof::giveMasterDofManArray(), and oofem::DofManager::giveMasterDofMans().

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

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

Definition at line 252 of file dof.h.

Referenced by oofem::DofManager::computeM2LTransformation(), oofem::ActiveDof::giveNumberOfPrimaryMasterDofs(), and oofem::SlaveDof::giveNumberOfPrimaryMasterDofs().

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::MasterDof, oofem::SimpleSlaveDof, oofem::SlaveDof, and oofem::ActiveDof.

Referenced by oofem::LinearConstraintBC::assembleVector(), oofem::MacroLSpace::changeMicroBoundaryConditions(), oofem::NodeErrorCheckingRule::check(), oofem::Node2NodeContactL::computeContactTractionAt(), oofem::Tr_Warp::computeEdgeLoadVectorAt(), oofem::MixedGradientPressureDirichlet::computeFields(), oofem::CoupledFieldsElement::computeVectorOfDofIDs(), oofem::ContactElement::ContactElement(), oofem::CohesiveSurface3d::drawDeformedGeometry(), oofem::CohesiveSurface3d::drawScalar(), oofem::Node::drawYourself(), oofem::tet21ghostsolid::EIPrimaryUnknownMI_computePrimaryUnknownVectorAtLocal(), oofem::Tet21Stokes::EIPrimaryUnknownMI_computePrimaryUnknownVectorAtLocal(), oofem::VTKXMLExportModule::getNodalVariableFromPrimaryField(), oofem::DofManager::giveCompleteUnknownVector(), oofem::PrescribedGradientBCPeriodic::giveUnknown(), oofem::SimpleSlaveDof::giveUnknown(), giveUnknowns(), oofem::DofManager::giveUnknownVectorOfType(), oofem::Node::giveUpdatedCoordinate(), oofem::Hexa21Stokes::NodalAveragingRecoveryMI_computeNodalValue(), oofem::tet21ghostsolid::NodalAveragingRecoveryMI_computeNodalValue(), oofem::Tet21Stokes::NodalAveragingRecoveryMI_computeNodalValue(), oofem::Tr21Stokes::NodalAveragingRecoveryMI_computeNodalValue(), oofem::Shell7Base::NodalAveragingRecoveryMI_computeNodalValue(), oofem::GnuplotExportModule::outputBoundaryCondition(), printMultipleOutputAt(), printSingleOutputAt(), printSingleOutputWithAdditionAt(), and oofem::Node::updateYourself().

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::MasterDof, oofem::SimpleSlaveDof, oofem::SlaveDof, and oofem::ActiveDof.

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::SlaveDof, and oofem::ActiveDof.

Definition at line 162 of file dof.C.

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

Referenced by oofem::NLTransientTransportProblem::giveUnknownComponent(), oofem::IncrementalLinearStatic::giveUnknownComponent(), oofem::NonStationaryTransportProblem::giveUnknownComponent(), oofem::SUPG::giveUnknownComponent(), oofem::PFEM::giveUnknownComponent(), oofem::ActiveDof::giveUnknowns(), and oofem::SlaveDof::giveUnknowns().

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::SlaveDof, and oofem::ActiveDof.

Definition at line 169 of file dof.C.

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

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.

Referenced by oofem::SlaveDof::giveUnknown().

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.

References oofem::errorInfo().

Referenced by oofem::StaticStructural::giveUnknownComponent(), and oofem::DofDistributedPrimaryField::giveUnknownValue().

virtual bool oofem::Dof::hasBc ( TimeStep tStep)
pure virtual
virtual bool oofem::Dof::hasIc ( )
pure virtual

Test if Dof has initial condition.

Returns
True if IC exists, false otherwise.

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

Referenced by oofem::SimpleSlaveDof::hasIc().

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::SlaveDof, oofem::MasterDof, oofem::SimpleSlaveDof, and oofem::ActiveDof.

Referenced by giveBcValue(), and oofem::SimpleSlaveDof::hasIcOn().

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::MasterDof, and oofem::ActiveDof.

Definition at line 287 of file dof.h.

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

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.

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::NonLinearDynamic::printDofOutputAt(), and oofem::NlDEIDynamic::printDofOutputAt().

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::SUPG::printDofOutputAt(), oofem::CBS::printDofOutputAt(), oofem::PFEM::printDofOutputAt(), and oofem::EngngModel::printDofOutputAt().

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().

void oofem::Dof::printYourself ( )
virtual
contextIOResultType oofem::Dof::restoreContext ( DataStream stream,
ContextMode  mode,
void *  obj = NULL 
)
virtual
contextIOResultType oofem::Dof::saveContext ( DataStream stream,
ContextMode  mode,
void *  obj = NULL 
)
virtual
virtual void oofem::Dof::setBcId ( int  bcId)
inlinevirtual

Overwrites the boundary condition id (0-inactive BC), intended for specific purposes such as coupling of bc's in multiscale simulations.

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

Definition at line 382 of file dof.h.

Referenced by oofem::Domain::createDofs(), oofem::SolutionbasedShapeFunction::setBoundaryConditionOnDof(), oofem::IncrementalLinearStatic::solveYourselfAt(), and oofem::DelaunayTriangulator::writeMesh().

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

Sets the ID of receiver.

Definition at line 280 of file dof.h.

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.

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.

Referenced by oofem::Domain::createDofs().

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.

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.

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::SlaveDof, oofem::SimpleSlaveDof, and oofem::ActiveDof.

Definition at line 315 of file dof.h.

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

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::DofDistributedPrimaryField::applyBoundaryCondition(), oofem::DofDistributedPrimaryField::applyInitialCondition(), and oofem::PFEM::updateDofUnknownsDictionaryPressure().

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::MasterDof::updateYourself(), and oofem::DofManager::updateYourself().

Friends And Related Function Documentation

friend class SimpleSlaveDof
friend

Definition at line 455 of file dof.h.

Member Data Documentation


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

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:34 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011