escript  Revision_4925
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
finley::NodeFile Class Reference

#include <NodeFile.h>

Public Member Functions

 NodeFile (int nDim, Esys_MPIInfo *mpiInfo)
 
 ~NodeFile ()
 destructor More...
 
void allocTable (int numNodes)
 allocates the node table within this node file to hold NN nodes. More...
 
void freeTable ()
 frees the node table within this node file More...
 
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 More...
 
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 More...
 
void setTags (const int newTag, const escript::Data &mask)
 sets tags to newTag where mask>0 More...
 
void updateTagList ()
 
std::pair< int, int > getDOFRange () const
 

Public Attributes

NodeMapping reducedNodesMapping
 
NodeMapping degreesOfFreedomMapping
 
NodeMapping reducedDegreesOfFreedomMapping
 
Esys_MPIInfoMPIInfo
 MPI information. More...
 
int numNodes
 number of nodes More...
 
int numDim
 number of spatial dimensions More...
 
int * Id
 Id[i] is the id number of node i. It needs to be unique. More...
 
int * Tag
 Tag[i] is the tag of node i. More...
 
std::vector< int > tagsInUse
 vector of tags which are actually used More...
 
int * globalDegreesOfFreedom
 
double * Coordinates
 Coordinates[INDEX2(k,i,numDim)] is the k-th coordinate of node i. More...
 
int * globalReducedDOFIndex
 
int * globalReducedNodesIndex
 
int * globalNodesIndex
 assigns each local reduced node a global unique Id in a dense labeling More...
 
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 More...
 
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.

finley::NodeFile::~NodeFile ( )

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
int * finley::NodeFile::borrowGlobalReducedNodesIndex ( ) 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::borrowTargetReducedDegreesOfFreedom ( ) 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::createDenseDOFLabeling ( )
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::freeTable ( )
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::getGlobalNumReducedNodes ( ) const
inline
int finley::NodeFile::getLastNode ( ) const
inline
int finley::NodeFile::getLastReducedNode ( ) const
inline
int finley::NodeFile::getNumDegreesOfFreedom ( ) const
inline
int finley::NodeFile::getNumNodes ( ) const
inline
int finley::NodeFile::getNumReducedDegreesOfFreedom ( ) 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::setCoordinates ( const escript::Data newX)
void finley::NodeFile::setTags ( const int  newTag,
const escript::Data mask 
)
void finley::NodeFile::updateTagList ( )
inline

Member Data Documentation

double* finley::NodeFile::Coordinates
paso::Connector_ptr finley::NodeFile::degreesOfFreedomConnector
paso::Distribution_ptr finley::NodeFile::degreesOfFreedomDistribution
int* finley::NodeFile::degreesOfFreedomId
NodeMapping finley::NodeFile::degreesOfFreedomMapping
int* finley::NodeFile::globalDegreesOfFreedom
int* finley::NodeFile::globalNodesIndex
int* finley::NodeFile::globalReducedDOFIndex
int* finley::NodeFile::globalReducedNodesIndex

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().

int* finley::NodeFile::Id
Esys_MPIInfo* finley::NodeFile::MPIInfo
paso::Distribution_ptr finley::NodeFile::nodesDistribution
NodeMapping finley::NodeFile::nodesMapping
private
int finley::NodeFile::numDim
int finley::NodeFile::numNodes
paso::Connector_ptr finley::NodeFile::reducedDegreesOfFreedomConnector
paso::Distribution_ptr finley::NodeFile::reducedDegreesOfFreedomDistribution
int* finley::NodeFile::reducedDegreesOfFreedomId
NodeMapping finley::NodeFile::reducedDegreesOfFreedomMapping
paso::Distribution_ptr finley::NodeFile::reducedNodesDistribution
int* finley::NodeFile::reducedNodesId

these are the packed versions of Id

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

NodeMapping finley::NodeFile::reducedNodesMapping
int finley::NodeFile::status

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().

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

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