DofManager Class Reference

Base class for dof managers. More...

#include <dofmanager.h>

Inheritance diagram for DofManager:

Inheritance graph
[legend]
Collaboration diagram for DofManager:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DofManager (int n, Domain *aDomain)
 Constructor.
 ~DofManager ()
 Destructor.
void printOutputAt (FILE *, TimeStep *)
 Prints output of receiver to stream, for given time step.
void updateYourself (TimeStep *)
 updates receiver after equlibrium in time step has been reached.
bool isBoundary ()
void setBoundaryFlag (bool _b)
virtual int hasAnySlaveDofs ()
 Returns true if receiver contains slave dofs.
virtual bool giveMasterDofMans (IntArray &masters)
 Returns true if the receiver is linked (its slave DOFs depend on master values) to some other dof managers.
DofManagerofType (char *)
 Returns a newly allocated DofManager, with type depending on parameter.
const char * giveClassName () const
 Returns class name of the receiver.
classType giveClassID () const
 Returns classType id of receiver.
IRResultType initializeFrom (InputRecord *ir)
 Initializes receiver acording to object description stored in input record.
void printYourself ()
 prints receiver state on stdout. Usefull for debuging.
virtual contextIOResultType saveContext (DataStream *stream, ContextMode mode, void *obj=NULL)
 Stores receiver state to output stream.
virtual contextIOResultType restoreContext (DataStream *stream, ContextMode mode, void *obj=NULL)
 Restores the receiver state previously written in stream.
virtual bool isDofTypeCompatible (dofType type) const
 Returns true if dof of given type is allowed to be associated to receiver.
virtual int checkConsistency ()
 Checks internal data consistency in node.
virtual void updateLocalNumbering (EntityRenumberingFunctor &f)
 Local renumbering support.
void addDof (int i, Dof *dof)
 Adds a Dof to i-th position in dofArray.
bool hasDofID (int id)
int giveGlobalNumber () const
 Returns receiver globally unique number.
int giveLabel () const
void setGlobalNumber (int _number)
 sets receiver global number
dofManagerParallelMode giveParallelMode () const
 Return dofManagerParallelMode of receiver.
void setParallelMode (dofManagerParallelMode _mode)
 Sets parallel mode of receiver.
int packDOFsUnknowns (CommunicationBuffer &buff, EquationID type, ValueModeType mode, TimeStep *stepN)
 Packs specific DOF Manager's dofs unknowns into communication buffer.
const IntArraygivePartitionList ()
 Returns partition list of receiver.
void setPartitionList (const IntArray *_p)
 Sets receiver's partition list.
void removePartitionFromList (int _part)
 Removes given partition from receiver list.
void mergePartitionList (IntArray &_p)
 Merges receiver partition list with given lists.
const int givePartitionsConnectivitySize ()
 Returns number of partitions sharing given receiver (=number of shared partitions + local one).
bool isLocal ()
 Returns true if receiver is locally maintained.
bool isShared ()
 Returns true if receiver is shared.
Dof management methods
DofgiveDof (int i) const
 Returns reference (pointer) to i-th dof of receiver.
DofgiveDofWithID (int dofID) const
 Returns DOF with given dofID; issues error if not present.
int giveNumberOfDofs () const
 Returns total number of dofs managed by receiver.
int giveNumberOfPrimaryMasterDofs (IntArray &dofArray) const
 Returns the number of primary dofs on which receiver dofs (given in dofArray) depend on.
virtual void giveLocationArray (const IntArray &dofIDArry, IntArray &locationArray, const UnknownNumberingScheme &s) const
 Returns location array (array containing for each requested dof related equation number) for given numbering scheme.
virtual void giveCompleteLocationArray (IntArray &locationArray, const UnknownNumberingScheme &s) const
 Returns full location array of receiver containing equation numbers of all dofs of receiver.
void giveDofArray (const IntArray &dofIDArry, IntArray &answer) const
 Returns DOFs numbers of receiver with required physical meaning.
int findDofWithDofId (DofID dofID) const
 Finds index of DOF with required physical meaning of receiver.
virtual void giveUnknownVector (FloatArray &answer, const IntArray &dofMask, EquationID type, ValueModeType mode, TimeStep *stepN)
 Assembles the vector of unknowns in nodal c.s for given dofs of receiver.
virtual void giveUnknownVector (FloatArray &answer, const IntArray &dofMask, PrimaryField &field, ValueModeType mode, TimeStep *stepN)
 Assembles the vector of unknowns of given filed in nodal c.s for given dofs of receiver.
virtual void givePrescribedUnknownVector (FloatArray &answer, const IntArray &dofMask, ValueModeType mode, TimeStep *stepN)
 Assembles the vector of prescribed unknowns in nodal c.s for given dofs of receiver.
