|
OOFEM 3.0
|
#include <simpleslavedof.h>
Public Member Functions | |
| SimpleSlaveDof (DofManager *aNode, int master, DofIDItem id) | |
| SimpleSlaveDof (DofManager *aNode, DofIDItem id=Undef) | |
| virtual | ~SimpleSlaveDof () |
| Destructor. | |
| dofType | giveDofType () override |
| Returns the type of the receiver. | |
| const char * | giveClassName () const override |
| Returns class name of the receiver. | |
| int | __giveEquationNumber () const override |
| int | __givePrescribedEquationNumber () override |
| int | askNewEquationNumber (TimeStep *tStep) override |
| double | giveUnknown (ValueModeType, TimeStep *) override |
| double | giveUnknown (PrimaryField &field, ValueModeType, TimeStep *tStep) override |
| bool | hasBc (TimeStep *tStep) override |
| bool | hasIc () override |
| bool | hasIcOn (ValueModeType) override |
| int | giveBcId () override |
| int | giveIcId () override |
| double | giveBcValue (ValueModeType mode, TimeStep *tStep) override |
| void | saveContext (DataStream &stream, ContextMode mode) override |
| Stores receiver state to output stream. | |
| void | restoreContext (DataStream &stream, ContextMode mode) override |
| Restores the receiver state previously written in stream. | |
| int | giveMasterDofManagerNum () const |
| Returns Master Dof Manager Number. | |
| void | giveMasterDofManArray (IntArray &answer) override |
| void | setMasterDofManagerNum (int i) |
| Sets master dof manager. | |
| int | giveMasterDofIndx () const |
| Returns number of master dof in master dofManager. | |
| void | updateLocalNumbering (EntityRenumberingFunctor &f) override |
| Public Member Functions inherited from oofem::Dof | |
| Dof (DofManager *aNode, DofIDItem id=Undef) | |
| virtual | ~Dof () |
| Destructor. | |
| int | giveDofManNumber () const |
| DofManager * | giveDofManager () const |
| int | giveDofManGlobalNumber () const |
| int | giveEquationNumber (const UnknownNumberingScheme &s) |
| virtual void | giveEquationNumbers (IntArray &masterEqNumbers, const UnknownNumberingScheme &s) |
| virtual void | giveDofIDs (IntArray &masterDofIDs) |
| 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 () |
| DofIDItem | giveDofID () const |
| void | setDofID (DofIDItem id) |
| virtual bool | isPrimaryDof () |
| 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 | 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 Dictionary * | giveUnknowns () |
| virtual int | giveEqn () |
| virtual int | packUnknowns (DataStream &buff, ValueModeType mode, TimeStep *tStep) |
| virtual int | unpackAndUpdateUnknown (DataStream &buff, ValueModeType mode, TimeStep *tStep) |
Protected Member Functions | |
| BoundaryCondition * | giveBc () override |
| InitialCondition * | giveIc () override |
Private Member Functions | |
| Dof * | giveMasterDof () const |
| Returns reference to master dof. | |
Private Attributes | |
| int | masterDofMngr |
| Number of DofManager containing master dof (Master DofManager). | |
| int | masterDofIndx |
| Number of master dof in master dofManager. | |
Additional Inherited Members | |
| Protected Attributes inherited from oofem::Dof | |
| DofManager * | dofManager |
| Link to related DofManager. | |
| DofIDItem | dofID |
| Physical meaning of DOF. | |
Class representing "slave" degree of freedom. Slave dof is linked to some master dof (link slave-slave is not allowed). Slaves can be used to implement duplicated joints (by specifying some dof in node as masters and some as slaves linked to dofs in other node (with same or possibly different coordinates). Slave dof share the same equation number with master. Almost all operation as request for BC or IC or equation number are simply forwarded to master. Other functions (which change internal state) like updateYourself, updateUnknownsDictionary, askNewEquationNumber or context storing/restoring functions are empty functions, relying on fact that same function will be called also for master. From this point of view, one can see slave dof as link to other dof.
It is important to ensure (on input) that both slave dofManager and master dofManager are using the same local coordinate system. In future releases, this can be checked using checkConsistency function, where this check could be performed.
Slave dof is special dof - connected to some master dof on other node (side), with same equation number and same boundary and initial conditions. Typically, slave dof's node and master node are sharing the same space position. This will allow to have multiple dof's (i.e. displacement in x-dir, or rotations) in such node.
Definition at line 70 of file simpleslavedof.h.
| oofem::SimpleSlaveDof::SimpleSlaveDof | ( | DofManager * | aNode, |
| int | master, | ||
| DofIDItem | id ) |
Constructor. Creates slave dof vith number i, belonging to aNode dof manager. Slave will be linked to master dof with id type belonging to dofManager with number given in master variable.
| aNode | receiver will belong to aNode dof manager |
| master | number of dofManager which contain master dof |
| id | DofID of master dof (and slave too). |
Definition at line 43 of file simpleslavedof.C.
References oofem::Dof::Dof(), masterDofIndx, and masterDofMngr.
| oofem::SimpleSlaveDof::SimpleSlaveDof | ( | DofManager * | aNode, |
| DofIDItem | id = Undef ) |
Definition at line 50 of file simpleslavedof.C.
References oofem::Dof::Dof(), masterDofIndx, and masterDofMngr.
|
inlinevirtual |
Destructor.
Definition at line 90 of file simpleslavedof.h.
|
overridevirtual |
Returns equation number corresponding to receiver. Slave simply forwards this message to master.
Implements oofem::Dof.
Definition at line 72 of file simpleslavedof.C.
References giveMasterDof().
|
overridevirtual |
Returns prescribed equation number corresponding to receiver. Slave simply forwards this message to master.
Implements oofem::Dof.
Definition at line 81 of file simpleslavedof.C.
References giveMasterDof().
|
inlineoverridevirtual |
Asks new equation number. Empty function (master is assumed to receive same message).
Implements oofem::Dof.
Definition at line 109 of file simpleslavedof.h.
|
overrideprotectedvirtual |
Returns boundary condition of dof if it is prescribed.
Reimplemented from oofem::Dof.
Definition at line 65 of file simpleslavedof.C.
References giveMasterDof().
|
overridevirtual |
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.
Implements oofem::Dof.
Definition at line 131 of file simpleslavedof.C.
References giveMasterDof().
|
overridevirtual |
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.
| mode | Unknown char type (if total or incremental value is returned). |
| tStep | Time step. |
Reimplemented from oofem::Dof.
Definition at line 143 of file simpleslavedof.C.
References giveMasterDof().
|
inlineoverridevirtual |
Returns class name of the receiver.
Reimplemented from oofem::Dof.
Definition at line 93 of file simpleslavedof.h.
|
inlineoverridevirtual |
Returns the type of the receiver.
Implements oofem::Dof.
Definition at line 92 of file simpleslavedof.h.
|
overrideprotectedvirtual |
Returns initial condition of dof if it is prescribed.
Reimplemented from oofem::Dof.
Definition at line 90 of file simpleslavedof.C.
References giveMasterDof().
|
overridevirtual |
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.
Implements oofem::Dof.
Definition at line 136 of file simpleslavedof.C.
References giveMasterDof().
|
private |
Returns reference to master dof.
Definition at line 57 of file simpleslavedof.C.
References oofem::Dof::Dof(), oofem::Dof::dofID, oofem::Dof::dofManager, and masterDofMngr.
Referenced by __giveEquationNumber(), __givePrescribedEquationNumber(), giveBc(), giveBcId(), giveBcValue(), giveIc(), giveIcId(), giveUnknown(), giveUnknown(), hasBc(), hasIc(), and hasIcOn().
|
inline |
Returns number of master dof in master dofManager.
Definition at line 131 of file simpleslavedof.h.
References masterDofIndx.
|
inline |
Returns Master Dof Manager Number.
Definition at line 123 of file simpleslavedof.h.
References masterDofMngr.
Referenced by oofem::Node::checkConsistency(), and oofem::Subdivision::createMesh().
|
inlineoverridevirtual |
Reimplemented from oofem::Dof.
Definition at line 124 of file simpleslavedof.h.
References oofem::IntArray::at(), masterDofMngr, and oofem::IntArray::resize().
|
overridevirtual |
The key method of class Dof. Returns the value of the unknown of the receiver at given time step associated to given field.
| field | Field used to provide values. |
| mode | Mode of unknown. |
| tStep | Time 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). |
Implements oofem::Dof.
Definition at line 102 of file simpleslavedof.C.
References giveMasterDof().
|
overridevirtual |
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.
| mode | Mode of unknown (e.g, total value, velocity or acceleration of unknown). |
| tStep | Time 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). |
Implements oofem::Dof.
Definition at line 97 of file simpleslavedof.C.
References giveMasterDof().
|
overridevirtual |
Test if Dof has active boundary condition.
| tStep | Time when test is evaluated. |
Implements oofem::Dof.
Definition at line 108 of file simpleslavedof.C.
References giveMasterDof().
|
overridevirtual |
Test if Dof has initial condition.
Implements oofem::Dof.
Definition at line 116 of file simpleslavedof.C.
References giveMasterDof().
|
overridevirtual |
Test if Dof has initial condition of required ValueModeType.
| u | Type of required IC. |
Implements oofem::Dof.
Definition at line 124 of file simpleslavedof.C.
References giveMasterDof().
|
overridevirtual |
Restores the receiver state previously written in stream.
Reimplemented from oofem::Dof.
Definition at line 169 of file simpleslavedof.C.
References oofem::CIO_IOERR, CM_Definition, masterDofIndx, masterDofMngr, oofem::DataStream::read(), and THROW_CIOERR.
|
overridevirtual |
Stores receiver state to output stream.
Reimplemented from oofem::Dof.
Definition at line 149 of file simpleslavedof.C.
References oofem::CIO_IOERR, CM_Definition, CM_DefinitionGlobal, oofem::Dof::dofManager, masterDofMngr, THROW_CIOERR, and oofem::DataStream::write().
|
inline |
|
overridevirtual |
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.
| f | Function that converts old to new equation number. |
Reimplemented from oofem::Dof.
Definition at line 183 of file simpleslavedof.C.
References oofem::ERS_DofManager, and masterDofMngr.
|
mutableprivate |
Number of master dof in master dofManager.
Definition at line 76 of file simpleslavedof.h.
Referenced by giveMasterDofIndx(), restoreContext(), SimpleSlaveDof(), and SimpleSlaveDof().
|
private |
Number of DofManager containing master dof (Master DofManager).
Definition at line 74 of file simpleslavedof.h.
Referenced by giveMasterDof(), giveMasterDofManagerNum(), giveMasterDofManArray(), restoreContext(), saveContext(), setMasterDofManagerNum(), SimpleSlaveDof(), SimpleSlaveDof(), and updateLocalNumbering().