escript  Revision_
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
finley::NodeFile Class Reference

#include <NodeFile.h>

List of all members.

Public Member Functions

 NodeFile (int nDim, Esys_MPIInfo *mpiInfo)
 ~NodeFile ()
 destructor
void allocTable (int numNodes)
 allocates the node table within this node file to hold NN nodes.
void freeTable ()
 frees the node table within this node file
void print () const
int getFirstNode () const
int getLastNode () const
int getGlobalNumNodes () const
int * borrowGlobalNodesIndex () const
int getFirstReducedNode () const
int getLastReducedNode () const
int getGlobalNumReducedNodes () const
int * borrowGlobalReducedNodesIndex () const
int getNumNodes () const
 returns the number of FEM nodes
int getNumReducedNodes () const
int getNumDegreesOfFreedom () const
int getNumReducedDegreesOfFreedom () const
const std::vector< int > & borrowReducedNodesTarget () const
const std::vector< int > & borrowDegreesOfFreedomTarget () const
const std::vector< int > & borrowNodesTarget () const
const std::vector< int > & borrowReducedDegreesOfFreedomTarget () const
const int * borrowTargetReducedNodes () const
const int * borrowTargetDegreesOfFreedom () const
const int * borrowTargetNodes () const
const int * borrowTargetReducedDegreesOfFreedom () const
void createNodeMappings (const std::vector< int > &indexReducedNodes, const std::vector< int > &dofDistribution, const std::vector< int > &nodeDistribution)
int createDenseDOFLabeling ()
int createDenseNodeLabeling (std::vector< int > &nodeDistribution, const std::vector< int > &dofDistribution)
int createDenseReducedLabeling (const std::vector< short > &reducedMask, bool useNodes)
void assignMPIRankToDOFs (std::vector< int > &mpiRankOfDOF, const std::vector< int > &distribution)
void copyTable (int offset, int idOffset, int dofOffset, const NodeFile *in)
void gather (int *index, const NodeFile *in)
void gather_global (const std::vector< int > &index, const NodeFile *in)
void scatter (int *index, const NodeFile *in)
void setCoordinates (const escript::Data &newX)
 copies the array newX into this->coordinates
void setTags (const int newTag, const escript::Data &mask)
 sets tags to newTag where mask>0
void updateTagList ()
std::pair< int, int > getDOFRange () const

Public Attributes

NodeMapping reducedNodesMapping
NodeMapping degreesOfFreedomMapping
NodeMapping reducedDegreesOfFreedomMapping
Esys_MPIInfoMPIInfo
 MPI information.
int numNodes
 number of nodes
int numDim
 number of spatial dimensions
int * Id
 Id[i] is the id number of node i. It needs to be unique.
int * Tag
 Tag[i] is the tag of node i.
std::vector< int > tagsInUse
 vector of tags which are actually used
int * globalDegreesOfFreedom
double * Coordinates
 Coordinates[INDEX2(k,i,numDim)] is the k-th coordinate of node i.
int * globalReducedDOFIndex
int * globalReducedNodesIndex
int * globalNodesIndex
 assigns each local reduced node a global unique Id in a dense labeling
paso::Distribution_ptr nodesDistribution
paso::Distribution_ptr reducedNodesDistribution
paso::Distribution_ptr degreesOfFreedomDistribution
paso::Distribution_ptr reducedDegreesOfFreedomDistribution
paso::Connector_ptr degreesOfFreedomConnector
paso::Connector_ptr reducedDegreesOfFreedomConnector
int * reducedNodesId
 these are the packed versions of Id
int * degreesOfFreedomId
int * reducedDegreesOfFreedomId
int status

Private Member Functions

std::pair< int, int > getGlobalIdRange () const
std::pair< int, int > getGlobalDOFRange () const
std::pair< int, int > getGlobalNodeIDIndexRange () const
int prepareLabeling (const std::vector< short > &mask, std::vector< int > &buffer, std::vector< int > &distribution, bool useNodes)
void createDOFMappingAndCoupling (bool reduced)

Private Attributes

NodeMapping nodesMapping

Constructor & Destructor Documentation

finley::NodeFile::NodeFile ( int  nDim,
Esys_MPIInfo mpiInfo 
)

constructor use NodeFile::allocTable to allocate the node table (Id,Coordinates)

References Esys_MPIInfo_getReference(), and MPIInfo.

destructor

References Esys_MPIInfo_free(), freeTable(), and MPIInfo.


Member Function Documentation