Transformation functions
The governing equations can be assembled not only in global coordinate system, but also in user-defined local coordinate system of each dof manager.

Methods in this section introduce necessary transformation methods, allowing receiver dofs to be expressed in their own local c.s. or to be dependent on other dofs on other dofManager (to implement slave or rigid arm nodes etc.). The method for computing global c.s to receiver c.s transformation matrix is provided.

virtual void computeDofTransformation (FloatMatrix &answer, const IntArray *dofIDArry, DofManTransfType mode)
 Computes receiver transformation matrix from global cs.
virtual void computeLoadTransformation (FloatMatrix &answer, const IntArray *dofIDArry, DofManTransfType mode)
virtual int requiresTransformation ()
 Indicates, whether dofManager requires the transformation from global c.s.
Load related functions
virtual void computeLoadVectorAt (FloatArray &answer, TimeStep *stepN, ValueModeType mode)
 Computes the load vector of receiver in given time.
IntArraygiveLoadArray ()
 Returns the array containing applied loadings of the receiver.
void setLoadArray (IntArray &)
 Sets the array of applied loadings of the receiver.
Position querry functions
virtual bool hasCoordinates ()
virtual double giveCoordinate (int i)
 Returns i-th coordinate of node.
virtual FloatArraygiveCoordinates ()
 Returns pointer to node coordinate array.
Advanced functions
void setNumberOfDofs (int _ndofs)
 Sets number of dofs of the receiver; Dealocates existing DOFs; Resizes the dofArray accordingly.
void setDof (int i, Dof *dof)
 Sets i-th DOF of receiver to given DOF.

Protected Member Functions

virtual IRResultType resolveDofIDArray (InputRecord *ir, IntArray &dofIDArry)
void computeSlaveLoadTransformation (FloatMatrix &answer, const IntArray *dofMask, DofManTransfType mode)
void computeSlaveDofTransformation (FloatMatrix &answer, const IntArray *dofMask, DofManTransfType mode)
IntArraygiveCompleteGlobalDofIDArray (void) const

Protected Attributes

int numberOfDofs
 total number of DOFs
Dof ** dofArray
 array of DOFs
IntArray loadArray
 list of applied loads.
bool isBoundaryFlag
 Indicates if dofManager is boundary (true boundary or on boundary between regions) or interior.
bool hasSlaveDofs
 flag indicating whether receiver has slave dofs
int globalNumber
 In parallel mode, globalNumber contains globally unique DoFManager number.
dofManagerParallelMode parallel_mode
IntArray partitions
 List of partition sharing the shared dof manager or remote partion containing remote dofmanager counterpart.


Detailed Description

Base class for dof managers.

Dof manager is an abstraction for object possessing degrees of freedom. Dof managers (respectively derived clases like nodes or sides) are usually atributes of elements and are maintained by domain. Degrees of freedom belonging to dof manager are stored in 'dofArray'. Dof manager also maintain a list of applied loads it is subjected to. Number and physical meaning of dofs can be specified by user in input file (see input file description). If it is not specified, default values are obtained from domain, based on domain type of problem.

Definition at line 103 of file dofmanager.h.


Constructor & Destructor Documentation

DofManager::DofManager ( int  n,
Domain aDomain 
)

Constructor.

Creates DofManager with given number belonging to domain aDomain.

Parameters:
n DofManager's number in domain
aDomain reference to DofManager's domain

Definition at line 80 of file dofmanager.C.

References dofArray, hasSlaveDofs, isBoundaryFlag, numberOfDofs, partitions, and IntArray::resize().

DofManager::~DofManager (  ) 

Destructor.

Definition at line 97 of file dofmanager.C.

References dofArray, and numberOfDofs.


Member Function Documentation

Dof * DofManager::giveDof ( int  i  )  const

Returns reference (pointer) to i-th dof of receiver.

Index of Dof with required physical meaning can be obtained by invoking method findDofWithDofId.

See also:
DofManager::findDofWithDofId

Definition at line 159 of file dofmanager.C.

References _error, and dofArray.

