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

The base class for all recovery models, which perform nodal averaging or projection processes for internal variables typically stored in integration points. More...

#include <nodalrecoverymodel.h>

+ Inheritance diagram for oofem::NodalRecoveryModel:
+ Collaboration diagram for oofem::NodalRecoveryModel:

Public Types

enum  NodalRecoveryModelType { NRM_NodalAveraging = 0, NRM_ZienkiewiczZhu = 1, NRM_SPR = 2 }
 

Public Member Functions

 NodalRecoveryModel (Domain *d)
 Constructor. More...
 
virtual ~NodalRecoveryModel ()
 Destructor. More...
 
void setDomain (Domain *ipDomain)
 
virtual int recoverValues (Set elementSet, InternalStateType type, TimeStep *tStep)=0
 Recovers the nodal values for all regions. More...
 
virtual int clear ()
 Clears the receiver's nodal table. More...
 
int giveNodalVector (const FloatArray *&ptr, int node)
 Returns vector of recovered values for given node and region. More...
 
virtual int giveRegionRecordSize ()
 Returns the region record size. More...
 
virtual const char * giveClassName () const =0
 
std::string errorInfo (const char *func)
 

Protected Member Functions

int initRegionNodeNumbering (IntArray &regionNodalNumbers, int &regionDofMans, Set &region)
 Determine local region node numbering and determine and check nodal values size. More...
 
int updateRegionRecoveredValues (const IntArray &regionNodalNumbers, int regionValSize, const FloatArray &rhs)
 Update the nodal table according to recovered solution for given region. More...
 

Protected Attributes

std::map< int, FloatArraynodalValList
 Map of nodal values. More...
 
InternalStateType valType
 Determines the type of recovered values. More...
 
StateCounterType stateCounter
 Time stamp of recovered values. More...
 
Domaindomain
 
CommunicatorBuffcommBuff
 Common Communicator buffer. More...
 
ProblemCommunicatorcommunicator
 Communicator. More...
 
bool initCommMap
 Communication init flag. More...
 

Detailed Description

The base class for all recovery models, which perform nodal averaging or projection processes for internal variables typically stored in integration points.

The recovery can be performed on one region. Region is defined by given set containing elements defing the region volume. The element set can be set up in the input file, or created dynamically. If Averaging over multiple regions is needed, multiple instances of nodal recovery model should be created, o single instance reused.

Definition at line 65 of file nodalrecoverymodel.h.

Member Enumeration Documentation

Enumerator
NRM_NodalAveraging 
NRM_ZienkiewiczZhu 
NRM_SPR 

Definition at line 68 of file nodalrecoverymodel.h.

Constructor & Destructor Documentation

oofem::NodalRecoveryModel::NodalRecoveryModel ( Domain d)

Constructor.

Definition at line 46 of file nodalrecoverymodel.C.

References commBuff, communicator, domain, initCommMap, stateCounter, and valType.

oofem::NodalRecoveryModel::~NodalRecoveryModel ( )
virtual

Destructor.

Definition at line 60 of file nodalrecoverymodel.C.

References commBuff, and communicator.

Member Function Documentation

std :: string oofem::NodalRecoveryModel::errorInfo ( const char *  func)
inline

Definition at line 126 of file nodalrecoverymodel.h.

virtual const char* oofem::NodalRecoveryModel::giveClassName ( ) const
pure virtual
int oofem::NodalRecoveryModel::giveNodalVector ( const FloatArray *&  ptr,
int  node 
)

Returns vector of recovered values for given node and region.

Parameters
ptrPointer to recovered values at node, NULL if not present.
nodeNode number.
Returns
Nonzero if values are defined, zero otherwise.

Definition at line 77 of file nodalrecoverymodel.C.

References oofem::FloatArray::giveSize(), and nodalValList.

Referenced by oofem::SmoothedNodalInternalVariableField::evaluateAt(), oofem::VTKExportModule::exportIntVarAs(), oofem::VTKExportModule::getDofManPrimaryVariable(), oofem::VTKXMLExportModule::getNodalVariableFromIS(), oofem::VTKXMLExportModule::getNodalVariableFromPrimaryField(), and oofem::Element::giveInternalStateAtNode().

int oofem::NodalRecoveryModel::giveRegionRecordSize ( )
virtual

Returns the region record size.

Available after recovery.

Parameters
regVirtual region id.
typeDetermines the type of variable, for which size is requested. Should be same as used for recovering values.

Definition at line 142 of file nodalrecoverymodel.C.

References nodalValList, and OOFEM_WARNING.

int oofem::NodalRecoveryModel::initRegionNodeNumbering ( IntArray regionNodalNumbers,
int &  regionDofMans,
Set region 
)
protected

Determine local region node numbering and determine and check nodal values size.

Parameters
regionNodalNumberson Return array containing for each dofManager its local region number.
regionDofMansOn output total number of region dofMans.
regVirtual region number.
Returns
Nonzero if ok, zero if region has to be skipped.

Definition at line 114 of file nodalrecoverymodel.C.

References oofem::IntArray::at(), domain, oofem::Element::giveDofManager(), oofem::Domain::giveElement(), oofem::Set::giveElementList(), oofem::FEMComponent::giveNumber(), oofem::Domain::giveNumberOfDofManagers(), oofem::Element::giveNumberOfDofManagers(), oofem::IntArray::giveSize(), oofem::IntArray::resize(), and oofem::IntArray::zero().

Referenced by oofem::NodalAveragingRecoveryModel::recoverValues(), oofem::ZZNodalRecoveryModel::recoverValues(), and oofem::SPRNodalRecoveryModel::recoverValues().

virtual int oofem::NodalRecoveryModel::recoverValues ( Set  elementSet,
InternalStateType  type,
TimeStep tStep 
)
pure virtual
void oofem::NodalRecoveryModel::setDomain ( Domain ipDomain)
inline
int oofem::NodalRecoveryModel::updateRegionRecoveredValues ( const IntArray regionNodalNumbers,
int  regionValSize,
const FloatArray rhs 
)
protected

Update the nodal table according to recovered solution for given region.

Parameters
iregVirtual region number.
regionNodalNumbersArray containing for each dofManager its local region number.
regionValSizeSize of dofMan record.
rhsArray with recovered values.

Definition at line 93 of file nodalrecoverymodel.C.

References oofem::IntArray::at(), oofem::FloatArray::at(), domain, oofem::Domain::giveNumberOfDofManagers(), nodalValList, and oofem::FloatArray::resize().

Referenced by oofem::NodalAveragingRecoveryModel::recoverValues(), oofem::ZZNodalRecoveryModel::recoverValues(), and oofem::SPRNodalRecoveryModel::recoverValues().

Member Data Documentation

bool oofem::NodalRecoveryModel::initCommMap
protected
std :: map< int, FloatArray > oofem::NodalRecoveryModel::nodalValList
protected

Map of nodal values.

Only nodes for active region are determined and stored. The node number is dictionary key to corresponding values.

Definition at line 75 of file nodalrecoverymodel.h.

Referenced by clear(), giveNodalVector(), giveRegionRecordSize(), and updateRegionRecoveredValues().

StateCounterType oofem::NodalRecoveryModel::stateCounter
protected
InternalStateType oofem::NodalRecoveryModel::valType
protected

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:39 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011