escript  Revision_Unversioneddirectory
Public Member Functions | Public Attributes | Private Member Functions | List of all members
finley::ElementFile Class Reference

#include <ElementFile.h>

Public Member Functions

 ElementFile (const_ReferenceElementSet_ptr refElementSet, esysUtils::JMPI &mpiInfo)
 
 ~ElementFile ()
 destructor More...
 
void allocTable (dim_t numElements)
 allocates the element table within this element file to hold NE elements. More...
 
void freeTable ()
 deallocates the element table within this element file More...
 
void distributeByRankOfDOF (const std::vector< int > &mpiRankOfDOF, index_t *Id)
 redistributes the elements including overlap by rank More...
 
void createColoring (const std::vector< index_t > &dofMap)
 Tries to reduce the number of colours used to colour the elements. More...
 
void optimizeOrdering ()
 reorders the elements so that they are stored close to the nodes More...
 
void relabelNodes (const std::vector< index_t > &newNode, index_t offset)
 assigns new node reference numbers to the elements More...
 
void markNodes (std::vector< short > &mask, int offset, bool useLinear)
 
void scatter (index_t *index, const ElementFile *in)
 
void gather (index_t *index, const ElementFile *in)
 
void copyTable (index_t offset, index_t nodeOffset, index_t idOffset, const ElementFile *in)
 
void markDOFsConnectedToRange (int *mask, int offset, int marker, index_t firstDOF, index_t lastDOF, const index_t *dofIndex, bool useLinear)
 
void setTags (const int newTag, const escript::Data &mask)
 
ElementFile_JacobiansborrowJacobians (const NodeFile *, bool, bool) const
 
std::pair< index_t, index_tgetNodeRange () const
 
void updateTagList ()
 

Public Attributes

esysUtils::JMPI MPIInfo
 
const_ReferenceElementSet_ptr referenceElementSet
 the reference element to be used More...
 
dim_t numElements
 number of elements More...
 
index_tId
 
int * Tag
 Tag[i] is the tag of element i. More...
 
int * Owner
 Owner[i] contains the rank that owns element i. More...
 
std::vector< int > tagsInUse
 array of tags which are actually used More...
 
int numNodes
 number of nodes per element More...
 
index_tNodes
 
int * Color
 
int minColor
 minimum color More...
 
int maxColor
 maximum color More...
 
ElementFile_Jacobiansjacobians
 jacobians of the shape function used for solution approximation More...
 
ElementFile_Jacobiansjacobians_reducedS
 
ElementFile_Jacobiansjacobians_reducedQ
 
ElementFile_Jacobiansjacobians_reducedS_reducedQ
 

Private Member Functions

void swapTable (ElementFile *other)
 

Constructor & Destructor Documentation

finley::ElementFile::ElementFile ( const_ReferenceElementSet_ptr  refSet,
esysUtils::JMPI mpiInfo 
)
finley::ElementFile::~ElementFile ( )

Member Function Documentation

void finley::ElementFile::allocTable ( dim_t  numElements)
ElementFile_Jacobians * finley::ElementFile::borrowJacobians ( const NodeFile nodefile,
bool  reducedShapefunction,
bool  reducedIntegrationOrder 
) const
void finley::ElementFile::copyTable ( index_t  offset,
index_t  nodeOffset,
index_t  idOffset,
const ElementFile in 
)

copies element file 'in' into this element file starting from 'offset'. The elements offset to in->numElements+offset-1 will be overwritten

References Id, INDEX2, Nodes, numElements, numNodes, Owner, finley::setError(), Tag, and TYPE_ERROR.

Referenced by finley::Mesh::joinFaces(), and finley::Mesh_merge().

void finley::ElementFile::createColoring ( const std::vector< index_t > &  dofMap)

Tries to reduce the number of colours used to colour the elements.

References Color, finley::util::getMinMaxInt(), INDEX2, maxColor, minColor, Nodes, numElements, and numNodes.

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

void finley::ElementFile::distributeByRankOfDOF ( const std::vector< int > &  mpiRankOfDOF,
index_t Id 
)

redistributes the elements including overlap by rank

References allocTable(), ESYS_MPI_INC_COUNTER, FALSE, Id, INDEX2, MPI_INT, MPIInfo, Nodes, numElements, numNodes, Owner, Tag, and TRUE.

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

void finley::ElementFile::freeTable ( )

deallocates the element table within this element file

References Color, Id, maxColor, minColor, Nodes, numElements, Owner, Tag, and tagsInUse.

Referenced by allocTable(), and ~ElementFile().

void finley::ElementFile::gather ( index_t index,
const ElementFile in 
)
std::pair< index_t, index_t > finley::ElementFile::getNodeRange ( ) const
inline

returns the minimum and maximum reference number of nodes describing the elements

References finley::util::getMinMaxInt(), ripley::Nodes, and finley::ElementFile_Jacobians::numElements.

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

void finley::ElementFile::markDOFsConnectedToRange ( int *  mask,
int  offset,
int  marker,
index_t  firstDOF,
index_t  lastDOF,
const index_t dofIndex,
bool  useLinear 
)
void finley::ElementFile::markNodes ( std::vector< short > &  mask,
int  offset,
bool  useLinear 
)
void finley::ElementFile::optimizeOrdering ( )
void finley::ElementFile::relabelNodes ( const std::vector< index_t > &  newNode,
index_t  offset 
)

assigns new node reference numbers to the elements

assigns new node reference numbers to the elements. If k is the old node, the new node is newNode[k-offset].

References INDEX2, Nodes, numElements, and numNodes.

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

void finley::ElementFile::scatter ( index_t index,
const ElementFile in 
)

scatters the ElementFile in into this ElementFile. A conservative assumption on the coloring is made.

References Color, Id, INDEX2, maxColor, minColor, Nodes, numElements, numNodes, Owner, and Tag.

void finley::ElementFile::setTags ( const int  newTag,
const escript::Data mask 
)
void finley::ElementFile::swapTable ( ElementFile other)
private
void finley::ElementFile::updateTagList ( )
inline

updates the list of tags in use. This method must be called by all ranks.

References finley::ElementFile_Jacobians::numElements, and finley::util::setValuesInUse().

Referenced by finley::brick(), finley::loadMesh(), finley::rectangle(), setTags(), and finley::Mesh::updateTagList().

Member Data Documentation

int* finley::ElementFile::Color
index_t* finley::ElementFile::Id
ElementFile_Jacobians* finley::ElementFile::jacobians

jacobians of the shape function used for solution approximation

Referenced by ElementFile(), and ~ElementFile().

ElementFile_Jacobians* finley::ElementFile::jacobians_reducedQ

jacobians of the shape function used for solution approximation for reduced integration order

Referenced by ElementFile(), and ~ElementFile().

ElementFile_Jacobians* finley::ElementFile::jacobians_reducedS

jacobians of the shape function used for solution approximation for reduced order of shape function

Referenced by ElementFile(), and ~ElementFile().

ElementFile_Jacobians* finley::ElementFile::jacobians_reducedS_reducedQ

jacobians of the shape function used for solution approximation for reduced integration order and reduced order of shape function

Referenced by ElementFile(), and ~ElementFile().

int finley::ElementFile::maxColor
int finley::ElementFile::minColor
esysUtils::JMPI finley::ElementFile::MPIInfo
index_t* finley::ElementFile::Nodes
dim_t finley::ElementFile::numElements
int finley::ElementFile::numNodes
int* finley::ElementFile::Owner
const_ReferenceElementSet_ptr finley::ElementFile::referenceElementSet
int* finley::ElementFile::Tag
std::vector<int> finley::ElementFile::tagsInUse

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