Referenced by SUPG::applyIC(), NonStationaryTransportProblem::applyIC(), CBS::applyIC(), StructuralEngngModel::buildReactionTable(), Node::checkConsistency(), checkConsistency(), StructuralElement::computeBcLoadVectorAt(), Node::computeGNDofTransformation(), RigidArmNode::computeMasterContribution(), computeSlaveDofTransformation(), CylindricalALM::convertHPCMap(), Subdivision::createMesh(), PNlDEIDynamic::estimateMaxPackSize(), NonLinearStatic::estimateMaxPackSize(), LinearStatic::estimateMaxPackSize(), VTKXMLExportModule::exportPrimVarAs(), VTKExportModule::exportPrimVarAs(), findDofWithDofId(), SUPG::forceEquationNumbering(), EngngModel::forceEquationNumbering(), RefinedElement::giveBcDofArray1D(), RefinedElement::giveBcDofArray2D(), RefinedElement::giveBcDofArray3D(), RefinedElement::giveCompatibleBcDofArray(), giveCompleteGlobalDofIDArray(), giveCompleteLocationArray(), PlaneStress2dXfem::giveLocationArray(), giveLocationArray(), giveMasterDofMans(), giveNumberOfPrimaryMasterDofs(), givePrescribedUnknownVector(), giveUnknownVector(), Node::giveUpdatedCoordinate(), hasAnySlaveDofs(), PetscNatural2LocalOrdering::init(), PetscNatural2GlobalOrdering::init(), SloanGraph::initialize(), NRSolver::initPrescribedEqs(), EIPrimaryUnknownMapper::mapAndUpdate(), packDOFsUnknowns(), StructuralEngngModel::packInternalForces(), StructuralEngngModel::packLoad(), PNlDEIDynamic::packMasses(), NonLinearStatic::packMigratingData(), StructuralEngngModel::packReactions(), printOutputAt(), restoreContext(), saveContext(), HuertaErrorEstimatorInterface::setupRefinedElementProblem1D(), HuertaErrorEstimatorInterface::setupRefinedElementProblem2D(), HuertaErrorEstimatorInterface::setupRefinedElementProblem3D(), HuertaErrorEstimator::solveRefinedElementProblem(), SUPG::solveYourselfAt(), PNlDEIDynamic::solveYourselfAt(), NlDEIDynamic::solveYourselfAt(), DIIDynamic::solveYourselfAt(), DEIDynamic::solveYourselfAt(), StructuralEngngModel::unpackInternalForces(), StructuralEngngModel::unpackLoad(), PNlDEIDynamic::unpackMasses(), NonLinearStatic::unpackMigratingData(), StructuralEngngModel::unpackReactions(), IncrementalLinearStatic::updateDofUnknownsDictionary(), SUPG::updateDofUnknownsDictionary_corrector(), SUPG::updateDofUnknownsDictionary_predictor(), updateLocalNumbering(), Node::updateYourself(), and updateYourself().

Dof * DofManager::giveDofWithID ( int  dofID  )  const

Returns DOF with given dofID; issues error if not present.

Definition at line 173 of file dofmanager.C.

References _error, dofArray, and findDofWithDofId().

int DofManager::giveNumberOfDofs (  )  const

Returns total number of dofs managed by receiver.

Definition at line 368 of file dofmanager.C.

References numberOfDofs.

Referenced by RigidArmNode::allocAuxArrays(), SUPG::applyIC(), NonStationaryTransportProblem::applyIC(), CBS::applyIC(), EngngModel::balanceLoad(), StructuralEngngModel::buildReactionTable(), RigidArmNode::checkConsistency(), Node::checkConsistency(), PlaneStress2dXfem::computeNumberOfDofs(), Subdivision::createMesh(), PNlDEIDynamic::estimateMaxPackSize(), NonLinearStatic::estimateMaxPackSize(), LinearStatic::estimateMaxPackSize(), VTKXMLExportModule::exportPrimVarAs(), VTKExportModule::exportPrimVarAs(), SUPG::forceEquationNumbering(), EngngModel::forceEquationNumbering(), RefinedElement::giveBcDofArray1D(), RefinedElement::giveBcDofArray2D(), RefinedElement::giveBcDofArray3D(), RefinedElement::giveCompatibleBcDofArray(), PlaneStress2dXfem::giveLocationArray(), hasDofID(), PetscNatural2LocalOrdering::init(), PetscNatural2GlobalOrdering::init(), SloanGraph::initialize(), RigidArmNode::initializeFrom(), initializeFrom(), StructuralEngngModel::packInternalForces(), StructuralEngngModel::packLoad(), PNlDEIDynamic::packMasses(), NonLinearStatic::packMigratingData(), StructuralEngngModel::packReactions(), setNumberOfDofs(), HuertaErrorEstimatorInterface::setupRefinedElementProblem1D(), HuertaErrorEstimatorInterface::setupRefinedElementProblem2D(), HuertaErrorEstimatorInterface::setupRefinedElementProblem3D(), SUPG::solveYourselfAt(), PNlDEIDynamic::solveYourselfAt(), NlDEIDynamic::solveYourselfAt(), DIIDynamic::solveYourselfAt(), DEIDynamic::solveYourselfAt(), StructuralEngngModel::unpackInternalForces(), StructuralEngngModel::unpackLoad(), PNlDEIDynamic::unpackMasses(), NonLinearStatic::unpackMigratingData(), StructuralEngngModel::unpackReactions(), IncrementalLinearStatic::updateDofUnknownsDictionary(), SUPG::updateDofUnknownsDictionary_corrector(), and SUPG::updateDofUnknownsDictionary_predictor().

