Node Class Reference

Class implementing node in finite element mesh. More...

#include <node.h>

Inheritance diagram for Node:

Inheritance graph
[legend]
Collaboration diagram for Node:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Node (int n, Domain *aDomain)
 Constructor.
 ~Node ()
 Destructor.
bool hasCoordinates ()
double giveCoordinate (int i)
 Returns i-th coordinate of node.
FloatArraygiveCoordinates ()
 Returns pointer to node coordinate array.
void setCoordinates (FloatArray &_coords)
 Sets node coordinates to given array.
virtual double giveUpdatedCoordinate (int ic, TimeStep *tStep, EquationID type, double scale=1.)
 Returns updated ic-th coordinate of receiver.
int hasLocalCS ()
 Returns nonzero if node has prescribed local coordinate system.
FloatMatrixgiveLocalCoordinateTriplet ()
 Returns pointer to local coordinate triplet in node.
bool hasSameLCS (Node *remote)
 Returns true, if the local coordinate systems of receiver and given node are the same.
void computeDofTransformation (FloatMatrix &answer, const IntArray *dofIDArry, DofManTransfType mode)
 Computes receiver DOF transformation matrix from global cs.
void computeLoadTransformation (FloatMatrix &answer, const IntArray *dofIDArry, DofManTransfType mode)
 Computes receiver LOAD transformation matrix from global cs.
int requiresTransformation ()
 Indicates, whether dofManager requires the transformation from global c.s.
virtual void computeLoadVectorAt (FloatArray &answer, TimeStep *stepN, ValueModeType mode)
 Computes the load vector of receiver in given time.
void computeGNDofTransformation (FloatMatrix &answer, const IntArray *map)
 Computes transformation matrix for given dofs from global c.s to rotated coordinate system (given by localCoordinateSystem member value).