void finley::NodeFile::allocTable ( int  numNodes)
void finley::NodeFile::assignMPIRankToDOFs ( std::vector< int > &  mpiRankOfDOF,
const std::vector< int > &  distribution 
)
const std::vector< int > & finley::NodeFile::borrowDegreesOfFreedomTarget ( ) const [inline]
int * finley::NodeFile::borrowGlobalNodesIndex ( ) const [inline]
const std::vector< int > & finley::NodeFile::borrowNodesTarget ( ) const [inline]
const std::vector< int > & finley::NodeFile::borrowReducedDegreesOfFreedomTarget ( ) const [inline]
const std::vector< int > & finley::NodeFile::borrowReducedNodesTarget ( ) const [inline]
const int * finley::NodeFile::borrowTargetDegreesOfFreedom ( ) const [inline]
const int * finley::NodeFile::borrowTargetNodes ( ) const [inline]
const int * finley::NodeFile::borrowTargetReducedNodes ( ) const [inline]
void finley::NodeFile::copyTable ( int  offset,
int  idOffset,
int  dofOffset,
const NodeFile in 
)
int finley::NodeFile::createDenseNodeLabeling ( std::vector< int > &  nodeDistribution,
const std::vector< int > &  dofDistribution 
)
int finley::NodeFile::createDenseReducedLabeling ( const std::vector< short > &  reducedMask,
bool  useNodes 
)
void finley::NodeFile::createDOFMappingAndCoupling ( bool  reduced) [private]
void finley::NodeFile::createNodeMappings ( const std::vector< int > &  indexReducedNodes,
const std::vector< int > &  dofDistribution,
const std::vector< int > &  nodeDistribution 
)
void finley::NodeFile::gather ( int *  index,
const NodeFile in 
)

gathers this NodeFile from the NodeFile 'in' using the entries in index[0:out->numNodes-1] which are between min_index and max_index (exclusive)

References Coordinates, finley::gatherEntries(), getGlobalIdRange(), globalDegreesOfFreedom, Id, numDim, numNodes, and Tag.

Referenced by finley::Mesh::glueFaces().

void finley::NodeFile::gather_global ( const std::vector< int > &  index,
const NodeFile in 
)
std::pair< int, int > finley::NodeFile::getDOFRange ( ) const
int finley::NodeFile::getFirstNode ( ) const [inline]
int finley::NodeFile::getFirstReducedNode ( ) const [inline]
std::pair< int, int > finley::NodeFile::getGlobalDOFRange ( ) const [private]
std::pair< int, int > finley::NodeFile::getGlobalIdRange ( ) const [private]
std::pair< int, int > finley::NodeFile::getGlobalNodeIDIndexRange ( ) const [private]
int finley::NodeFile::getGlobalNumNodes ( ) const [inline]

References nodesDistribution.

int finley::NodeFile::getLastNode ( ) const [inline]
int finley::NodeFile::getLastReducedNode ( ) const [inline]
int finley::NodeFile::getNumNodes ( ) const [inline]
int finley::NodeFile::getNumReducedNodes ( ) const [inline]
int finley::NodeFile::prepareLabeling ( const std::vector< short > &  mask,
std::vector< int > &  buffer,
std::vector< int > &  distribution,
bool  useNodes 
) [private]
void finley::NodeFile::print ( void  ) const
void finley::NodeFile::scatter ( int *  index,
const NodeFile in 
)

scatters the NodeFile in into this NodeFile using index[0:in->numNodes-1]. index has to be between 0 and numNodes-1. colouring is chosen for the worst case

References Coordinates, globalDegreesOfFreedom, Id, numDim, numNodes, finley::scatterEntries(), and Tag.

void finley::NodeFile::setTags ( const int  newTag,
const escript::Data mask 
)

Member Data Documentation

assigns each local node a global unique Id in a dense labeling. Value <0 indicates that the DOF is not used

Referenced by allocTable(), borrowGlobalReducedNodesIndex(), createDenseReducedLabeling(), finley::MeshAdapter::dump(), freeTable(), weipa::FinleyNodes::initFromFinley(), finley::loadMesh(), and finley::Mesh::printInfo().

these are the packed versions of Id

Referenced by allocTable(), finley::MeshAdapter::borrowSampleReferenceIDs(), createNodeMappings(), and freeTable().

the status counts the updates done on the node coordinates. The value is increased by 1 when the node coordinates are updated.

Referenced by finley::ElementFile::borrowJacobians(), createDenseDOFLabeling(), createDenseNodeLabeling(), createDenseReducedLabeling(), gather_global(), finley::Mesh::getStatus(), prepareLabeling(), and setCoordinates().

std::vector<int> finley::NodeFile::tagsInUse

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