int DofManager::giveNumberOfPrimaryMasterDofs ( IntArray dofArray  )  const

Returns the number of primary dofs on which receiver dofs (given in dofArray) depend on.

If receiver has only prinary dofs, the answer is the size of dofArray.

Definition at line 399 of file dofmanager.C.

References IntArray::at(), giveDof(), IntArray::giveSize(), and hasSlaveDofs.

Referenced by Element::computeGlobalNumberOfDofs(), computeSlaveDofTransformation(), giveLocationArray(), givePrescribedUnknownVector(), and giveUnknownVector().

void DofManager::giveLocationArray ( const IntArray dofIDArry,
IntArray locationArray,
const UnknownNumberingScheme s 
) const [virtual]

Returns location array (array containing for each requested dof related equation number) for given numbering scheme.

Parameters:
dofIDArry array containing dof mask. This mask containing DofIDItem values (they describe physical meaning of dofs, see cltypes.h) is used to extract only required values. If dof with requested physical meaning dos not exist in receiver, an error is generated and execution exits.
locationArray - return parameter containing required equation numbers.
s determines the equation numbering scheme
See also:
Element::giveDofManDofIDMask function.

Definition at line 263 of file dofmanager.C.

References _error, IntArray::at(), dofArray, findDofWithDofId(), giveDof(), giveDofArray(), Dof::giveEquationNumbers(), giveNumberOfPrimaryMasterDofs(), IntArray::giveSize(), and hasSlaveDofs.

Referenced by giveCompleteLocationArray(), Element::giveLocationArray(), and EIPrimaryUnknownMapper::mapAndUpdate().

void DofManager::giveCompleteLocationArray ( IntArray locationArray,
const UnknownNumberingScheme s 
) const [virtual]

Returns full location array of receiver containing equation numbers of all dofs of receiver.

Their order is specific to every DofManager. Mainly used at EngngModel level to assemble DofManager contribution (typically load vector).

Parameters:
locationArray complete location array of receiver.
s determines the equation numbering scheme

Definition at line 307 of file dofmanager.C.

References giveCompleteGlobalDofIDArray(), giveDof(), giveLocationArray(), hasSlaveDofs, and numberOfDofs.

Referenced by PLinearStatic::assembleVectorFromDofManagers(), EngngModel::assembleVectorFromDofManagers(), FETISolver::masterMapDirectionVector(), FETISolver::masterMapPPVector(), FETISolver::masterMapRBM(), FETISolver::masterMapResiduals(), FETISolver::masterMapSolution(), EngngModel::petsc_assemblePrescribedVectorFromDofManagers(), EngngModel::petsc_assembleVectorFromDofManagers(), FETISolver::setUpCommunicationMaps(), FETICommunicator::setUpCommunicationMaps(), and FETISolver::unpackSolution().

void DofManager::giveDofArray ( const IntArray dofIDArry,
IntArray answer 
) const

Returns DOFs numbers of receiver with required physical meaning.

Parameters:
dofIDArry array containing DofIDItem-type values (this is enumeration identifying physical meaning of particular DOF, see cltypes.h).
answer array with DOF numbers. They are ordered according to dofIDArry.
See also:
cltypes.h

Definition at line 327 of file dofmanager.C.

References _error, and findDofWithDofId().

Referenced by StructuralElement::computeBcLoadVectorAt(), Element::computeGlobalNumberOfDofs(), computeSlaveDofTransformation(), giveLocationArray(), givePrescribedUnknownVector(), and giveUnknownVector().

int DofManager::findDofWithDofId ( DofID  dofID  )  const

Finds index of DOF with required physical meaning of receiver.

This index can be different for different DOFManagers (user can alter dof order and type in input file).

Parameters:
dofID physical meaning of DOF.
Returns:
index of requested DOF. If such DOF with dofID does not exists, returns zero.

Definition at line 350 of file dofmanager.C.

References giveDof(), and numberOfDofs.

Referenced by RigidArmNode::computeMasterContribution(), giveDofArray(), giveDofWithID(), giveLocationArray(), and SimpleSlaveDof::giveMasterDof().

void DofManager::giveUnknownVector ( FloatArray answer,
const IntArray dofMask,
EquationID  type,
ValueModeType  mode,
TimeStep stepN 
) [virtual]

Assembles the vector of unknowns in nodal c.s for given dofs of receiver.

This vector may have size different from number of dofs requested, because some dofs may depend on other dofs. Default implementation uses Dof::giveUnknown service.

