This class organizes an element structure on a Geometry object and handles refinement. More...
#include <ElementTree.hpp>
This class organizes an element structure on a Geometry object and handles refinement.
This class implements a tree which realizes the refinement of the geometry. On the first level of refinement the leafs/elements are all patches of the geometry. Currently, the construction of the tree allows uniform refinement. In the refinement process each element get four sons and the neighborhood relations get updated.
The heart of the ElementTree is the leaf iterator which implements a Morton Z-curve. If an element get refined it gets replaced by it four sons element. This core routine can handle adaptive refinement but with some limitations in the resolution of neighborhood relations.
Definition at line 32 of file ElementTree.hpp.
Public Member Functions | |
ElementTree (const ElementTree &)=delete | |
Deleted copy constructor for the ElementTree class. More... | |
ElementTree (ElementTree &&)=delete | |
Deleted move constructor for the ElementTree class. More... | |
ElementTree & | operator= (const ElementTree &)=delete |
Deleted copy assignment operator for the ElementTree class. More... | |
ElementTree & | operator= (ElementTree &&)=delete |
Deleted move assignment operator for the ElementTree class. More... | |
ElementTree () | |
constructors More... | |
ElementTree (const Geometry &g, unsigned int max_level=0) | |
Explicit constructor for the ElementTree class. More... | |
void | init_ElementTree (const Geometry &g, unsigned int max_level) |
init More... | |
void | refineUniformly_recursion (ElementTreeNode &el) |
Refine the given element or it's sons. More... | |
void | refineUniformly () |
Refine all patches uniformly. | |
void | refinePatch (int patch) |
Refine a given patch. | |
Eigen::MatrixXd | generatePointList (Eigen::VectorXi *idct=nullptr) const |
Return the coordinates of all points of the elements. More... | |
Eigen::MatrixXi | generateElementList () const |
Return list of elements containing the indices of the vertices. More... | |
int | get_number_of_points () const |
getter More... | |
int | get_number_of_elements () const |
Return number of elements in the ElementTree. More... | |
int | get_max_level () const |
Return maximum level of refinement. More... | |
ElementTreeNode & | root () |
Return reference to the root ElementTreeNode. More... | |
const ElementTreeNode & | root () const |
Return const reference to the root ElementTreeNode. More... | |
const PatchVector & | get_geometry () const |
Return const reference to the Geometry. More... | |
ElementTreeNode::const_iterator | pbegin () const |
iterators More... | |
ElementTreeNode::const_iterator | pend () const |
Returns an iterator one past the end of the sequence represented by the leafs as ElementTreeNodes of the ElementTree. More... | |
ElementTreeNode::const_iterator | cpbegin () const |
Returns an iterator to the beginning of the sequence represented by the leafs as ElementTreeNodes of the ElementTree. More... | |
ElementTreeNode::const_iterator | cpend () const |
Returns an iterator one past the end of the sequence represented by the leafs as ElementTreeNodes of the ElementTree. More... | |
ElementTreeNode::const_iterator | cluster_begin (const ElementTreeNode &cl) const |
Returns a cluster iterator to the beginning of the sequence represented by the the given ElementTreeNode. More... | |
ElementTreeNode::const_iterator | cluster_end (const ElementTreeNode &cl) const |
Returns a cluster iterator one past the end of the sequence represented by the the given ElementTreeNode. More... | |
Eigen::MatrixXd | computeElementEnclosings () |
Computes enclosing balls surrounding all elements. More... | |
void | computeElementEnclosings_recursion (ElementTreeNode &el, const Eigen::MatrixXd &P) |
Computes enclosing balls of one element and all its sons. More... | |
void | printPanels () const |
Prints all Elements of the Tree. | |
Eigen::MatrixXd | generateMidpointList () const |
other Stuff More... | |
Eigen::MatrixXd | generateRadiusList () const |
Return a matrix with all radii of the element enclosing. More... | |
Eigen::VectorXi | generateElementLabels () const |
Return a vector with computed global indices of the elements. More... | |
Eigen::VectorXi | generatePatchBoundaryLabels () const |
Generate list of labels if elements are on the patch boundary or at the boundary of the geometry. More... | |
Eigen::VectorXi | identifyPatch (unsigned int pn) const |
Generate list of labels if elements contained within a given patch. More... | |
std::vector< std::array< int, 4 > > | patchTopologyInfo () const |
Resolves neighborhood relations of the patches. More... | |
std::vector< int > | computeReorderingVector () const |
The ordering of elements in the element tree does not correspond to the element order underlying the coefficient vector. This reordering can be computed for look ups by this function. More... | |
size_t | compute_global_id (const ElementTreeNode &el) const |
|
delete |
Deleted copy constructor for the ElementTree class.
This copy constructor is explicitly deleted to prevent copying of ElementTree objects.
|
delete |
Deleted move constructor for the ElementTree class.
This move constructor is explicitly deleted to prevent moving of ElementTree objects.
|
inline |
constructors
Default constructor for the ElementTree class.
Definition at line 76 of file ElementTree.hpp.
|
inlineexplicit |
Explicit constructor for the ElementTree class.
This constructor initializes an ElementTree object for the provided geometry and maximum level. Currently this constructor is implemented for uniform refinement.
g | The geometry object defining the patches. |
max_level | (optional) The maximum level of the ElementTree. Default is 0. |
Definition at line 88 of file ElementTree.hpp.
|
inline |
Returns a cluster iterator to the beginning of the sequence represented by the the given ElementTreeNode.
cl | Const reference to the ElementTreeNode to start the iterator. |
Definition at line 331 of file ElementTree.hpp.
|
inline |
Returns a cluster iterator one past the end of the sequence represented by the the given ElementTreeNode.
cl | Const reference to the ElementTreeNode to start the iterator. |
Definition at line 342 of file ElementTree.hpp.
|
inline |
Computes enclosing balls surrounding all elements.
This functions sets the parameters midpoint_ radius_ of the ElementTreeNode objects stored in the tree.
Definition at line 354 of file ElementTree.hpp.
|
inline |
Computes enclosing balls of one element and all its sons.
el | ElementTreeNode to start the recursion. |
P | Point list of the vertices. |
Definition at line 368 of file ElementTree.hpp.
|
inline |
The ordering of elements in the element tree does not correspond to the element order underlying the coefficient vector. This reordering can be computed for look ups by this function.
Limitation to the uniform case!
Definition at line 544 of file ElementTree.hpp.
|
inline |
Returns an iterator to the beginning of the sequence represented by the leafs as ElementTreeNodes of the ElementTree.
Definition at line 316 of file ElementTree.hpp.
|
inline |
Returns an iterator one past the end of the sequence represented by the leafs as ElementTreeNodes of the ElementTree.
Definition at line 323 of file ElementTree.hpp.
|
inline |
Return a vector with computed global indices of the elements.
Definition at line 447 of file ElementTree.hpp.
|
inline |
Return list of elements containing the indices of the vertices.
This function stores all indices of an element in the column of the returned matrix.
Definition at line 240 of file ElementTree.hpp.
|
inline |
other Stuff
Return a matrix with all midpoints of the elements.
Definition at line 417 of file ElementTree.hpp.
|
inline |
Generate list of labels if elements are on the patch boundary or at the boundary of the geometry.
The value at the index of the element is 1 if the element is at the patch boundary and there is a neighbor patch. If there is no neighbor patch then the value is -1.
Definition at line 467 of file ElementTree.hpp.
|
inline |
Return the coordinates of all points of the elements.
This function iterates all elements and returns the coordinates of the vertices.
idct | Pointer to an Eigen::VectorXi to count how often a vertex is part of all elements. |
Definition at line 206 of file ElementTree.hpp.
|
inline |
Return a matrix with all radii of the element enclosing.
Definition at line 432 of file ElementTree.hpp.
|
inline |
Return const reference to the Geometry.
Definition at line 288 of file ElementTree.hpp.
|
inline |
Return maximum level of refinement.
Definition at line 270 of file ElementTree.hpp.
|
inline |
Return number of elements in the ElementTree.
Definition at line 264 of file ElementTree.hpp.
|
inline |
getter
Return number of points in the ElementTree.
Definition at line 258 of file ElementTree.hpp.
|
inline |
Generate list of labels if elements contained within a given patch.
The value at the index of the element is 1 if the element is contained within the given patch. Otherwise its zero.
Definition at line 492 of file ElementTree.hpp.
|
inline |
init
This function initializes the ElementTree
First Each Patch becomes an ElementTreeNode. After resolving the patch neighborhood relations each patch gets refined to the common maximum level of refinement.
g | The geometry object defining the patches. |
max_level | (optional) The maximum level of the ElementTree. Default is 0. |
Definition at line 105 of file ElementTree.hpp.
|
delete |
Deleted copy assignment operator for the ElementTree class.
This copy assignment operator is explicitly deleted to prevent copying of ElementTree objects.
|
delete |
Deleted move assignment operator for the ElementTree class.
This move assignment operator is explicitly deleted to prevent moving of ElementTree objects.
|
inline |
Resolves neighborhood relations of the patches.
Definition at line 510 of file ElementTree.hpp.
|
inline |
iterators
Returns an iterator to the beginning of the sequence represented by the leafs as ElementTreeNodes of the ElementTree.
Definition at line 298 of file ElementTree.hpp.
|
inline |
Returns an iterator one past the end of the sequence represented by the leafs as ElementTreeNodes of the ElementTree.
Definition at line 307 of file ElementTree.hpp.
|
inline |
Refine the given element or it's sons.
This function refines an element recursively. If the given element is already refined than iterate all sons and refine them and so on.
Definition at line 169 of file ElementTree.hpp.
|
inline |
Return reference to the root ElementTreeNode.
Definition at line 276 of file ElementTree.hpp.
|
inline |
Return const reference to the root ElementTreeNode.
Definition at line 282 of file ElementTree.hpp.