escript
Revision_
|
#include <ElementFile.h>
Public Member Functions | |
ElementFile (const_ReferenceElementSet_ptr refElementSet, escript::JMPI mpiInfo) | |
~ElementFile () | |
destructor More... | |
void | allocTable (dim_t NE) |
allocates the element table within an element file to hold NE elements More... | |
void | freeTable () |
deallocates the element table within an element file More... | |
void | copyTable (index_t offset, index_t nodeOffset, index_t idOffset, const ElementFile *in) |
void | distributeByRankOfDOF (const std::vector< int > &mpiRankOfDOF, index_t *nodesId) |
redistributes the elements including overlap by rank More... | |
void | createColoring (const IndexVector &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 IndexVector &newNode, index_t offset) |
void | markNodes (std::vector< short > &mask, int offset, bool useLinear) |
void | gather (const index_t *index, const ElementFile *in) |
void | scatter (index_t *index, const ElementFile *in) |
void | setTags (const int newTag, const escript::Data &mask) |
ElementFile_Jacobians * | borrowJacobians (const NodeFile *, bool, bool) const |
std::pair< index_t, index_t > | getNodeRange () const |
void | updateTagList () |
Public Attributes | |
escript::JMPI | MPIInfo |
const_ReferenceElementSet_ptr | referenceElementSet |
the reference element to be used More... | |
dim_t | numElements |
number of elements More... | |
index_t * | Id |
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_t * | Nodes |
index_t * | Color |
index_t | minColor |
minimum color value More... | |
index_t | maxColor |
maximum color value More... | |
ElementFile_Jacobians * | jacobians |
jacobians of the shape function used for solution approximation More... | |
ElementFile_Jacobians * | jacobians_reducedS |
ElementFile_Jacobians * | jacobians_reducedQ |
ElementFile_Jacobians * | jacobians_reducedS_reducedQ |
Private Member Functions | |
void | swapTable (ElementFile *other) |
finley::ElementFile::ElementFile | ( | const_ReferenceElementSet_ptr | refSet, |
escript::JMPI | mpiInfo | ||
) |
constructor use ElementFile::allocTable to allocate the element table
finley::ElementFile::~ElementFile | ( | ) |
destructor
References Color, freeTable(), Id, Nodes, numElements, numNodes, Owner, and Tag.
void finley::ElementFile::allocTable | ( | dim_t | NE | ) |
allocates the element table within an element file to hold NE elements
allocates the element table within this element file to hold NE elements.
References Color, Id, INDEX2, Nodes, numNodes, Owner, and Tag.
Referenced by finley::FinleyDomain::addDiracPoints(), finley::FinleyDomain::createHex20(), finley::FinleyDomain::createHex8(), finley::FinleyDomain::createRec4(), finley::FinleyDomain::createRec8(), finley::FinleyDomain::load(), and finley::FinleyDomain::merge().
ElementFile_Jacobians * finley::ElementFile::borrowJacobians | ( | const NodeFile * | nodefile, |
bool | reducedShapefunction, | ||
bool | reducedIntegrationOrder | ||
) | const |
Referenced by finley::AssembleParameters::AssembleParameters().
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.
copies element file 'in' into this element file starting from 'offset'. The elements offset to in->numElements+offset-1 will be overwritten
Referenced by finley::FinleyDomain::merge().
void finley::ElementFile::createColoring | ( | const IndexVector & | dofMap | ) |
Tries to reduce the number of colours used to colour the elements.
Tries to reduce the number of colors used to color elements in this ElementFile
References Color, ESYS_ASSERT, INDEX2, maxColor, Nodes, and numElements.
Referenced by finley::FinleyDomain::createColoring().
void finley::ElementFile::distributeByRankOfDOF | ( | const std::vector< int > & | mpiRankOfDOF, |
index_t * | nodesId | ||
) |
redistributes the elements including overlap by rank
Referenced by finley::FinleyDomain::distributeByRankOfDOF().
void finley::ElementFile::freeTable | ( | ) |
deallocates the element table within an element file
deallocates the element table within this element file
Referenced by ~ElementFile().
void finley::ElementFile::gather | ( | const index_t * | index, |
const ElementFile * | in | ||
) |
|
inline |
returns the minimum and maximum reference number of nodes describing the elements
Referenced by finley::FinleyDomain::resolveNodeIds().
void finley::ElementFile::markNodes | ( | std::vector< short > & | mask, |
int | offset, | ||
bool | useLinear | ||
) |
Referenced by finley::FinleyDomain::markNodes().
void finley::ElementFile::optimizeOrdering | ( | ) |
reorders the elements so that they are stored close to the nodes
Referenced by finley::FinleyDomain::optimizeElementOrdering().
void finley::ElementFile::relabelNodes | ( | const IndexVector & | newNode, |
index_t | offset | ||
) |
assigns new node reference numbers to the elements. If k is the old node, the new node is newNode[k-offset].
Referenced by finley::FinleyDomain::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.
void finley::ElementFile::setTags | ( | const int | newTag, |
const escript::Data & | mask | ||
) |
References escript::Data::getSampleDataRO(), numElements, and Tag.
Referenced by finley::FinleyDomain::setTags().
|
private |
|
inline |
updates the list of tags in use. This method must be called by all ranks.
Referenced by finley::brick(), finley::FinleyDomain::load(), finley::rectangle(), and finley::FinleyDomain::updateTagList().
index_t* finley::ElementFile::Color |
assigns each element a color. Elements with the same color don't share a node so they can be processed simultaneously. At any time Color must provide a valid value. In any case one can set Color[e]=e for all e
Referenced by finley::FinleyDomain::addDiracPoints(), allocTable(), createColoring(), finley::FinleyDomain::dump(), weipa::FinleyElements::initFromFinley(), finley::FinleyDomain::load(), finley::FinleyDomain::printElementInfo(), and ~ElementFile().
index_t* finley::ElementFile::Id |
Id[i] is the id number of node i. This number is used when elements are resorted. In the entire code the term 'element id' refers to i and not to Id[i] unless explicitly stated otherwise.
Referenced by finley::FinleyDomain::addDiracPoints(), allocTable(), finley::FinleyDomain::borrowSampleReferenceIDs(), finley::FinleyDomain::createHex20(), finley::FinleyDomain::createHex8(), finley::FinleyDomain::createRec4(), finley::FinleyDomain::createRec8(), finley::FinleyDomain::dump(), weipa::FinleyElements::initFromFinley(), finley::FinleyDomain::load(), finley::FinleyDomain::printElementInfo(), finley::FinleyDomain::writeElementInfo(), and ~ElementFile().
ElementFile_Jacobians* finley::ElementFile::jacobians |
jacobians of the shape function used for solution approximation
ElementFile_Jacobians* finley::ElementFile::jacobians_reducedQ |
jacobians of the shape function used for solution approximation for reduced integration order
ElementFile_Jacobians* finley::ElementFile::jacobians_reducedS |
jacobians of the shape function used for solution approximation for reduced order of shape function
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
index_t finley::ElementFile::maxColor |
maximum color value
Referenced by finley::FinleyDomain::addDiracPoints(), createColoring(), and finley::FinleyDomain::load().
index_t finley::ElementFile::minColor |
minimum color value
Referenced by finley::FinleyDomain::addDiracPoints(), and finley::FinleyDomain::load().
escript::JMPI finley::ElementFile::MPIInfo |
index_t* finley::ElementFile::Nodes |
Nodes[INDEX(k, i, numNodes)] is the k-th node in the i-th element. Note that in the way the nodes are ordered Nodes[INDEX(k, i, numNodes) is the k-th node of element i when referring to the linear version of the mesh.
Referenced by finley::FinleyDomain::addDiracPoints(), allocTable(), createColoring(), finley::FinleyDomain::createHex20(), finley::FinleyDomain::createHex8(), finley::FinleyDomain::createRec4(), finley::FinleyDomain::createRec8(), finley::FinleyDomain::dump(), weipa::FinleyElements::initFromFinley(), finley::FinleyDomain::load(), optimizeOrdering(), finley::FinleyDomain::printElementInfo(), finley::FinleyDomain::writeElementInfo(), and ~ElementFile().
dim_t finley::ElementFile::numElements |
number of elements
Referenced by finley::FinleyDomain::addDiracPoints(), finley::AssembleParameters::AssembleParameters(), createColoring(), finley::FinleyDomain::dump(), finley::FinleyDomain::getDataShape(), weipa::FinleyElements::initFromFinley(), finley::FinleyDomain::printElementInfo(), finley::FinleyDomain::setOrders(), setTags(), finley::FinleyDomain::writeElementInfo(), and ~ElementFile().
int finley::ElementFile::numNodes |
number of nodes per element
Referenced by allocTable(), finley::AssembleParameters::AssembleParameters(), finley::FinleyDomain::createHex20(), finley::FinleyDomain::createHex8(), finley::FinleyDomain::createRec4(), finley::FinleyDomain::createRec8(), finley::FinleyDomain::dump(), weipa::FinleyElements::initFromFinley(), finley::FinleyDomain::printElementInfo(), finley::FinleyDomain::writeElementInfo(), and ~ElementFile().
int* finley::ElementFile::Owner |
Owner[i] contains the rank that owns element i.
Referenced by finley::FinleyDomain::addDiracPoints(), allocTable(), finley::FinleyDomain::createHex20(), finley::FinleyDomain::createHex8(), finley::FinleyDomain::createRec4(), finley::FinleyDomain::createRec8(), finley::FinleyDomain::dump(), weipa::FinleyElements::initFromFinley(), finley::FinleyDomain::load(), finley::FinleyDomain::printElementInfo(), and ~ElementFile().
const_ReferenceElementSet_ptr finley::ElementFile::referenceElementSet |
the reference element to be used
Referenced by finley::FinleyDomain::addDiracPoints(), finley::FinleyDomain::dump(), finley::FinleyDomain::getDataShape(), weipa::FinleyElements::initFromFinley(), finley::FinleyDomain::printElementInfo(), finley::FinleyDomain::setOrders(), and finley::FinleyDomain::writeElementInfo().
int* finley::ElementFile::Tag |
Tag[i] is the tag of element i.
Referenced by finley::FinleyDomain::addDiracPoints(), allocTable(), finley::FinleyDomain::createHex20(), finley::FinleyDomain::createHex8(), finley::FinleyDomain::createRec4(), finley::FinleyDomain::createRec8(), finley::FinleyDomain::dump(), finley::FinleyDomain::getTagFromSampleNo(), weipa::FinleyElements::initFromFinley(), finley::FinleyDomain::load(), finley::FinleyDomain::printElementInfo(), setTags(), finley::FinleyDomain::writeElementInfo(), and ~ElementFile().
std::vector<int> finley::ElementFile::tagsInUse |
array of tags which are actually used
Referenced by finley::FinleyDomain::borrowListOfTagsInUse(), and finley::FinleyDomain::getNumberOfTagsInUse().