Parameters:
answer result (in nodal cs.)
dofMask dofIDArry array containing dof mask. This mask containing DofIDItem values (they describe physical meaning of dofs, see cltypes.h) is used to extract only required values. If dof with requested physical meaning dos not exist in receiver, an error is generated and execution exits.
type physical meaning of unknown.
mode mode of unknown (e.g, total value, velocity or acceleration of unknown). time step when unknown requested. See documentation of particular EngngModel class for valid StepN values (most implementaion can return only values for current and possibly for previous time step).
See also:
Dof::giveUnknown service.

Definition at line 933 of file dofmanager.C.

References IntArray::at(), FloatArray::at(), FloatArray::copySubVector(), dofArray, giveDof(), giveDofArray(), giveNumberOfPrimaryMasterDofs(), FloatArray::giveSize(), IntArray::giveSize(), Dof::giveUnknown(), Dof::giveUnknowns(), hasSlaveDofs, and FloatArray::resize().

Referenced by PlaneStress2dXfem::computeVectorOf(), Element::computeVectorOf(), LEPlic::doLagrangianPhase(), HuertaErrorEstimator::solveRefinedElementProblem(), and LevelSetPCS::updatePosition().

void DofManager::giveUnknownVector ( FloatArray answer,
const IntArray dofMask,
PrimaryField field,
ValueModeType  mode,
TimeStep stepN 
) [virtual]

Assembles the vector of unknowns of given filed in nodal c.s for given dofs of receiver.

This vector may have size different from number of dofs requested, because some dofs may depend on other dofs. Default implementation uses Dof::giveUnknown service.

Parameters:
answer result (in nodal cs.)
dofMask dofIDArry array containing dof mask. This mask containing DofIDItem values (they describe physical meaning of dofs, see cltypes.h) is used to extract only required values. If dof with requested physical meaning dos not exist in receiver, an error is generated and execution exits.
field primary filed time step when unknown requested. See documentation of particular EngngModel class for valid StepN values (most implementaion can return only values for current and possibly for previous time step).
See also:
Dof::giveUnknown service.

Definition at line 973 of file dofmanager.C.

References IntArray::at(), FloatArray::at(), FloatArray::copySubVector(), dofArray, giveDof(), giveDofArray(), giveNumberOfPrimaryMasterDofs(), FloatArray::giveSize(), IntArray::giveSize(), Dof::giveUnknown(), Dof::giveUnknowns(), hasSlaveDofs, and FloatArray::resize().

void DofManager::givePrescribedUnknownVector ( FloatArray answer,
const IntArray dofMask,
ValueModeType  mode,
TimeStep stepN 
) [virtual]

Assembles the vector of prescribed unknowns in nodal c.s for given dofs of receiver.

This vector may have size different from number of dofs requested, because some dofs may depend on other dofs. Default implementation uses Dof::giveBcValue and Dof::hasBc service.

Parameters:
answer result (in nodal cs.)
dofMask dofIDArry array containing dof mask. This mask containing DofIDItem values (they describe physical meaning of dofs, see cltypes.h) is used to extract only required values. If dof with requested physical meaning dos not exist in receiver, an error is generated and execution exits.
mode mode of unknown (e.g, total value, velocity or acceleration of unknown). time step when unknown requested. See documentation of particular EngngModel class for valid StepN values (most implementaion can return only values for current and possibly for previous time step).
See also:
Dof::giveBcValue, Dof::hasBc service.

Definition at line 1012 of file dofmanager.C.

References FloatArray::at(), IntArray::at(), FloatArray::copySubVector(), dofArray, Dof::giveBcValue(), Dof::giveBcValues(), giveDof(), giveDofArray(), giveNumberOfPrimaryMasterDofs(), FloatArray::giveSize(), IntArray::giveSize(), Dof::hasBc(), hasSlaveDofs, and FloatArray::resize().

Referenced by Element::computeVectorOfPrescribed().

void DofManager::computeDofTransformation ( FloatMatrix answer,
const IntArray dofIDArry,
DofManTransfType  mode 
) [virtual]

Computes receiver transformation matrix from global cs.

to dofManager specific coordinate system (in which governing equations are assembled, for example the local coordinate system in node).

Parameters:
answer computed transformation matrix. It has generally dofIDArry.size rows and if loc is obtained using giveLocationArray(dofIDArry, loc) call, loc.giveSize() columns. This is because this transformation should generally include not only transformation to dof manager local coordinate system, but receiver dofs can be expressed using dofs of another dofManager (In this case, squre answer is produced anly if all dof transformation is required).
dofIDArry array containing DofIDItem-type values (this is enumeration identifying physical meaning of particular DOF, see cltypes.h) for which transfromation mtrx is assembled. if dofIDArry is NULL, then all receiver dofs are assumed.

