ESScript  Revision_4488
Public Member Functions | Public Attributes | Private Member Functions | List of all members
finley::NodeFile Class Reference

#include <NodeFile.h>

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
int getFirstReducedNode ()
int getLastReducedNode ()
int getGlobalNumReducedNodes ()
int * borrowGlobalReducedNodesIndex ()
int getFirstNode ()
int getLastNode ()
int getGlobalNumNodes ()
int * borrowGlobalNodesIndex ()
int getNumReducedNodes ()
int getNumDegreesOfFreedom ()
int getNumNodes ()
int getNumReducedDegreesOfFreedom ()
int * borrowTargetReducedNodes ()
int * borrowTargetDegreesOfFreedom ()
int * borrowTargetNodes ()
int * borrowTargetReducedDegreesOfFreedom ()
int * borrowReducedNodesTarget ()
int * borrowDegreesOfFreedomTarget ()
int * borrowNodesTarget ()
int * borrowReducedDegreesOfFreedomTarget ()
int createDenseDOFLabeling ()
int createDenseNodeLabeling (int *node_distribution, const int *dof_distribution)
int createDenseReducedLabeling (int *reducedMask, bool useNodes)
void assignMPIRankToDOFs (int *mpiRankOfDOF, int *distribution)
void copyTable (int offset, int idOffset, int dofOffset, const NodeFile *in)
void gather (int *index, const NodeFile *in)
void gather_global (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

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
Finley_NodeMappingnodesMapping
Finley_NodeMappingreducedNodesMapping
Finley_NodeMappingdegreesOfFreedomMapping
Finley_NodeMappingreducedDegreesOfFreedomMapping
Paso_DistributionnodesDistribution
Paso_DistributionreducedNodesDistribution
Paso_DistributiondegreesOfFreedomDistribution
Paso_DistributionreducedDegreesOfFreedomDistribution
Paso_ConnectordegreesOfFreedomConnector
Paso_ConnectorreducedDegreesOfFreedomConnector
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 (int *mask, std::vector< int > &buffer, std::vector< int > &distribution, bool useNodes)

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 ( int *  mpiRankOfDOF,
int *  distribution 
)
int * finley::NodeFile::borrowDegreesOfFreedomTarget ( )
inline
int * finley::NodeFile::borrowGlobalNodesIndex ( )
inline

References globalNodesIndex.

int * finley::NodeFile::borrowGlobalReducedNodesIndex ( )
inline
int * finley::NodeFile::borrowNodesTarget ( )
inline
int * finley::NodeFile::borrowReducedDegreesOfFreedomTarget ( )
inline
int * finley::NodeFile::borrowReducedNodesTarget ( )
inline
int * finley::NodeFile::borrowTargetDegreesOfFreedom ( )
inline
int * finley::NodeFile::borrowTargetNodes ( )
inline
int * finley::NodeFile::borrowTargetReducedDegreesOfFreedom ( )
inline
int * finley::NodeFile::borrowTargetReducedNodes ( )
inline
void finley::NodeFile::copyTable ( int  offset,
int  idOffset,
int  dofOffset,
const NodeFile in 
)
int finley::NodeFile::createDenseDOFLabeling ( )
int finley::NodeFile::createDenseNodeLabeling ( int *  node_distribution,
const int *  dof_distribution 
)
int finley::NodeFile::createDenseReducedLabeling ( int *  reducedMask,
bool  useNodes 
)
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 ( int *  index,
const NodeFile in 
)
std::pair< int, int > finley::NodeFile::getDOFRange ( ) const
int finley::NodeFile::getFirstNode ( )
inline
int finley::NodeFile::getFirstReducedNode ( )
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 ( )
inline
int finley::NodeFile::getGlobalNumReducedNodes ( )
inline
int finley::NodeFile::getLastNode ( )
inline
int finley::NodeFile::getLastReducedNode ( )
inline
int finley::NodeFile::getNumDegreesOfFreedom ( )
inline
int finley::NodeFile::getNumNodes ( )
inline
int finley::NodeFile::getNumReducedDegreesOfFreedom ( )
inline
int finley::NodeFile::getNumReducedNodes ( )
inline
int finley::NodeFile::prepareLabeling ( int *  mask,
std::vector< int > &  buffer,
std::vector< int > &  distribution,
bool  useNodes 
)
private
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* finley::NodeFile::degreesOfFreedomConnector
Paso_Distribution* finley::NodeFile::degreesOfFreedomDistribution
int* finley::NodeFile::degreesOfFreedomId
Finley_NodeMapping* finley::NodeFile::degreesOfFreedomMapping
int* finley::NodeFile::globalDegreesOfFreedom
int* finley::NodeFile::globalNodesIndex
int* finley::NodeFile::globalReducedDOFIndex

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

Referenced by allocTable(), createDenseReducedLabeling(), Finley_Mesh_addPoints(), Finley_Mesh_createDOFMappingAndCoupling(), Finley_Mesh_markDOFsConnectedToRange(), Finley_PrintMesh_Info(), freeTable(), and weipa::FinleyNodes::initFromFinley().

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_PrintMesh_Info(), freeTable(), and weipa::FinleyNodes::initFromFinley().

int* finley::NodeFile::Id
Esys_MPIInfo* finley::NodeFile::MPIInfo
Paso_Distribution* finley::NodeFile::nodesDistribution
Finley_NodeMapping* finley::NodeFile::nodesMapping
int finley::NodeFile::numDim
int finley::NodeFile::numNodes
Paso_Connector* finley::NodeFile::reducedDegreesOfFreedomConnector
Paso_Distribution* finley::NodeFile::reducedDegreesOfFreedomDistribution
int* finley::NodeFile::reducedDegreesOfFreedomId
Finley_NodeMapping* finley::NodeFile::reducedDegreesOfFreedomMapping
Paso_Distribution* finley::NodeFile::reducedNodesDistribution
int* finley::NodeFile::reducedNodesId

these are the packed versions of Id

Referenced by allocTable(), Finley_Mesh_createNodeFileMappings(), and freeTable().

Finley_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(), Finley_Mesh_getStatus(), gather_global(), and prepareLabeling().

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

vector of tags which are actually used

Referenced by freeTable(), and updateTagList().


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