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

#include <ElementFile.h>

List of all members.

Public Member Functions

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

Public Attributes

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

Private Member Functions

void swapTable (ElementFile *other)

Constructor & Destructor Documentation


Member Function Documentation

void finley::ElementFile::allocTable ( int  numElements)
ElementFile_Jacobians * finley::ElementFile::borrowJacobians ( const NodeFile nodefile,
bool  reducedShapefunction,
bool  reducedIntegrationOrder 
) const
void finley::ElementFile::copyTable ( int  offset,
int  nodeOffset,
int  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< int > &  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,
int *  Id 
)

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 ( int *  index,
const ElementFile in 
)
std::pair< int, int > finley::ElementFile::getNodeRange ( ) const [inline]

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

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

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

void finley::ElementFile::markDOFsConnectedToRange ( int *  mask,
int  offset,
int  marker,
int  firstDOF,
int  lastDOF,
const int *  dofIndex,
bool  useLinear 
)
void finley::ElementFile::markNodes ( std::vector< short > &  mask,
int  offset,
bool  useLinear 
)
void finley::ElementFile::relabelNodes ( const std::vector< int > &  newNode,
int  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 ( int *  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]

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

References MPIInfo, numElements, finley::util::setValuesInUse(), Tag, and tagsInUse.

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


Member Data Documentation

jacobians of the shape function used for solution approximation

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

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

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

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

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

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

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


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