Reimplemented in Node.

Definition at line 1116 of file dofmanager.C.

References FloatMatrix::beUnitMatrix(), computeSlaveDofTransformation(), IntArray::giveSize(), hasSlaveDofs, numberOfDofs, and FloatMatrix::resize().

Referenced by StructuralElement::computeGNDofRotationMatrix(), and computeLoadTransformation().

void DofManager::computeLoadTransformation ( FloatMatrix answer,
const IntArray dofIDArry,
DofManTransfType  mode 
) [virtual]

virtual int DofManager::requiresTransformation (  )  [inline, virtual]

Indicates, whether dofManager requires the transformation from global c.s.

to dof manager specific coordinate system.

Returns:
nonzero if transformation is necessary, even for single dof.

Reimplemented in ElementSide, and Node.

Definition at line 307 of file dofmanager.h.

Referenced by StructuralElement::computeGNDofRotationMatrix(), and StructuralElement::computeGNLoadRotationMatrix().

void DofManager::computeLoadVectorAt ( FloatArray answer,
TimeStep stepN,
ValueModeType  mode 
) [virtual]

IntArray * DofManager::giveLoadArray (  ) 

void DofManager::setLoadArray ( IntArray la  ) 

Sets the array of applied loadings of the receiver.

Definition at line 257 of file dofmanager.C.

References loadArray.

Referenced by Subdivision::createMesh().

virtual bool DofManager::hasCoordinates (  )  [inline, virtual]

Reimplemented in Node.

Definition at line 326 of file dofmanager.h.

virtual double DofManager::giveCoordinate ( int  i  )  [inline, virtual]

Returns i-th coordinate of node.

Reimplemented in Node.

Definition at line 328 of file dofmanager.h.

Referenced by Line::computeIntersectionPoints().

virtual FloatArray* DofManager::giveCoordinates (  )  [inline, virtual]

void DofManager::printOutputAt ( FILE *  stream,
TimeStep stepN 
) [virtual]

void DofManager::updateYourself ( TimeStep tStep  ) 

updates receiver after equlibrium in time step has been reached.

Reimplemented in Node.

Definition at line 730 of file dofmanager.C.

References giveDof(), numberOfDofs, and Dof::updateYourself().

Referenced by LinearStability::terminate(), EigenValueDynamic::terminate(), LinearStability::terminateLinStatic(), and EngngModel::updateYourself().

bool DofManager::isBoundary (  )  [inline]

void DofManager::setBoundaryFlag ( bool  _b  )  [inline]

Definition at line 343 of file dofmanager.h.

References isBoundaryFlag.

Referenced by Subdivision::createMesh().

int DofManager::hasAnySlaveDofs (  )  [virtual]

Returns true if receiver contains slave dofs.

Definition at line 1063 of file dofmanager.C.

References giveDof(), and numberOfDofs.

Referenced by SloanGraph::initialize(), and EIPrimaryUnknownMapper::mapAndUpdate().

bool DofManager::giveMasterDofMans ( IntArray masters  )  [virtual]

Returns true if the receiver is linked (its slave DOFs depend on master values) to some other dof managers.

In this case, the masters array should contain the list of masters. In both serial and parallel modes, local numbers are be provided. If the receiver contains only primary DOFs, false is returned.

Definition at line 1077 of file dofmanager.C.

References IntArray::at(), giveDof(), Dof::giveMasterDofManArray(), IntArray::giveSize(), IntArray::insertSortedOnce(), numberOfDofs, and IntArray::resize().

DofManager * DofManager::ofType ( char *  aClass  ) 

Returns a newly allocated DofManager, with type depending on parameter.

Creates new object for following classes Node, ElementSide, RigidArmNode otherwise calls global function CreateUsrDefDofManagerOfType for creating appropriate instance. This function must be implemented by user.

Parameters:
aClass string with DofManager name
Returns:
newly allocated DofManager with required type.

Definition at line 907 of file dofmanager.C.

References _error2, CreateUsrDefDofManagerOfType(), FEMComponent::domain, FEMComponent::number, and strncasecmp().

const char* DofManager::giveClassName (  )  const [inline, virtual]

Returns class name of the receiver.

Implements FEMComponent.

Reimplemented in ElementSide, HangingNode, Node, and RigidArmNode.

Definition at line 364 of file dofmanager.h.

Referenced by initializeFrom(), printOutputAt(), MasterDof::printYourself(), Dof::printYourself(), and resolveDofIDArray().

classType DofManager::giveClassID (  )  const [inline, virtual]

IRResultType DofManager::initializeFrom ( InputRecord ir  )  [virtual]

