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

#include <ElementFile.h>

Public Member Functions

 ElementFile (Finley_ReferenceElementSet *referenceElementSet, 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 (int *mpiRankOfDOF, int *Id)
 redistributes the elements including overlap by rank
void createColoring (int nodeCount, int *degreeOfFreedom)
 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 (int *newNode, int offset)
 assigns new node reference numbers to the elements
void markNodes (int *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, 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
Finley_ReferenceElementSetreferenceElementSet
 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 minColor
 minimum color
int maxColor
 maximum color
int * 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

finley::ElementFile::ElementFile ( Finley_ReferenceElementSet refSet,
Esys_MPIInfo mpiInfo 
)
finley::ElementFile::~ElementFile ( )

Member Function Documentation

void finley::ElementFile::allocTable ( int  numElements)
ElementFile_Jacobians * finley::ElementFile::borrowJacobians ( const NodeFile nodefile,
bool  reducedShapefunction,
bool  reducedIntegrationOrder 
) const

References finley::Assemble_jacobians_1D(), finley::Assemble_jacobians_2D(), finley::Assemble_jacobians_2D_M1D_E1D(), finley::Assemble_jacobians_2D_M1D_E1D_C(), finley::Assemble_jacobians_2D_M1D_E2D(), finley::Assemble_jacobians_2D_M1D_E2D_C(), finley::Assemble_jacobians_3D(), finley::Assemble_jacobians_3D_M2D_E2D(), finley::Assemble_jacobians_3D_M2D_E2D_C(), finley::Assemble_jacobians_3D_M2D_E3D(), finley::Assemble_jacobians_3D_M2D_E3D_C(), finley::ElementFile_Jacobians::BasisFunctions, finley::NodeFile::Coordinates, Finley_ReferenceElement::DBasisFunctionDv, Finley_ShapeFunction::dSdv, finley::ElementFile_Jacobians::DSDX, Finley_noError(), Finley_ReferenceElementSet_borrowParametrization(), Finley_ReferenceElementSet_borrowReferenceElement(), Finley_setError(), Id, jacobians, jacobians_reducedQ, jacobians_reducedS, jacobians_reducedS_reducedQ, Finley_ReferenceElementInfo::linearNodes, Finley_ReferenceElement::LinearType, finley::ElementFile_Jacobians::node_selection, Nodes, finley::ElementFile_Jacobians::numDim, Finley_ShapeFunctionInfo::numDim, finley::NodeFile::numDim, finley::ElementFile_Jacobians::numElements, numElements, Finley_ReferenceElement::numLocalDim, numNodes, Finley_ReferenceElement::numNodes, Finley_ShapeFunction::numQuadNodes, finley::ElementFile_Jacobians::numQuadTotal, Finley_ShapeFunctionInfo::numShapes, finley::ElementFile_Jacobians::numShapesTotal, finley::ElementFile_Jacobians::numSides, Finley_ReferenceElementInfo::numSides, finley::ElementFile_Jacobians::numSub, Finley_ReferenceElementInfo::numSubElements, finley::ElementFile_Jacobians::offsets, Finley_ReferenceElementInfo::offsets, Finley_ShapeFunction::QuadWeights, referenceElementSet, finley::ElementFile_Jacobians::status, finley::NodeFile::status, Finley_ReferenceElementInfo::subElementNodes, SYSTEM_ERROR, Finley_ShapeFunction::Type, Finley_ReferenceElement::Type, and finley::ElementFile_Jacobians::volume.

Referenced by finley::Assemble_gradient(), finley::Assemble_integrate(), and finley::AssembleParameters::AssembleParameters().

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 Finley_setError(), Id, INDEX2, Nodes, numElements, numNodes, Owner, Tag, and TYPE_ERROR.

Referenced by Finley_Mesh_merge().

void finley::ElementFile::createColoring ( int  nodeCount,
int *  degreeOfFreedom 
)

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 ( int *  mpiRankOfDOF,
int *  Id 
)
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 ( 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,
int *  dofIndex,
bool  useLinear 
)
void finley::ElementFile::markNodes ( int *  mask,
int  offset,
bool  useLinear 
)
void finley::ElementFile::optimizeOrdering ( )
void finley::ElementFile::relabelNodes ( 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_relableElementNodes().

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
void finley::ElementFile::updateTagList ( )
inline

Member Data Documentation

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

jacobians of the shape function used for solution approximation

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

ElementFile_Jacobians* finley::ElementFile::jacobians_reducedQ

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

Referenced by borrowJacobians(), 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 borrowJacobians(), 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 borrowJacobians(), ElementFile(), and ~ElementFile().

int finley::ElementFile::maxColor
int finley::ElementFile::minColor
Esys_MPIInfo* finley::ElementFile::MPIInfo
int* finley::ElementFile::Nodes
int finley::ElementFile::numElements
int finley::ElementFile::numNodes
int* finley::ElementFile::Owner
Finley_ReferenceElementSet* finley::ElementFile::referenceElementSet
int* finley::ElementFile::Tag
std::vector<int> finley::ElementFile::tagsInUse

array of tags which are actually used

Referenced by freeTable(), swapTable(), and updateTagList().


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