Flow123d  DF_patch_fe_data_tables-dc3adc1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
DuplicateNodes Class Reference

#include <duplicate_nodes.h>

Collaboration diagram for DuplicateNodes:
Collaboration graph
[legend]

Public Member Functions

 DuplicateNodes (MeshBase *mesh)
 
MeshBasemesh () 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

MeshBasemesh_
 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< MeshObjectobjects_ [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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ DuplicateNodes()

DuplicateNodes::DuplicateNodes ( MeshBase mesh)

Definition at line 36 of file duplicate_nodes.cc.

Member Function Documentation

◆ duplicate_nodes()

void DuplicateNodes::duplicate_nodes ( )
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.

Here is the caller graph for this function:

◆ init_from_edges()

void DuplicateNodes::init_from_edges ( )
private

Initialize objects from mesh edges.

Definition at line 57 of file duplicate_nodes.cc.

Here is the caller graph for this function:

◆ init_from_elements()

void DuplicateNodes::init_from_elements ( )
private

Initialize objects from mesh elements.

Definition at line 71 of file duplicate_nodes.cc.

Here is the caller graph for this function:

◆ init_nodes()

void DuplicateNodes::init_nodes ( )
private

Initialize the vector of nodes from mesh.

Definition at line 48 of file duplicate_nodes.cc.

Here is the caller graph for this function:

◆ mesh()

MeshBase* DuplicateNodes::mesh ( ) const
inline

Definition at line 102 of file duplicate_nodes.h.

◆ n_nodes()

unsigned int DuplicateNodes::n_nodes ( ) const
inline

Definition at line 104 of file duplicate_nodes.h.

Here is the caller graph for this function:

◆ node_dim()

const std::vector<unsigned int>& DuplicateNodes::node_dim ( ) const
inline

Definition at line 105 of file duplicate_nodes.h.

Here is the caller graph for this function:

◆ obj_4_edg()

const std::vector<unsigned int>& DuplicateNodes::obj_4_edg ( ) const
inline

Definition at line 111 of file duplicate_nodes.h.

◆ obj_4_el()

const std::vector<unsigned int>& DuplicateNodes::obj_4_el ( ) const
inline

Definition at line 110 of file duplicate_nodes.h.

Here is the caller graph for this function:

◆ objects()

const std::vector<MeshObject>& DuplicateNodes::objects ( unsigned int  dim) const
inline

Definition at line 107 of file duplicate_nodes.h.

Here is the caller graph for this function:

Member Data Documentation

◆ mesh_

MeshBase* DuplicateNodes::mesh_
private

The mesh object.

Definition at line 130 of file duplicate_nodes.h.

◆ n_duplicated_nodes_

unsigned int DuplicateNodes::n_duplicated_nodes_
private

Number of nodes (including duplicated ones).

Definition at line 133 of file duplicate_nodes.h.

◆ node_dim_

std::vector<unsigned int> DuplicateNodes::node_dim_
private

Vector of space dimensions of elements using the particular duplicated node.

Definition at line 136 of file duplicate_nodes.h.

◆ obj_4_edg_

std::vector<unsigned int> DuplicateNodes::obj_4_edg_
private

Vector of object indices for each mesh edge.

Definition at line 148 of file duplicate_nodes.h.

◆ obj_4_el_

std::vector<unsigned int> DuplicateNodes::obj_4_el_
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.

◆ objects_

std::vector<MeshObject> DuplicateNodes::objects_[4]
private

Array of n-faces by their dimension.

Definition at line 139 of file duplicate_nodes.h.


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