escript
Revision_
|
#include <ElementFile.h>
Public Member Functions | |
ElementFile (ElementTypeId etype, escript::JMPI mpiInfo) | |
~ElementFile () | |
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 | print (const index_t *nodesId) const |
prints information about this element file to stdout More... | |
void | distributeByRankOfDOF (const int *mpiRankOfDOF, const index_t *nodesId) |
redistributes the elements including overlap by rank More... | |
void | createColoring (dim_t numNodes, const index_t *degreeOfFreedom) |
void | optimizeOrdering () |
reorders the elements so that they are stored close to the nodes More... | |
void | relabelNodes (const index_t *newNode, index_t offset) |
void | markNodes (std::vector< short > &mask, index_t offset) const |
void | gather (const index_t *index, const ElementFile *in) |
void | setTags (int newTag, const escript::Data &mask) |
sets element tags to newTag where mask > 0 More... | |
ElementFile_Jacobians * | borrowJacobians (const NodeFile *nodes, bool reducedOrder) const |
std::pair< index_t, index_t > | getNodeRange () const |
void | updateTagList () |
Public Attributes | |
escript::JMPI | MPIInfo |
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 |
Nodes[INDEX(k, i, numNodes)] is the k-th node in the i-th element. More... | |
index_t * | Color |
index_t | minColor |
minimum color value More... | |
index_t | maxColor |
maximum color value More... | |
int | numDim |
number of spatial dimensions of the domain More... | |
int | numLocalDim |
dimension of the element e.g. 2 for a line in 2D or 3D More... | |
ElementTypeId | etype |
element type ID More... | |
const char * | ename |
name of element type More... | |
int | numShapes |
number of shape functions More... | |
Private Member Functions | |
void | swapTable (ElementFile *other) |
Private Attributes | |
ElementFile_Jacobians * | jacobians |
jacobians of the shape function used for solution approximation More... | |
ElementFile_Jacobians * | jacobians_reducedQ |
dudley::ElementFile::ElementFile | ( | ElementTypeId | etype, |
escript::JMPI | mpiInfo | ||
) |
References dudley::Dims, dudley::getElementName(), and dudley::localDims.
dudley::ElementFile::~ElementFile | ( | ) |
void dudley::ElementFile::allocTable | ( | dim_t | NE | ) |
allocates the element table within an element file to hold NE elements
References Color, Id, INDEX2, Nodes, numNodes, Owner, and Tag.
Referenced by dudley::DudleyDomain::create2D(), dudley::DudleyDomain::create3D(), and dudley::DudleyDomain::load().
ElementFile_Jacobians * dudley::ElementFile::borrowJacobians | ( | const NodeFile * | nodes, |
bool | reducedOrder | ||
) | const |
References dudley::ElementFile_Jacobians::absD, dudley::Assemble_jacobians_2D(), dudley::Assemble_jacobians_2D_M1D_E1D(), dudley::NodeFile::Coordinates, dudley::ElementFile_Jacobians::DSDX, Id, Nodes, numElements, numLocalDim, numNodes, dudley::ElementFile_Jacobians::numQuad, and dudley::ElementFile_Jacobians::quadweight.
void dudley::ElementFile::copyTable | ( | index_t | offset, |
index_t | nodeOffset, | ||
index_t | idOffset, | ||
const ElementFile * | in | ||
) |
void dudley::ElementFile::createColoring | ( | dim_t | numNodes, |
const index_t * | degreeOfFreedom | ||
) |
Tries to reduce the number of colors used to color elements in this ElementFile
References Color, ESYS_ASSERT, INDEX2, maxColor, Nodes, and numElements.
void dudley::ElementFile::distributeByRankOfDOF | ( | const int * | mpiRankOfDOF, |
const index_t * | nodesId | ||
) |
redistributes the elements including overlap by rank
void dudley::ElementFile::freeTable | ( | ) |
deallocates the element table within an element file
void dudley::ElementFile::gather | ( | const index_t * | index, |
const ElementFile * | in | ||
) |
gathers the elements from the element file in
using index[0:out->elements-1]. index
has to be between 0 and in->numElements-1. A conservative assumption on the colouring is made.
|
inline |
returns the minimum and maximum reference number of nodes describing the elements
void dudley::ElementFile::markNodes | ( | std::vector< short > & | mask, |
index_t | offset | ||
) | const |
References INDEX2, Nodes, numElements, and numNodes.
Referenced by dudley::DudleyDomain::markNodes().
void dudley::ElementFile::optimizeOrdering | ( | ) |
void dudley::ElementFile::print | ( | const index_t * | nodesId | ) | const |
prints information about this element file to stdout
void dudley::ElementFile::relabelNodes | ( | const index_t * | 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 dudley::DudleyDomain::relabelElementNodes().
void dudley::ElementFile::setTags | ( | int | newTag, |
const escript::Data & | mask | ||
) |
sets element tags to newTag where mask > 0
Referenced by dudley::DudleyDomain::setTags().
|
private |
|
inline |
Referenced by dudley::DudleyDomain::load().
index_t* dudley::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 allocTable(), createColoring(), dudley::DudleyDomain::dump(), weipa::FinleyElements::initFromDudley(), dudley::DudleyDomain::load(), and dudley::DudleyDomain::printElementInfo().
const char* dudley::ElementFile::ename |
name of element type
Referenced by dudley::DudleyDomain::printElementInfo(), and dudley::DudleyDomain::writeElementInfo().
ElementTypeId dudley::ElementFile::etype |
element type ID
Referenced by dudley::DudleyDomain::dump(), weipa::FinleyElements::initFromDudley(), and dudley::DudleyDomain::printElementInfo().
index_t* dudley::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 allocTable(), borrowJacobians(), dudley::DudleyDomain::borrowSampleReferenceIDs(), copyTable(), dudley::DudleyDomain::create2D(), dudley::DudleyDomain::create3D(), dudley::DudleyDomain::dump(), weipa::FinleyElements::initFromDudley(), dudley::DudleyDomain::load(), dudley::DudleyDomain::printElementInfo(), and dudley::DudleyDomain::writeElementInfo().
|
private |
jacobians of the shape function used for solution approximation
|
private |
jacobians of the shape function used for solution approximation for reduced integration order
index_t dudley::ElementFile::maxColor |
maximum color value
Referenced by createColoring(), and dudley::DudleyDomain::load().
index_t dudley::ElementFile::minColor |
minimum color value
Referenced by dudley::DudleyDomain::load().
escript::JMPI dudley::ElementFile::MPIInfo |
index_t* dudley::ElementFile::Nodes |
Nodes[INDEX(k, i, numNodes)] is the k-th node in the i-th element.
Referenced by allocTable(), borrowJacobians(), copyTable(), dudley::DudleyDomain::create2D(), dudley::DudleyDomain::create3D(), createColoring(), dudley::DudleyDomain::dump(), weipa::FinleyElements::initFromDudley(), dudley::DudleyDomain::load(), markNodes(), optimizeOrdering(), dudley::DudleyDomain::printElementInfo(), and dudley::DudleyDomain::writeElementInfo().
int dudley::ElementFile::numDim |
number of spatial dimensions of the domain
Referenced by dudley::ElementFile_Jacobians::~ElementFile_Jacobians().
dim_t dudley::ElementFile::numElements |
number of elements
Referenced by borrowJacobians(), createColoring(), dudley::DudleyDomain::dump(), dudley::DudleyDomain::getDataShape(), weipa::FinleyElements::initFromDudley(), markNodes(), dudley::DudleyDomain::printElementInfo(), dudley::DudleyDomain::writeElementInfo(), and dudley::ElementFile_Jacobians::~ElementFile_Jacobians().
int dudley::ElementFile::numLocalDim |
dimension of the element e.g. 2 for a line in 2D or 3D
Referenced by borrowJacobians(), and dudley::DudleyDomain::getDataShape().
int dudley::ElementFile::numNodes |
number of nodes per element
Referenced by allocTable(), borrowJacobians(), copyTable(), dudley::DudleyDomain::create2D(), dudley::DudleyDomain::create3D(), dudley::DudleyDomain::dump(), weipa::FinleyElements::initFromDudley(), markNodes(), optimizeOrdering(), dudley::DudleyDomain::printElementInfo(), and dudley::DudleyDomain::writeElementInfo().
int dudley::ElementFile::numShapes |
number of shape functions
int* dudley::ElementFile::Owner |
Owner[i] contains the rank that owns element i.
Referenced by allocTable(), copyTable(), dudley::DudleyDomain::create2D(), dudley::DudleyDomain::create3D(), dudley::DudleyDomain::dump(), weipa::FinleyElements::initFromDudley(), dudley::DudleyDomain::load(), and dudley::DudleyDomain::printElementInfo().
int* dudley::ElementFile::Tag |
Tag[i] is the tag of element i.
Referenced by allocTable(), copyTable(), dudley::DudleyDomain::create2D(), dudley::DudleyDomain::create3D(), dudley::DudleyDomain::dump(), dudley::DudleyDomain::getTagFromSampleNo(), weipa::FinleyElements::initFromDudley(), dudley::DudleyDomain::load(), dudley::DudleyDomain::printElementInfo(), and dudley::DudleyDomain::writeElementInfo().
std::vector<int> dudley::ElementFile::tagsInUse |
array of tags which are actually used
Referenced by dudley::DudleyDomain::borrowListOfTagsInUse(), and dudley::DudleyDomain::getNumberOfTagsInUse().