void DofManager::printYourself (  ) 

prints receiver state on stdout. Usefull for debuging.

Reimplemented in ElementSide, and Node.

Definition at line 710 of file dofmanager.C.

References dofArray, loadArray, FEMComponent::number, numberOfDofs, IntArray::printYourself(), and Dof::printYourself().

contextIOResultType DofManager::saveContext ( DataStream stream,
ContextMode  mode,
void *  obj = NULL 
) [virtual]

contextIOResultType DofManager::restoreContext ( DataStream stream,
ContextMode  mode,
void *  obj = NULL 
) [virtual]

virtual bool DofManager::isDofTypeCompatible ( dofType  type  )  const [inline, virtual]

Returns true if dof of given type is allowed to be associated to receiver.

Reimplemented in ElementSide, HangingNode, Node, and RigidArmNode.

Definition at line 385 of file dofmanager.h.

Referenced by initializeFrom().

int DofManager::checkConsistency (  )  [virtual]

Checks internal data consistency in node.

Current implementation checks (when receiver has slave dofs) if receiver has the same coordinate system as master dofManager of slave dof.

Returns:
nonzero if receiver check is o.k.

Reimplemented from FEMComponent.

Reimplemented in HangingNode, Node, and RigidArmNode.

Definition at line 1096 of file dofmanager.C.

References giveClassID(), giveDof(), hasSlaveDofs, numberOfDofs, and SlaveDofClass.

Referenced by Node::checkConsistency(), and Domain::checkConsistency().

void DofManager::updateLocalNumbering ( EntityRenumberingFunctor f  )  [virtual]

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 reflext updated numbering. The renumbering funciton is passed, which is supposed to return an updated number of specified entyty type based on old number.

Reimplemented from FEMComponent.

Definition at line 1210 of file dofmanager.C.

References giveDof(), numberOfDofs, and Dof::updateLocalNumbering().

Referenced by Domain::instanciateYourself().

void DofManager::setNumberOfDofs ( int  _ndofs  ) 

Sets number of dofs of the receiver; Dealocates existing DOFs; Resizes the dofArray accordingly.

Definition at line 374 of file dofmanager.C.

References dofArray, giveNumberOfDofs(), and numberOfDofs.

Referenced by Subdivision::createMesh().

void DofManager::setDof ( int  i,
Dof dof 
)

Sets i-th DOF of receiver to given DOF.

Definition at line 187 of file dofmanager.C.

References _error, dofArray, and numberOfDofs.

Referenced by Subdivision::createMesh().

void DofManager::addDof ( int  i,
Dof dof 
)

bool DofManager::hasDofID ( int  id  ) 

Definition at line 236 of file dofmanager.C.

References dofArray, and giveNumberOfDofs().

Referenced by PlaneStress2dXfem::giveLocationArray().

int DofManager::giveGlobalNumber (  )  const [inline]

int DofManager::giveLabel (  )  const [inline]

Definition at line 423 of file dofmanager.h.

References globalNumber.

Referenced by CylindricalALM::convertHPCMap(), and printOutputAt().

void DofManager::setGlobalNumber ( int  _number  )  [inline]

sets receiver global number

Definition at line 425 of file dofmanager.h.

References globalNumber.

Referenced by Subdivision::createMesh(), LoadBalancer::unpackMigratingData(), and Subdivision::unpackRemoteElements().

dofManagerParallelMode DofManager::giveParallelMode (  )  const [inline]

Return dofManagerParallelMode of receiver.

Defined for __Parallel_Mode only.

Definition at line 431 of file dofmanager.h.

References parallel_mode.

Referenced by OutputManager::_testDofManOutput(), MasterDof::askNewEquationNumber(), PLinearStatic::assembleVectorFromDofManagers(), EngngModel::assembleVectorFromDofManagers(), Subdivision::createMesh(), OutputManager::doDofManOutput(), DirectErrorIndicatorRC::exchangeDofManDensities(), DirectErrorIndicatorRC::exchangeDofManIndicatorVals(), Subdivision::exchangeRemoteElements(), MasterDof::giveUnknown(), MasterDof::hasBc(), PetscNatural2GlobalOrdering::init(), PetscOrdering_Base::isLocal(), PetscOrdering_Base::isShared(), EIPrimaryUnknownMapper::mapAndUpdate(), LoadBalancer::migrateLoad(), Subdivision::packRemoteElements(), NonlocalMaterialWTP::packRemoteElements(), EngngModel::petsc_assemblePrescribedVectorFromDofManagers(), EngngModel::petsc_assembleVectorFromDofManagers(), LoadBalancer::printStatistics(), SPRNodalRecoveryModel::recoverValues(), FETISolver::setUpCommunicationMaps(), FETICommunicator::setUpCommunicationMaps(), ProblemCommunicator::setUpCommunicationMapsForElementCut(), PNlDEIDynamicComunicator::setUpCommunicationMapsForElementCut(), ProblemCommunicator::setUpCommunicationMapsForNodeCut(), PNlDEIDynamicComunicator::setUpCommunicationMapsForNodeCut(), HuertaErrorEstimatorInterface::setupRefinedElementProblem2D(), HuertaErrorEstimatorInterface::setupRefinedElementProblem3D(), HuertaErrorEstimator::solveRefinedPatchProblem(), PNlDEIDynamic::solveYourselfAt(), MasterDof::unpackAndUpdateUnknown(), StructuralEngngModel::unpackInternalForces(), StructuralEngngModel::unpackLoad(), PNlDEIDynamic::unpackMasses(), NonLinearStatic::unpackMigratingData(), and StructuralEngngModel::unpackReactions().

