escript  Revision_Unversioneddirectory
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, esysUtils::JMPI &mpiInfo)
 
 ~NodeFile ()
 destructor More...
 
void allocTable (dim_t 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
 
index_t getFirstNode () const
 
index_t getLastNode () const
 
index_t getGlobalNumNodes () const
 
index_tborrowGlobalNodesIndex () const
 
index_t getFirstReducedNode () const
 
index_t getLastReducedNode () const
 
index_t getGlobalNumReducedNodes () const
 
index_tborrowGlobalReducedNodesIndex () const
 
dim_t getNumNodes () const
 returns the number of FEM nodes More...
 
dim_t getNumReducedNodes () const
 
dim_t getNumDegreesOfFreedom () const
 
dim_t getNumReducedDegreesOfFreedom () const
 
const std::vector< index_t > & borrowReducedNodesTarget () const
 
const std::vector< index_t > & borrowDegreesOfFreedomTarget () const
 
const std::vector< index_t > & borrowNodesTarget () const
 
const std::vector< index_t > & borrowReducedDegreesOfFreedomTarget () const
 
const index_tborrowTargetReducedNodes () const
 
const index_tborrowTargetDegreesOfFreedom () const
 
const index_tborrowTargetNodes () const
 
const index_tborrowTargetReducedDegreesOfFreedom () const
 
void createNodeMappings (const std::vector< index_t > &indexReducedNodes, const std::vector< index_t > &dofDistribution, const std::vector< index_t > &nodeDistribution)
 
dim_t createDenseDOFLabeling ()
 
dim_t createDenseNodeLabeling (std::vector< index_t > &nodeDistribution, const std::vector< index_t > &dofDistribution)
 
dim_t createDenseReducedLabeling (const std::vector< short > &reducedMask, bool useNodes)
 
void assignMPIRankToDOFs (std::vector< int > &mpiRankOfDOF, const std::vector< index_t > &distribution)
 
void copyTable (index_t offset, index_t idOffset, index_t dofOffset, const NodeFile *in)
 
void gather (const index_t *index, const NodeFile *in)
 
void gather_global (const index_t *index, const NodeFile *in)
 
void scatter (const index_t *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< index_t, index_tgetDOFRange () const
 

Public Attributes

NodeMapping reducedNodesMapping
 
NodeMapping degreesOfFreedomMapping
 
NodeMapping reducedDegreesOfFreedomMapping
 
esysUtils::JMPI MPIInfo
 MPI information. More...
 
dim_t numNodes
 number of nodes More...
 
int numDim
 number of spatial dimensions More...
 
index_tId
 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...
 
index_tglobalDegreesOfFreedom
 
double * Coordinates
 Coordinates[INDEX2(k,i,numDim)] is the k-th coordinate of node i. More...
 
index_tglobalReducedDOFIndex
 
index_tglobalReducedNodesIndex
 
index_tglobalNodesIndex
 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
 
index_treducedNodesId
 these are the packed versions of Id More...
 
index_tdegreesOfFreedomId
 
index_treducedDegreesOfFreedomId
 
int status
 

Private Member Functions

std::pair< index_t, index_tgetGlobalIdRange () const
 
std::pair< index_t, index_tgetGlobalDOFRange () const
 
std::pair< index_t, index_tgetGlobalNodeIDIndexRange () const
 
dim_t prepareLabeling (const std::vector< short > &mask, std::vector< index_t > &buffer, std::vector< index_t > &distribution, bool useNodes)
 
void createDOFMappingAndCoupling (bool reduced)
 

Private Attributes

NodeMapping nodesMapping
 

Constructor & Destructor Documentation

finley::NodeFile::NodeFile ( int  nDim,
esysUtils::JMPI mpiInfo 
)

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

References MPIInfo.

finley::NodeFile::~NodeFile ( )

destructor

References freeTable().

Member Function Documentation

void finley::NodeFile::allocTable ( dim_t  numNodes)
void finley::NodeFile::assignMPIRankToDOFs ( std::vector< int > &  mpiRankOfDOF,
const std::vector< index_t > &  distribution 
)
const std::vector< index_t > & finley::NodeFile::borrowDegreesOfFreedomTarget ( ) const
inline
index_t * finley::NodeFile::borrowGlobalNodesIndex ( ) const
inline
index_t * finley::NodeFile::borrowGlobalReducedNodesIndex ( ) const
inline
const std::vector< index_t > & finley::NodeFile::borrowNodesTarget ( ) const
inline
const std::vector< index_t > & finley::NodeFile::borrowReducedDegreesOfFreedomTarget ( ) const
inline
const std::vector< index_t > & finley::NodeFile::borrowReducedNodesTarget ( ) const
inline
const index_t * finley::NodeFile::borrowTargetDegreesOfFreedom ( ) const
inline
const index_t * finley::NodeFile::borrowTargetNodes ( ) const
inline
const index_t * finley::NodeFile::borrowTargetReducedDegreesOfFreedom ( ) const
inline
const index_t * finley::NodeFile::borrowTargetReducedNodes ( ) const
inline
void finley::NodeFile::copyTable ( index_t  offset,
index_t  idOffset,
index_t  dofOffset,
const NodeFile in 
)
dim_t finley::NodeFile::createDenseDOFLabeling ( )
dim_t finley::NodeFile::createDenseNodeLabeling ( std::vector< index_t > &  nodeDistribution,
const std::vector< index_t > &  dofDistribution 
)
dim_t finley::NodeFile::createDenseReducedLabeling ( const std::vector< short > &  reducedMask,
bool  useNodes 
)
void finley::NodeFile::createDOFMappingAndCoupling ( bool  reduced)
private
void finley::NodeFile::createNodeMappings ( const std::vector< index_t > &  indexReducedNodes,
const std::vector< index_t > &  dofDistribution,
const std::vector< index_t > &  nodeDistribution 
)
void finley::NodeFile::freeTable ( )
void finley::NodeFile::gather ( const index_t 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 index_t index,
const NodeFile in 
)
std::pair< index_t, index_t > finley::NodeFile::getDOFRange ( ) const
index_t finley::NodeFile::getFirstNode ( ) const
inline
index_t finley::NodeFile::getFirstReducedNode ( ) const
inline
std::pair< index_t, index_t > finley::NodeFile::getGlobalDOFRange ( ) const
private
std::pair< index_t, index_t > finley::NodeFile::getGlobalIdRange ( ) const
private
std::pair< index_t, index_t > finley::NodeFile::getGlobalNodeIDIndexRange ( ) const
private
index_t finley::NodeFile::getGlobalNumNodes ( ) const
inline

References nodesDistribution.

dim_t finley::NodeFile::getGlobalNumReducedNodes ( ) const
inline
index_t finley::NodeFile::getLastNode ( ) const
inline
index_t finley::NodeFile::getLastReducedNode ( ) const
inline
dim_t finley::NodeFile::getNumDegreesOfFreedom ( ) const
inline
dim_t finley::NodeFile::getNumNodes ( ) const
inline
dim_t finley::NodeFile::getNumReducedDegreesOfFreedom ( ) const
inline
dim_t finley::NodeFile::getNumReducedNodes ( ) const
inline
dim_t finley::NodeFile::prepareLabeling ( const std::vector< short > &  mask,
std::vector< index_t > &  buffer,
std::vector< index_t > &  distribution,
bool  useNodes 
)
private
void finley::NodeFile::print ( void  ) const
void finley::NodeFile::scatter ( const index_t 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
index_t* finley::NodeFile::degreesOfFreedomId
NodeMapping finley::NodeFile::degreesOfFreedomMapping
index_t* finley::NodeFile::globalDegreesOfFreedom
index_t* finley::NodeFile::globalNodesIndex
index_t* finley::NodeFile::globalReducedDOFIndex
index_t* 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().

index_t* finley::NodeFile::Id
esysUtils::JMPI finley::NodeFile::MPIInfo
paso::Distribution_ptr finley::NodeFile::nodesDistribution
NodeMapping finley::NodeFile::nodesMapping
private
int finley::NodeFile::numDim
dim_t finley::NodeFile::numNodes
paso::Connector_ptr finley::NodeFile::reducedDegreesOfFreedomConnector
paso::Distribution_ptr finley::NodeFile::reducedDegreesOfFreedomDistribution
index_t* finley::NodeFile::reducedDegreesOfFreedomId
NodeMapping finley::NodeFile::reducedDegreesOfFreedomMapping
paso::Distribution_ptr finley::NodeFile::reducedNodesDistribution
index_t* 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(), prepareLabeling(), and setCoordinates().

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

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