void updateYourself (TimeStep *)
 Updates receiver at end of time step (i.e.
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 int checkConsistency ()
 Checks internal data consistency in node.
virtual bool isDofTypeCompatible (dofType type) const
 Returns true if dof of given type is allowed to be associated to receiver.
contextIOResultType saveContext (DataStream *stream, ContextMode mode, void *obj=NULL)
 Stores receiver state to output stream.
contextIOResultType restoreContext (DataStream *stream, ContextMode mode, void *obj=NULL)
 Restores the receiver state previously written in stream.

Protected Attributes

FloatArray coordinates
 Array storing nodal coordinates.
FloatMatrixlocalCoordinateSystem
 Triplet defining the local coordinate system in node.


Detailed Description

Class implementing node in finite element mesh.

Node posses degrees of freedom (see base class DofManager). Node is atribute of few elements and it is managed by domain. Node manages its positon in space, and if specified local coordinate system in node. If local coordinate system is defined, all equilibrium equations are assembled in this system and therefore all DOFs and applied boundary and initial conditions apply in this local coordinate system. By default, global coordinate system is assumed in each node. For description, how to prescribe local coordinate system in node, see input file description section.

Definition at line 75 of file node.h.


Constructor & Destructor Documentation

Node::Node ( int  n,
Domain aDomain 
)

Constructor.

Creates a node belonging to domain.

Parameters:
n node number in domain aDomain
aDomain domain to which node belongs

Definition at line 68 of file node.C.

References localCoordinateSystem.

Node::~Node (  ) 

Destructor.

Definition at line 78 of file node.C.

References localCoordinateSystem.


Member Function Documentation

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

Reimplemented from DofManager.

Definition at line 126 of file node.h.

double Node::giveCoordinate ( int  i  )  [virtual]

Returns i-th coordinate of node.

Reimplemented from DofManager.

Definition at line 85 of file node.C.

References FloatArray::at(), coordinates, and FloatArray::giveSize().

Referenced by TR1_2D_CBS::checkConsistency(), TR1_2D_SUPG_AXI::computeBCRhsTerm_MB(), TR1_2D_SUPG2_AXI::computeBCRhsTerm_MB(), TR1_2D_SUPG2::computeBCRhsTerm_MB(), TR1_2D_SUPG::computeBCRhsTerm_MB(), Truss3d::computeBmatrixAt(), Truss2d::computeBmatrixAt(), Truss1d::computeBmatrixAt(), TrPlaneStress2d::computeBmatrixAt(), TrPlaneStrRot::computeBmatrixAt(), TrPlaneStrain::computeBmatrixAt(), Q4Axisymm::computeBmatrixAt(), L4Axisymm::computeBmatrixAt(), CCTPlate::computeBmatrixAt(), Axisymm3d::computeBmatrixAt(), PY1_3D_SUPG::computeCriticalTimeStep(), TR1_2D_CBS::computeDensityRhsVelocityTerms(), TR1_2D_CBS::computeDiffusionTermsI(), TrPlaneStress2d::computeEdgeIpGlobalCoords(), TrPlaneStrain::computeEdgeIpGlobalCoords(), Tr1_ht::computeEdgeIpGlobalCoords(), Quad1PlaneStrain::computeEdgeIpGlobalCoords(), Quad1_ht::computeEdgeIpGlobalCoords(), TrPlaneStress2d::computeEdgeVolumeAround(), TrPlaneStrain::computeEdgeVolumeAround(), TrAxisym1_ht::computeEdgeVolumeAround(), Tr1_ht::computeEdgeVolumeAround(), QuadAxisym1_ht::computeEdgeVolumeAround(), Quad1PlaneStrain::computeEdgeVolumeAround(), Quad1_ht::computeEdgeVolumeAround(), Truss3d::computeGlobalCoordinates(), Truss2d::computeGlobalCoordinates(), Truss1d::computeGlobalCoordinates(), TrPlaneStress2d::computeGlobalCoordinates(), TrPlaneStrain::computeGlobalCoordinates(), Tr1_ht::computeGlobalCoordinates(), TR1_2D_SUPG2_AXI::computeGlobalCoordinates(), TR1_2D_SUPG2::computeGlobalCoordinates(), TR1_2D_SUPG::computeGlobalCoordinates(), TR1_2D_CBS::computeGlobalCoordinates(), Quad1PlaneStrain::computeGlobalCoordinates(), Quad1_ht::computeGlobalCoordinates(), Q4Axisymm::computeGlobalCoordinates(), LIBeam3dNL2::computeGlobalCoordinates(), LIBeam3dNL::computeGlobalCoordinates(), LIBeam3d2::computeGlobalCoordinates(), LIBeam3d::computeGlobalCoordinates(), LIBeam2dNL::computeGlobalCoordinates(), LIBeam2d::computeGlobalCoordinates(), InterfaceElem1d::computeGlobalCoordinates(), InterfaceElement3dTrLin::computeGlobalCoordinates(), InterfaceElem2dQuad::computeGlobalCoordinates(), CCTPlate::computeGlobalCoordinates(), Beam3d::computeGlobalCoordinates(), Beam2d::computeGlobalCoordinates(), Tr1_ht::computeGradientMatrixAt(), RerShell::computeGtoLRotationMatrix(), InterfaceElem2dQuad::computeGtoLRotationMatrix(), Quad1_ht::computeJacobianMatrix(), Quad1PlaneStrain::computeJacobianMatrixAt(), Q4Axisymm::computeJacobianMatrixAt(), InterfaceElement3dTrLin::computeLCS(), TrPlaneStress2d::computeLoadLEToLRotationMatrix(), TrPlaneStrain::computeLoadLEToLRotationMatrix(), Quad1PlaneStrain::computeLoadLEToLRotationMatrix(), PlaneStress2d::computeLoadLEToLRotationMatrix(), L4Axisymm::computeLoadLEToLRotationMatrix(), Axisymm3d::computeLoadLEToLRotationMatrix(), Truss1d::computeLocalCoordinates(), TrPlaneStress2d::computeLocalCoordinates(), TrPlaneStrain::computeLocalCoordinates(), Tr1_ht::computeLocalCoordinates(), TR1_2D_SUPG2::computeLocalCoordinates(), TR1_2D_SUPG::computeLocalCoordinates(), TR1_2D_CBS::computeLocalCoordinates(), Quad1PlaneStrain::computeLocalCoordinates(), Quad1_ht::computeLocalCoordinates(), CCTPlate::computeLocalCoordinates(), InterfaceElem1d::computeLocalSlipDir(), RigidArmNode::computeMasterContribution(), CCTPlate::ComputeMidPlaneNormal(), TrPlaneStrRot::computeNmatrixAt(), CCTPlate::computeNmatrixAt(), TR1_2D_CBS::computePrescribedTractionPressure(), TrAxisym1_ht::computeRadiusAt(), TR1_2D_SUPG_AXI::computeRadiusAt(), TR1_2D_SUPG2_AXI::computeRadiusAt(), QuadAxisym1_ht::computeRadiusAt(), Q4Axisymm::computeVolumeAround(), L4Axisymm::computeVolumeAround(), InterfaceElement3dTrLin::computeVolumeAround(), InterfaceElem2dQuad::computeVolumeAround(), Axisymm3d::computeVolumeAround(), LIBeam3dNL2::computeXdVector(), LIBeam3dNL::computeXdVector(), Targe2Interface::createInput(), T3DInterface::createInput(), FreemInterface::createInput(), LEPlic::findCellLineConstant(), TR1_2D_SUPG2_AXI::formMaterialVolumePoly(), TR1_2D_SUPG2::formMaterialVolumePoly(), TR1_2D_SUPG::formMaterialVolumePoly(), TR1_2D_SUPG2_AXI::formMyVolumePoly(), TR1_2D_SUPG2::formMyVolumePoly(), TR1_2D_SUPG::formMyVolumePoly(), TR1_2D_SUPG2_AXI::formVolumeInterfacePoly(), TR1_2D_SUPG2::formVolumeInterfacePoly(), TR1_2D_SUPG::formVolumeInterfacePoly(), TrPlaneStress2d::giveArea(), TrPlaneStrain::giveArea(), Tr1_ht::giveArea(), CCTPlate::giveArea(), TrPlaneStress2d::GivebCoeff(), TrPlaneStrain::GivebCoeff(), TrPlaneStress2d::GivecCoeff(), TrPlaneStrain::GivecCoeff(), L4Axisymm::giveCharacteristicLenght(), Axisymm3d::giveCharacteristicLenght(), LIBeam3d2::giveCurrentLength(), TrPlaneStrRot::GiveDerivativeUX(), TrPlaneStrRot::GiveDerivativeUY(), TrPlaneStrRot::GiveDerivativeVX(), TrPlaneStrRot::GiveDerivativeVY(), TR1_2D_SUPG2_AXI::giveElementCenter(), TR1_2D_SUPG2::giveElementCenter(), TR1_2D_SUPG::giveElementCenter(), Truss3d::giveLength(), Truss2d::giveLength(), Truss1d::giveLength(), LIBeam3dNL2::giveLength(), LIBeam3dNL::giveLength(), LIBeam3d2::giveLength(), LIBeam3d::giveLength(), LIBeam2dNL::giveLength(), LIBeam2d::giveLength(), Beam3d::giveLength(), Beam2d::giveLength(), Truss3d::giveLocalCoordinateSystem(), LIBeam3dNL2::giveLocalCoordinateSystem(), LIBeam3dNL::giveLocalCoordinateSystem(), LIBeam3d2::giveLocalCoordinateSystem(), LIBeam3d::giveLocalCoordinateSystem(), Beam3d::giveLocalCoordinateSystem(), Truss2d::givePitch(), TrPlaneStrRot::GivePitch(), LIBeam2dNL::givePitch(), LIBeam2d::givePitch(), Beam2d::givePitch(), giveUpdatedCoordinate(), TR1_2D_SUPG_AXI::initGeometry(), TR1_2D_SUPG::initGeometry(), LevelSetPCS::initialize(), PolylineNonlocalBarrier::isActivated(), TR1_2D_SUPG::LS_PCS_computeS(), TR1_2D_SUPG::LS_PCS_computeVOFFractions(), PY1_3D_SUPG::LS_PCS_computeVOFFractions(), printYourself(), TR1_2D_SUPG2_AXI::updateIntegrationRules(), TR1_2D_SUPG2::updateIntegrationRules(), TR1_2D_SUPG2_AXI::updateVolumePolygons(), and TR1_2D_SUPG2::updateVolumePolygons().

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

void Node::setCoordinates ( FloatArray _coords  )  [inline]

Sets node coordinates to given array.

Definition at line 132 of file node.h.

References coordinates.

double Node::giveUpdatedCoordinate ( int  ic,
TimeStep tStep,
EquationID  type,
double  scale = 1. 
) [virtual]

Returns updated ic-th coordinate of receiver.

Return value is computed as coordinate + scale * displacement, where corresponding displacement is obtained from cooresponding nodal DOF. Local coodinate system is taken into account. Usefull mainly for postprocessing.

Definition at line 268 of file node.C.

References _error, FloatMatrix::at(), FloatArray::at(), FEMComponent::domain, giveCoordinate(), Domain::giveCorrespondingCoordinateIndex(), DofManager::giveDof(), giveLocalCoordinateTriplet(), Dof::giveUnknown(), hasLocalCS(), TimeStep::isTheCurrentTimeStep(), and DofManager::numberOfDofs.

int Node::hasLocalCS (  )  [inline]

Returns nonzero if node has prescribed local coordinate system.

Definition at line 144 of file node.h.

References localCoordinateSystem.

Referenced by computeDofTransformation(), RigidArmNode::computeMasterContribution(), HangingNode::computeMasterContribution(), giveUpdatedCoordinate(), hasSameLCS(), requiresTransformation(), and saveContext().

FloatMatrix* Node::giveLocalCoordinateTriplet (  )  [inline]

Returns pointer to local coordinate triplet in node.

If not defined, returns NULL.

Returns:
Triplet defining the local coordinate system in node. Value at position (i,j) represents angle between e'(i) and e(j), where e' is base vector of local coordinate system and e is base vector of global c.s.

Definition at line 152 of file node.h.

References localCoordinateSystem.

Referenced by RefinedElement::giveCompatibleBcDofArray(), giveUpdatedCoordinate(), hasSameLCS(), HuertaErrorEstimatorInterface::setupRefinedElementProblem1D(), HuertaErrorEstimatorInterface::setupRefinedElementProblem2D(), and HuertaErrorEstimatorInterface::setupRefinedElementProblem3D().

bool Node::hasSameLCS ( Node remote  ) 

Returns true, if the local coordinate systems of receiver and given node are the same.

Definition at line 391 of file node.C.

References FloatMatrix::at(), giveLocalCoordinateTriplet(), and hasLocalCS().

Referenced by RigidArmNode::checkConsistency(), checkConsistency(), and HangingNode::checkConsistency().

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

Computes receiver DOF transformation matrix from global cs.

to dofManager specific coordinate system - if mode == _toNodalCS, otherwise reverse transformation is computed. (In the dofManager specifis cs the governing equations are assembled, for example the local coordinate system in node). This transformation may not be ortogonal.

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 from DofManager.

Definition at line 429 of file node.C.

References _toGlobalCS, FloatMatrix::beProductOf(), FloatMatrix::beTProductOf(), FloatMatrix::beTranspositionOf(), FloatMatrix::beUnitMatrix(), computeGNDofTransformation(), DofManager::computeSlaveDofTransformation(), FloatMatrix::GiveCopy(), IntArray::giveSize(), hasLocalCS(), DofManager::hasSlaveDofs, DofManager::numberOfDofs, and FloatMatrix::resize().

Referenced by computeLoadTransformation().

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

Computes receiver LOAD transformation matrix from global cs.

to dofManager specific coordinate system - if mode == _toNodalCS, otherwise reverse transformation is computed. (In the dofManager specifis cs the governing equations are assembled, for example the local coordinate system in node). This transformation may not be ortogonal.

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 from DofManager.

Definition at line 467 of file node.C.

References _error, _toGlobalCS, _toNodalCS, FloatMatrix::beTranspositionOf(), and computeDofTransformation().

Referenced by computeLoadVectorAt().

int Node::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 from DofManager.

Definition at line 191 of file node.h.

References hasLocalCS(), and DofManager::hasSlaveDofs.

Referenced by computeLoadVectorAt().

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

void Node::computeGNDofTransformation ( FloatMatrix answer,
const IntArray map 
)

Computes transformation matrix for given dofs from global c.s to rotated coordinate system (given by localCoordinateSystem member value).

Parameters:
answer result of [map.giveSize(), map.giveSize()] size.
map 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.

Definition at line 517 of file node.C.

References __DofIDItemToString(), _error2, IntArray::at(), FloatMatrix::at(), DofManager::giveDof(), Dof::giveDofID(), IntArray::giveSize(), localCoordinateSystem, DofManager::numberOfDofs, FloatMatrix::resize(), and FloatMatrix::zero().

Referenced by computeDofTransformation().

void Node::updateYourself ( TimeStep tStep  ) 

Updates receiver at end of time step (i.e.

after equilibrium has been reached). If EngngModel formulation ( see giveFormulation() member function) returns actualized Lagrange mode, node updates its coordinates according to solution.

See also:
EngngModel::giveFormulation().

Reimplemented from DofManager.

Definition at line 243 of file node.C.

References AL, FloatArray::at(), coordinates, FEMComponent::domain, EID_MomentumBalance, Domain::giveCorrespondingCoordinateIndex(), DofManager::giveDof(), Domain::giveEngngModel(), EngngModel::giveFormulation(), Dof::giveUnknown(), and DofManager::numberOfDofs.

Referenced by EngngModel::updateYourself().

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

Returns class name of the receiver.

Reimplemented from DofManager.

Reimplemented in HangingNode, and RigidArmNode.

Definition at line 217 of file node.h.

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

Returns classType id of receiver.

See also:
FEMComponent::giveClassID

Reimplemented from DofManager.

Reimplemented in HangingNode, and RigidArmNode.

Definition at line 221 of file node.h.

References NodeClass.

Referenced by checkConsistency().

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

void Node::printYourself (  ) 

prints receiver state on stdout. Usefull for debuging.

Reimplemented from DofManager.

Definition at line 221 of file node.C.

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

int Node::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 DofManager.

Reimplemented in HangingNode, and RigidArmNode.

Definition at line 329 of file node.C.

References _warning2, IntArray::at(), DofManager::checkConsistency(), FEMComponent::domain, giveClassID(), DofManager::giveDof(), Domain::giveDofManager(), DofManager::giveNumberOfDofs(), hasSameLCS(), and SimpleSlaveDofClass.

Referenced by RigidArmNode::checkConsistency(), and HangingNode::checkConsistency().

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

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

Reimplemented from DofManager.

Reimplemented in HangingNode, and RigidArmNode.

Definition at line 235 of file node.h.

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

Stores receiver state to output stream.

Exceptions:
throws an ContextIOERR exception if error encountered.

Reimplemented from DofManager.

Definition at line 640 of file node.C.

References _error, CIO_IOERR, CIO_OK, CM_Definition, coordinates, hasLocalCS(), localCoordinateSystem, DofManager::saveContext(), FloatMatrix::storeYourself(), FloatArray::storeYourself(), THROW_CIOERR, and DataStream::write().

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

Restores the receiver state previously written in stream.

Exceptions:
throws an ContextIOERR exception if error encountered.

Reimplemented from DofManager.

Definition at line 677 of file node.C.

References _error, CIO_IOERR, CIO_OK, CM_Definition, coordinates, localCoordinateSystem, DataStream::read(), DofManager::restoreContext(), FloatMatrix::restoreYourself(), FloatArray::restoreYourself(), and THROW_CIOERR.


Member Data Documentation

Triplet defining the local coordinate system in node.

Value at position (i,j) represents angle between e'(i) and e(j), where e' is base vector of local coordinate system and e is base vector of global c.s.

Definition at line 112 of file node.h.

Referenced by computeGNDofTransformation(), RigidArmNode::computeMasterContribution(), giveLocalCoordinateTriplet(), hasLocalCS(), initializeFrom(), Node(), restoreContext(), saveContext(), and ~Node().


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:53:26 2009 for OOFEM by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2001