Flow123d
DF_patch_fe_data_tables-da7858b
|
#include <duplicate_nodes.h>
Public Member Functions | |
DuplicateNodes (MeshBase *mesh) | |
MeshBase * | mesh () const |
unsigned int | n_nodes () const |
const std::vector< unsigned int > & | node_dim () const |
const std::vector< MeshObject > & | objects (unsigned int dim) const |
const std::vector< unsigned int > & | obj_4_el () const |
const std::vector< unsigned int > & | obj_4_edg () const |
Private Member Functions | |
void | init_nodes () |
Initialize the vector of nodes from mesh. More... | |
void | init_from_edges () |
Initialize objects from mesh edges. More... | |
void | init_from_elements () |
Initialize objects from mesh elements. More... | |
void | duplicate_nodes () |
Duplicate nodes that are lying on interfaces with fractures. More... | |
Private Attributes | |
MeshBase * | mesh_ |
The mesh object. More... | |
unsigned int | n_duplicated_nodes_ |
Number of nodes (including duplicated ones). More... | |
std::vector< unsigned int > | node_dim_ |
Vector of space dimensions of elements using the particular duplicated node. More... | |
std::vector< MeshObject > | objects_ [4] |
Array of n-faces by their dimension. More... | |
std::vector< unsigned int > | obj_4_el_ |
std::vector< unsigned int > | obj_4_edg_ |
Vector of object indices for each mesh edge. More... | |
Class DuplicateNodes constructs the graph structure of elements, their faces and nodes without any other data such as coordinates or region numbers. The nodes are then duplicated where the elements are separated by fractures (elements of lower dim.). E.g.:
Consider a domain containing fracture like this: +--—+--—+ | | |
+ |
---|
+--------—+
with the mesh nodes numbered as follows: 0--—1--—2 | | |
3 |
---|
4--------—5
The class duplicates node 1 and node 3 because in these nodes FE functions can be discontinuous (schematic view): 0-6 1 7-2 | \ | / | | \ 3 / | | \ / | | 8 | | | 4--------—5
Now, nodes 1,6,7 have the same coordinates but belong to different groups of elements and analogously nodes 3 and 8.
The structure is used in DOF handler to distribute dofs for FE spaces sharing dofs between elements.
TODO: Currently we do not create faces of faces, i.e. 1d edges of tetrahedra are not available. This should be implemented if we need to distribute dofs on edges.
Definition at line 96 of file duplicate_nodes.h.
DuplicateNodes::DuplicateNodes | ( | MeshBase * | mesh | ) |
Definition at line 36 of file duplicate_nodes.cc.
|
private |
Duplicate nodes that are lying on interfaces with fractures.
The main functionality of the class creates duplicate nodes at interfaces with fractures.
For each node: 1) Create the lists of elements (node_elements) sharing the node. 2) Divide node_elements into groups (components) connected by edges. 3) If more than one component was created, create for each extra component a new node and update its index in the elements from this component. Also set node_dim_ (dimension of elements using the node).
Definition at line 98 of file duplicate_nodes.cc.
|
private |
Initialize objects from mesh edges.
Definition at line 57 of file duplicate_nodes.cc.
|
private |
Initialize objects from mesh elements.
Definition at line 71 of file duplicate_nodes.cc.
|
private |
Initialize the vector of nodes from mesh.
Definition at line 48 of file duplicate_nodes.cc.
|
inline |
Definition at line 102 of file duplicate_nodes.h.
|
inline |
|
inline |
|
inline |
Definition at line 111 of file duplicate_nodes.h.
|
inline |
|
inline |
|
private |
The mesh object.
Definition at line 130 of file duplicate_nodes.h.
|
private |
Number of nodes (including duplicated ones).
Definition at line 133 of file duplicate_nodes.h.
|
private |
Vector of space dimensions of elements using the particular duplicated node.
Definition at line 136 of file duplicate_nodes.h.
|
private |
Vector of object indices for each mesh edge.
Definition at line 148 of file duplicate_nodes.h.
|
private |
Vector of object indices for each mesh element. For an element with index el_idx, obj_4_el_[el_idx] is the index of the corresponding object in the vector tetras_/triangles_/lines_/points_, depending on the element dimension.
Definition at line 145 of file duplicate_nodes.h.
|
private |
Array of n-faces by their dimension.
Definition at line 139 of file duplicate_nodes.h.