Flow123d  master-f44eb46
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
BCMesh Class Reference

Class represents boundary part of mesh. More...

#include <bc_mesh.hh>

Inheritance diagram for BCMesh:
Inheritance graph
[legend]
Collaboration diagram for BCMesh:
Collaboration graph
[legend]

Public Member Functions

 BCMesh (Mesh *parent_mesh)
 
 ~BCMesh () override
 Destructor. More...
 
Partitioningget_part () override
 Overwrite Mesh::get_part() More...
 
const LongIdxget_local_part () override
 Overwrite Mesh::get_local_part() More...
 
std::shared_ptr< EquivalentMeshMapcheck_compatible_mesh (Mesh &input_mesh) override
 Overwrite Mesh::check_compatible_mesh() More...
 
BCMeshbc_mesh () const override
 Implement MeshBase::bc_mesh() More...
 
- Public Member Functions inherited from MeshBase
 TYPEDEF_ERR_INFO (EI_ElemId, int)
 
 TYPEDEF_ERR_INFO (EI_ElemIdOther, int)
 
 DECLARE_EXCEPTION (ExcTooMatchingIds,<< "Mesh: Duplicate dim-join lower dim elements: "<< EI_ElemId::val<< ", "<< EI_ElemIdOther::val<< ".\n")
 
 MeshBase ()
 
virtual ~MeshBase ()
 
unsigned int n_elements () const
 
unsigned int n_edges () const
 
unsigned int n_vb_neighbours () const
 
Distributionget_el_ds () const
 
LongIdxget_el_4_loc () const
 
LongIdxget_row_4_el () const
 
const Elementelement (unsigned idx) const
 
Edge edge (uint edge_idx) const
 Return edge with given index. More...
 
const Neighbourvb_neighbour (unsigned int nb) const
 Return neighbour with given index. More...
 
int find_elem_id (unsigned int pos) const
 Return element id (in GMSH file) of element of given position in element vector. More...
 
unsigned int max_edge_sides (unsigned int dim) const
 
const DuplicateNodesduplicate_nodes () const
 
vector< vector< unsigned int > > const & node_elements ()
 
int find_node_id (unsigned int pos) const
 Return node id (in GMSH file) of node of given position in node vector. More...
 
void check_element_size (unsigned int elem_idx) const
 Check if given index is in element_vec_. More...
 
const std::vector< unsigned int > & get_side_nodes (unsigned int dim, unsigned int side) const
 
unsigned int n_nodes () const
 
const RegionDBregion_db () const
 
NodeAccessor< 3 > node (unsigned int idx) const
 Create and return NodeAccessor to node of given idx. More...
 
ElementAccessor< 3 > element_accessor (unsigned int idx) const
 Create and return ElementAccessor to element of given idx. More...
 
Range< ElementAccessor< 3 > > elements_range () const
 Returns range of mesh elements. More...
 
Range< NodeAccessor< 3 > > node_range () const
 Returns range of nodes. More...
 
Range< Edgeedge_range () const
 Return range of edges. More...
 
void intersect_element_lists (vector< unsigned int > const &nodes_list, vector< unsigned int > &intersection_element_list)
 
int elem_index (int elem_id) const
 For element of given elem_id returns index in element_vec_ or (-1) if element doesn't exist. More...
 
void init_element_vector (unsigned int size)
 Initialize element_vec_, set size and reset counters of boundary and bulk elements. More...
 
void init_node_vector (unsigned int size)
 Initialize node_vec_, set size. More...
 
const std::vector< unsigned int > & node_permutations () const
 Return permutation vector of nodes. More...
 
const std::vector< unsigned int > & element_permutations () const
 Return permutation vector of elements. More...
 

Private Member Functions

void init_distribution ()
 setup distribution of elements and related vectors More...
 
void make_neighbours_and_edges ()
 
Boundary boundary (unsigned int) const override
 

Private Attributes

Meshparent_mesh_
 Pointer to parent (bulk) mesh. More...
 
LongIdxlocal_part_
 Distribution of boundary elements to processors. More...
 

Friends

class Mesh
 

Additional Inherited Members

- Public Attributes inherited from MeshBase
vector< vector< unsigned int > > node_elements_
 For each node the vector contains a list of elements that use this node. More...
 
vector< vector< vector< unsigned int > > > side_nodes
 
- Static Public Attributes inherited from MeshBase
static const unsigned int undef_idx =-1
 
