Flow123d
master-ac4164ba5
|
Base class for Mesh and BCMesh. More...
#include <mesh.h>
Public Member Functions | |
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 |
Distribution * | get_el_ds () const |
LongIdx * | get_el_4_loc () const |
LongIdx * | get_row_4_el () const |
const Element & | element (unsigned idx) const |
Edge | edge (uint edge_idx) const |
Return edge with given index. More... | |
const Neighbour & | vb_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 DuplicateNodes * | duplicate_nodes () const |
const vector< vector< unsigned int > > & | 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 RegionDB & | region_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< Edge > | edge_range () const |
Return range of edges. More... | |
virtual Boundary | boundary (uint edge_idx) const =0 |
virtual BCMesh * | bc_mesh () const =0 |
virtual Partitioning * | get_part ()=0 |
virtual const LongIdx * | get_local_part ()=0 |
virtual std::shared_ptr< EquivalentMeshMap > | check_compatible_mesh (Mesh &input_mesh)=0 |
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... | |
Public Attributes | |
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 | |
static const unsigned int | undef_idx =-1 |
Protected Member Functions | |
void | canonical_faces () |
void | create_node_element_lists () |
Element * | add_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 | |
vector< Element > | element_vec_ |
BidirectionalMap< int > | element_ids_ |
Maps element ids to indexes into vector element_vec_. More... | |
std::vector< EdgeData > | edges |
Vector of MH edges, this should not be part of the geometrical mesh. More... | |
vector< Neighbour > | vb_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_ |
LongIdx * | row_4_el |
Index set assigning to global element index the local index used in parallel vectors. More... | |
LongIdx * | el_4_loc |
Index set assigning to local element index its global index. More... | |
Distribution * | el_ds |
Parallel distribution of elements. More... | |
DuplicateNodes * | duplicate_nodes_ |
std::shared_ptr< RegionDB > | region_db_ |
Friends | |
class | Edge |
class | Element |
template<int spacedim> | |
class | ElementAccessor |
template<int spacedim> | |
class | NodeAccessor |
|
protected |
|
pure virtual |
|
protected |
Permute nodes of individual elements so that all elements have same edge orientations and aligned sides have same order of their nodes Canonical edge orientation in elements and faces is from nodes of lower local index to higher local index.
Algorithm detals:
Definition at line 152 of file mesh.cc.
|
pure virtual |
|
inline |
|
protected |
MeshBase::DECLARE_EXCEPTION | ( | ExcTooMatchingIds | , |
<< "Mesh: Duplicate dim-join lower dim elements: "<< EI_ElemId::val<< " | , | ||
"<< EI_ElemIdOther::val<< ".\n" | |||
) |
|
inline |
|
inline |
|
inline |
ElementAccessor< 3 > MeshBase::element_accessor | ( | unsigned int | idx | ) | const |
Create and return ElementAccessor to element of given idx.
|
inline |
Range< ElementAccessor< 3 > > MeshBase::elements_range | ( | ) | const |
|
inline |
|
protected |
Remove elements with dimension not equal to dim
from element_list
. Index of the first element of dimension dim-1
, is returned in element_idx
. If no such element is found the method returns false, if one such element is found the method returns true, if more elements are found we report an user input error.
Definition at line 584 of file mesh.cc.
|
inline |
|
inline |
|
inline |
|
pure virtual |
Returns pointer to partitioning object. Partitioning is created during setup_topology.
|
inline |
|
inline |
void MeshBase::init_element_vector | ( | unsigned int | size | ) |
void MeshBase::init_node_vector | ( | unsigned int | size | ) |
void MeshBase::intersect_element_lists | ( | vector< unsigned int > const & | nodes_list, |
vector< unsigned int > & | intersection_element_list | ||
) |
Find intersection of element lists given by Mesh::node_elements_ for elements givne by nodes_list
parameter. The result is placed into vector intersection_element_list
. If the node_list
is empty, and empty intersection is returned.
Definition at line 552 of file mesh.cc.
|
inline |
|
inline |
|
inline |
unsigned int MeshBase::n_vb_neighbours | ( | ) | const |
NodeAccessor< 3 > MeshBase::node | ( | unsigned int | idx | ) | const |
Create and return NodeAccessor to node of given idx.
Definition at line 872 of file mesh.cc.
|
inline |
Range< NodeAccessor< 3 > > MeshBase::node_range | ( | ) | const |
MeshBase::TYPEDEF_ERR_INFO | ( | EI_ElemId | , |
int | |||
) |
MeshBase::TYPEDEF_ERR_INFO | ( | EI_ElemIdOther | , |
int | |||
) |
const Neighbour & MeshBase::vb_neighbour | ( | unsigned int | nb | ) | const |
|
friend |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Vector of element permutations of optimized mesh (see class MeshOptimizer)
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Vector of node permutations of optimized mesh (see class MeshOptimizer)
|
protected |
|
protected |
|
protected |