void DofManager::setParallelMode ( dofManagerParallelMode  _mode  )  [inline]

int DofManager::packDOFsUnknowns ( CommunicationBuffer buff,
EquationID  type,
ValueModeType  mode,
TimeStep stepN 
)

Packs specific DOF Manager's dofs unknowns into communication buffer.

Parameters:
buff communication buffer to pack data.
type physical meaning of unknown.
mode mode of unknown (e.g, total value, velocity or acceleration of unknown). time step when unknown requested. See documentation of particular EngngModel class for valid StepN values (most implementaion can return only values for current and possibly for previous time step).
Returns:
nonzero if succesfull

Definition at line 1233 of file dofmanager.C.

References giveDof(), numberOfDofs, and Dof::packUnknowns().

const IntArray* DofManager::givePartitionList (  )  [inline]

void DofManager::setPartitionList ( const IntArray _p  )  [inline]

Sets receiver's partition list.

Definition at line 451 of file dofmanager.h.

References partitions.

Referenced by Subdivision::createMesh(), LoadBalancer::deleteRemoteDofManagers(), and LoadBalancer::unpackMigratingData().

void DofManager::removePartitionFromList ( int  _part  )  [inline]

Removes given partition from receiver list.

Definition at line 453 of file dofmanager.h.

References IntArray::erase(), IntArray::findFirstIndexOf(), and partitions.

void DofManager::mergePartitionList ( IntArray _p  ) 

Merges receiver partition list with given lists.

Definition at line 1222 of file dofmanager.C.

References IntArray::at(), IntArray::giveSize(), IntArray::insertOnce(), and partitions.

const int DofManager::givePartitionsConnectivitySize (  ) 

bool DofManager::isLocal (  ) 

bool DofManager::isShared (  )  [inline]

IRResultType DofManager::resolveDofIDArray ( InputRecord ir,
IntArray dofIDArry 
) [protected, virtual]

void DofManager::computeSlaveLoadTransformation ( FloatMatrix answer,
const IntArray dofMask,
DofManTransfType  mode 
) [protected]

void DofManager::computeSlaveDofTransformation ( FloatMatrix answer,
const IntArray dofMask,
DofManTransfType  mode 
) [protected]

IntArray * DofManager::giveCompleteGlobalDofIDArray ( void   )  const [protected]

Definition at line 1198 of file dofmanager.C.

References IntArray::at(), giveDof(), Dof::giveDofID(), and numberOfDofs.

Referenced by giveCompleteLocationArray().


Member Data Documentation

int DofManager::numberOfDofs [protected]

Dof** DofManager::dofArray [protected]

Indicates if dofManager is boundary (true boundary or on boundary between regions) or interior.

This information is required by some recovery technigues.

Definition at line 136 of file dofmanager.h.

Referenced by DofManager(), initializeFrom(), isBoundary(), restoreContext(), saveContext(), and setBoundaryFlag().

int DofManager::globalNumber [protected]

In parallel mode, globalNumber contains globally unique DoFManager number.

The component number, inherited from FEMComponent class contains local domain number.

Definition at line 145 of file dofmanager.h.

Referenced by giveGlobalNumber(), giveLabel(), initializeFrom(), restoreContext(), saveContext(), and setGlobalNumber().

List of partition sharing the shared dof manager or remote partion containing remote dofmanager counterpart.

Definition at line 153 of file dofmanager.h.

Referenced by DofManager(), givePartitionList(), givePartitionsConnectivitySize(), initializeFrom(), isLocal(), mergePartitionList(), removePartitionFromList(), restoreContext(), saveContext(), and setPartitionList().


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

This page is part of the OOFEM documentation. Copyright (c) 2003 Borek Patzak
Project e-mail: info@oofem.org
Generated at Mon Aug 24 11:52:18 2009 for OOFEM by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2001