- Protected Member Functions inherited from MeshBase
void canonical_faces ()
 
void create_node_element_lists ()
 
Elementadd_element_to_vector (int id, bool is_boundary=false)
 Adds element to mesh data structures (element_vec_, element_ids_), returns pointer to this element. More...
 
bool find_lower_dim_element (vector< unsigned int > &element_list, unsigned int dim, unsigned int &element_idx)
 
bool same_sides (const SideIter &si, vector< unsigned int > &side_nodes)
 
- Protected Attributes inherited from MeshBase
vector< Elementelement_vec_
 
BidirectionalMap< int > element_ids_
 Maps element ids to indexes into vector element_vec_. More...
 
std::vector< EdgeDataedges
 Vector of MH edges, this should not be part of the geometrical mesh. More...
 
vector< Neighbourvb_neighbours_
 Vector of compatible neighbourings. More...
 
unsigned int max_edge_sides_ [3]
 Maximal number of sides per one edge in the actual mesh (set in make_neighbours_and_edges()). More...
 
shared_ptr< Armor::Array< double > > nodes_
 
shared_ptr< BidirectionalMap< int > > node_ids_
 Maps node ids to indexes into vector node_vec_. More...
 
std::vector< unsigned int > node_permutation_
 Vector of node permutations of optimized mesh (see class MeshOptimizer) More...
 
std::vector< unsigned int > elem_permutation_
 Vector of element permutations of optimized mesh (see class MeshOptimizer) More...
 
std::array< std::array< uint, 4 >, 64 > element_nodes_original_
 
LongIdxrow_4_el
 
LongIdxel_4_loc
 Index set assigning to local element index its global index. More...
 
Distributionel_ds
 Parallel distribution of elements. More...
 
DuplicateNodesduplicate_nodes_
 
std::shared_ptr< RegionDBregion_db_
 

Detailed Description

Class represents boundary part of mesh.

Holds pointer to parent Mesh and overwrites methods, that allow access to boundary elements and other functionality and structures necessary to work above boundary part of mesh.

Definition at line 37 of file bc_mesh.hh.

Constructor & Destructor Documentation

◆ BCMesh()

BCMesh::BCMesh ( Mesh parent_mesh)

Constructor from parent (bulk) Mesh.

Definition at line 30 of file bc_mesh.cc.

◆ ~BCMesh()

BCMesh::~BCMesh ( )
override

Destructor.

Definition at line 42 of file bc_mesh.cc.

Member Function Documentation

◆ bc_mesh()

BCMesh* BCMesh::bc_mesh ( ) const
inlineoverridevirtual

Implement MeshBase::bc_mesh()

Implements MeshBase.

Definition at line 57 of file bc_mesh.hh.

Here is the caller graph for this function:

◆ boundary()

Boundary BCMesh::boundary ( unsigned int  ) const
overrideprivatevirtual

Implements MeshBase.

Definition at line 103 of file bc_mesh.cc.

◆ check_compatible_mesh()

std::shared_ptr< EquivalentMeshMap > BCMesh::check_compatible_mesh ( Mesh input_mesh)
overridevirtual

Overwrite Mesh::check_compatible_mesh()

Implements MeshBase.

Definition at line 98 of file bc_mesh.cc.

◆ get_local_part()

const LongIdx * BCMesh::get_local_part ( )
overridevirtual

Overwrite Mesh::get_local_part()

Implements MeshBase.

Definition at line 82 of file bc_mesh.cc.

◆ get_part()

Partitioning * BCMesh::get_part ( )
overridevirtual

Overwrite Mesh::get_part()

Implements MeshBase.

Definition at line 78 of file bc_mesh.cc.

◆ init_distribution()

void BCMesh::init_distribution ( )
private

setup distribution of elements and related vectors

Definition at line 47 of file bc_mesh.cc.

Here is the caller graph for this function:

◆ make_neighbours_and_edges()

void BCMesh::make_neighbours_and_edges ( )
private

Definition at line 110 of file bc_mesh.cc.

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ Mesh

friend class Mesh
friend

Definition at line 80 of file bc_mesh.hh.

Member Data Documentation

◆ local_part_

LongIdx* BCMesh::local_part_
private

Distribution of boundary elements to processors.

Definition at line 77 of file bc_mesh.hh.

◆ parent_mesh_

Mesh* BCMesh::parent_mesh_
private

Pointer to parent (bulk) mesh.

Definition at line 74 of file bc_mesh.hh.


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