Flow123d  master-f44eb46
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
Mesh Class Reference

#include <mesh.h>

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

Classes

struct  ElementTmpData
 

Public Types

enum  IntersectionSearch { BIHsearch = 1 , BIHonly = 2 , BBsearch = 3 }
 Types of search algorithm for finding intersection candidates. More...
 
enum  { x_coord =0 , y_coord =1 , z_coord =2 }
 
typedef enum Mesh::IntersectionSearch IntersectionSearch
 Types of search algorithm for finding intersection candidates. More...
 

Public Member Functions

 TYPEDEF_ERR_INFO (EI_ElemLast, int)
 
 TYPEDEF_ERR_INFO (EI_ElemNew, int)
 
 TYPEDEF_ERR_INFO (EI_RegLast, std::string)
 
 TYPEDEF_ERR_INFO (EI_RegNew, std::string)
 
 TYPEDEF_ERR_INFO (EI_Region, std::string)
 
 TYPEDEF_ERR_INFO (EI_RegIdx, unsigned int)
 
 TYPEDEF_ERR_INFO (EI_Dim, unsigned int)
 
 TYPEDEF_ERR_INFO (EI_DimOther, unsigned int)
 
 TYPEDEF_ERR_INFO (EI_Quality, double)
 
 DECLARE_EXCEPTION (ExcDuplicateBoundary,<< "Duplicate boundary elements! \n"<< "Element id: "<< EI_ElemLast::val<< " on region name: "<< EI_RegLast::val<< "\n"<< "Element id: "<< EI_ElemNew::val<< " on region name: "<< EI_RegNew::val<< "\n")
 
 DECLARE_EXCEPTION (ExcElmWrongOrder,<< "Element IDs in non-increasing order, ID: "<< EI_ElemId::val<< "\n")
 
 DECLARE_EXCEPTION (ExcRegionElmDiffDim,<< "User defined region "<< EI_Region::qval<< " (id "<< EI_RegIdx::val<< ") by 'From_Elements' cannot have elements of different dimensions.\n"<< "Thrown due to: dim "<< EI_Dim::val<< " neq dim "<< EI_DimOther::val<< " (ele id "<< EI_ElemId::val<< ").\n"<< "Split elements by dim, create separate regions and then possibly use Union.\n")
 
 DECLARE_EXCEPTION (ExcBadElement,<< "Extremely bad quality element ID="<< EI_ElemId::val<< ",("<< EI_Quality::val<< "<4*epsilon).\n")
 
 DECLARE_EXCEPTION (ExcBdrElemMatchRegular,<< "Boundary element (id: "<< EI_ElemId::val<< ") match a regular element (id: "<< EI_ElemIdOther::val<< ") of lower dimension.\n")
 
 Mesh ()
 
 Mesh (Input::Record in_record, MPI_Comm com=MPI_COMM_WORLD)
 
 Mesh (Mesh &other)
 
 ~Mesh () override
 Destructor. More...
 
unsigned int n_boundaries () const
 
Boundary boundary (uint edge_idx) const override
 
unsigned int n_corners ()
 
Partitioningget_part () override
 
const LongIdxget_local_part () override
 
Distributionget_node_ds () const
 
LongIdxget_node_4_loc () const
 
unsigned int n_local_nodes () const
 
MPI_Comm get_comm () const
 
MixedMeshIntersectionsmixed_intersections ()
 
unsigned int n_sides () const
 
void read_gmsh_from_stream (istream &in)
 
void init_from_input ()
 
void setup_topology ()
 
void elements_id_maps (vector< LongIdx > &bulk_elements_id, vector< LongIdx > &boundary_elements_id) const
 
std::shared_ptr< EquivalentMeshMapcheck_compatible_mesh (Mesh &input_mesh) override
 
void read_regions_from_input (Input::Array region_list)
 
void check_and_finish ()
 
std::vector< BoundingBoxget_element_boxes ()
 Compute bounding boxes of elements contained in mesh. More...
 
const BIHTreeget_bih_tree ()
 Getter for BIH. Creates and compute BIH at first call. More...
 
void add_node (unsigned int node_id, arma::vec3 coords)
 Add new node of given id and coordinates to mesh. More...
 
void add_element (unsigned int elm_id, unsigned int dim, unsigned int region_id, unsigned int partition_id, std::vector< unsigned int > node_ids)
 Add new element of given id to mesh. More...
 
void add_physical_name (unsigned int dim, unsigned int id, std::string name)
 Add new node of given id and coordinates to mesh. More...
 
FilePath mesh_file ()
 Return FilePath object representing "mesh_file" input key. More...
 
IntersectionSearch get_intersection_search ()
 Getter for input type selection for intersection search algorithm. More...
 
double global_snap_radius () const
 Maximal distance of observe point from Mesh relative to its size. More...
 
int node_index (int node_id) const
 For node of given node_id returns index in element_vec_ or (-1) if node doesn't exist. More...
 
BCMeshbc_mesh () const override
 Implement MeshBase::bc_mesh(), getter of boundary 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...
 

Static Public Member Functions

static const Input::Type::Selectionget_input_intersection_variant ()
 The definition of input record for selection of variant of file format. More...
 
static const Input::Type::Recordget_input_type ()
 

Public Attributes

vector< BoundaryDataboundary_
 
std::shared_ptr< MixedMeshIntersectionsintersections
 
vector< vector< unsigned int > > master_elements
 
int n_insides
 
int n_exsides
 
int n_sides_
 
- 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
 

Protected Member Functions

void init ()
 
void make_neighbours_and_edges ()
 
void element_to_neigh_vb ()
 
void count_element_types ()
 
void count_side_types ()
 
void check_mesh_on_read ()
 
void modify_element_ids (const RegionDB::MapElementIDToRegionID &map)
 
void init_element (Element *ele, unsigned int elm_id, unsigned int dim, RegionIdx region_idx, unsigned int partition_id, std::vector< unsigned int > node_ids)
 Initialize element. More...
 
void output_internal_ngh_data ()
 Output of neighboring data into raw output. More...
 
void optimize ()
 
void sort_permuted_nodes_elements (std::vector< int > new_node_ids, std::vector< int > new_elem_ids)
 Sort elements and nodes by order stored in permutation vectors. More...
 
unsigned int check_compatible_elements (MeshBase *source_mesh, MeshBase *target_mesh, const std::vector< unsigned int > &node_ids, std::vector< LongIdx > &map)
 
- 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

unsigned int n_bb_neigh
 
unsigned int n_vb_neigh
 
bool optimize_memory_locality
 
std::shared_ptr< Partitioningpart_
 
std::shared_ptr< BIHTreebih_tree_
 
Input::Record in_record_
 
MPI_Comm comm_
 
- 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_
 

Private Member Functions

void distribute_nodes ()
 Fill array node_4_loc_ and create object node_ds_ according to element distribution. More...
 

Private Attributes

LongIdxnode_4_loc_
 Index set assigning to local node index its global index. More...
 
Distributionnode_ds_
 Parallel distribution of nodes. Depends on elements distribution. More...
 
unsigned int n_local_nodes_
 Hold number of local nodes (own + ghost), value is equal with size of node_4_loc array. More...
 
BCMeshbc_mesh_
 Boundary mesh, object is created only if it's necessary. More...
 

Friends

class Edge
 
class Side
 
class RegionSetBase
 
class Element
 
class BIHTree
 
class Boundary
 
class BCMesh
 
template<int spacedim>
class ElementAccessor
 
template<int spacedim>
class NodeAccessor
 

Additional Inherited Members

- Static Public Attributes inherited from MeshBase
static const unsigned int undef_idx =-1
 

Detailed Description

Definition at line 362 of file mesh.h.

Member Typedef Documentation

◆ IntersectionSearch

Types of search algorithm for finding intersection candidates.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Labels for coordinate indexes in arma::vec3 representing vectors and points.

Enumerator
x_coord 
y_coord 
z_coord 

Definition at line 410 of file mesh.h.

◆ IntersectionSearch

Types of search algorithm for finding intersection candidates.

Enumerator
BIHsearch 
BIHonly 
BBsearch 

Definition at line 395 of file mesh.h.

Constructor & Destructor Documentation

◆ Mesh() [1/3]

Mesh::Mesh ( )

Empty constructor.

Use only for unit tests!!!

Definition at line 239 of file mesh.cc.

◆ Mesh() [2/3]

Mesh::Mesh ( Input::Record  in_record,
MPI_Comm  com = MPI_COMM_WORLD 
)

Constructor from an input record. Do not process input record. That is done in init_from_input.

Definition at line 249 of file mesh.cc.

◆ Mesh() [3/3]

Mesh::Mesh ( Mesh other)

Definition at line 262 of file mesh.cc.

◆ ~Mesh()

Mesh::~Mesh ( )
override

Destructor.

Definition at line 301 of file mesh.cc.

Member Function Documentation

◆ add_element()

void Mesh::add_element ( unsigned int  elm_id,
unsigned int  dim,
unsigned int  region_id,
unsigned int  partition_id,
std::vector< unsigned int >  node_ids 
)

Add new element of given id to mesh.

Definition at line 1094 of file mesh.cc.

Here is the caller graph for this function:

◆ add_node()

void Mesh::add_node ( unsigned int  node_id,
arma::vec3  coords 
)

Add new node of given id and coordinates to mesh.

Definition at line 1086 of file mesh.cc.

Here is the caller graph for this function:

◆ add_physical_name()

void Mesh::add_physical_name ( unsigned int  dim,
unsigned int  id,
std::string  name 
)

Add new node of given id and coordinates to mesh.

Definition at line 1081 of file mesh.cc.

Here is the caller graph for this function:

◆ bc_mesh()

BCMesh* Mesh::bc_mesh ( ) const
inlineoverridevirtual

Implement MeshBase::bc_mesh(), getter of boundary mesh.

Implements MeshBase.

Definition at line 567 of file mesh.h.

Here is the caller graph for this function:

◆ boundary()

Boundary Mesh::boundary ( uint  edge_idx) const
overridevirtual

Implements MeshBase.

Definition at line 328 of file mesh.cc.

◆ check_and_finish()

void Mesh::check_and_finish ( )

Check usage of regions, set regions to elements defined by user, close RegionDB

Definition at line 1038 of file mesh.cc.

Here is the caller graph for this function:

◆ check_compatible_elements()

unsigned int Mesh::check_compatible_elements ( MeshBase source_mesh,
MeshBase target_mesh,
const std::vector< unsigned int > &  node_ids,
std::vector< LongIdx > &  map 
)
protected

Looks for the same (compatible) elements between the source_mesh and target_mesh. Auxiliary function for check_compatible_mesh(). Uses the nodal mapping node_ids. Fills the element mapping map. Returns the number of compatible elements.

Definition at line 984 of file mesh.cc.

Here is the caller graph for this function:

◆ check_compatible_mesh()

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

Implements MeshBase.

Definition at line 919 of file mesh.cc.

Here is the caller graph for this function:

◆ check_mesh_on_read()

void Mesh::check_mesh_on_read ( )
protected

Check the element quality and remove unused nodes.

Definition at line 370 of file mesh.cc.

Here is the caller graph for this function:

◆ count_element_types()

void Mesh::count_element_types ( )
protected

◆ count_side_types()

void Mesh::count_side_types ( )
protected

Definition at line 524 of file mesh.cc.

Here is the caller graph for this function:

◆ DECLARE_EXCEPTION() [1/5]

Mesh::DECLARE_EXCEPTION ( ExcBadElement  ,
<< "Extremely bad quality element  ID = "<< EI_ElemId::val<< ",
("<< EI_Quality::val<< "< 4 *epsilon).\n"   
)

◆ DECLARE_EXCEPTION() [2/5]

Mesh::DECLARE_EXCEPTION ( ExcBdrElemMatchRegular  ,
<< "Boundary element (id: "<< EI_ElemId::val<< ") match a regular element (id: "<< EI_ElemIdOther::val<< ") of lower dimension.\n"   
)

◆ DECLARE_EXCEPTION() [3/5]

Mesh::DECLARE_EXCEPTION ( ExcDuplicateBoundary  ,
<< "Duplicate boundary elements! \n"<< "Element id: "<< EI_ElemLast::val<< " on region name: "<< EI_RegLast::val<< "\n"<< "Element id: "<< EI_ElemNew::val<< " on region name: "<< EI_RegNew::val<< "\n"   
)

◆ DECLARE_EXCEPTION() [4/5]

Mesh::DECLARE_EXCEPTION ( ExcElmWrongOrder  ,
<< "Element IDs in non-increasing  order,
ID:"<< EI_ElemId::val<< "\n"   
)

◆ DECLARE_EXCEPTION() [5/5]

Mesh::DECLARE_EXCEPTION ( ExcRegionElmDiffDim  ,
<< "User defined region "<< EI_Region::qval<< " (id "<< EI_RegIdx::val<< ") by 'From_Elements' cannot have elements of different dimensions.\n"<< "Thrown due to: dim "<< EI_Dim::val<< " neq dim "<< EI_DimOther::val<< " (ele id "<< EI_ElemId::val<< ").\n"<< "Split elements by  dim,
create separate regions and then possibly use Union.\n"   
)

◆ distribute_nodes()

void Mesh::distribute_nodes ( )
private

Fill array node_4_loc_ and create object node_ds_ according to element distribution.

Definition at line 1308 of file mesh.cc.

Here is the caller graph for this function:

◆ element_to_neigh_vb()

void Mesh::element_to_neigh_vb ( )
protected

Definition at line 816 of file mesh.cc.

Here is the caller graph for this function:

◆ elements_id_maps()

void Mesh::elements_id_maps ( vector< LongIdx > &  bulk_elements_id,
vector< LongIdx > &  boundary_elements_id 
) const

Returns vector of ID numbers of elements, either bulk or bc elemnts.

Definition at line 878 of file mesh.cc.

Here is the caller graph for this function:

◆ get_bih_tree()

const BIHTree & Mesh::get_bih_tree ( )

Getter for BIH. Creates and compute BIH at first call.

Definition at line 1068 of file mesh.cc.

Here is the caller graph for this function:

◆ get_comm()

MPI_Comm Mesh::get_comm ( ) const
inline

Returns MPI communicator of the mesh.

Definition at line 453 of file mesh.h.

Here is the caller graph for this function:

◆ get_element_boxes()

std::vector< BoundingBox > Mesh::get_element_boxes ( )

Compute bounding boxes of elements contained in mesh.

Definition at line 1053 of file mesh.cc.

Here is the caller graph for this function:

◆ get_input_intersection_variant()

const Input::Type::Selection & Mesh::get_input_intersection_variant ( )
static

The definition of input record for selection of variant of file format.

Definition at line 202 of file mesh.cc.

Here is the caller graph for this function:

◆ get_input_type()

const IT::Record & Mesh::get_input_type ( )
static

Definition at line 213 of file mesh.cc.

Here is the caller graph for this function:

◆ get_intersection_search()

Mesh::IntersectionSearch Mesh::get_intersection_search ( )

Getter for input type selection for intersection search algorithm.

Definition at line 275 of file mesh.cc.

Here is the caller graph for this function:

◆ get_local_part()

const LongIdx * Mesh::get_local_part ( )
overridevirtual

Implements MeshBase.

Definition at line 338 of file mesh.cc.

Here is the caller graph for this function:

◆ get_node_4_loc()

LongIdx* Mesh::get_node_4_loc ( ) const
inline

Definition at line 444 of file mesh.h.

Here is the caller graph for this function:

◆ get_node_ds()

Distribution* Mesh::get_node_ds ( ) const
inline

Definition at line 441 of file mesh.h.

Here is the caller graph for this function:

◆ get_part()

Partitioning * Mesh::get_part ( )
overridevirtual

Returns pointer to partitioning object. Partitioning is created during setup_topology.

Implements MeshBase.

Definition at line 334 of file mesh.cc.

Here is the caller graph for this function:

◆ global_snap_radius()

double Mesh::global_snap_radius ( ) const

Maximal distance of observe point from Mesh relative to its size.

Definition at line 1077 of file mesh.cc.

Here is the caller graph for this function:

◆ init()

void Mesh::init ( )
protected

Part of the constructor whichdoes not depedn on input record. Initializes node-side numbering according to RefElement.

Definition at line 281 of file mesh.cc.

Here is the caller graph for this function:

◆ init_element()

void Mesh::init_element ( Element ele,
unsigned int  elm_id,
unsigned int  dim,
RegionIdx  region_idx,
unsigned int  partition_id,
std::vector< unsigned int >  node_ids 
)
protected

Initialize element.

Definition at line 1111 of file mesh.cc.

Here is the caller graph for this function:

◆ init_from_input()

void Mesh::init_from_input ( )

Reads input record, creates regions, read the mesh, setup topology. creates region sets.

◆ make_neighbours_and_edges()

void Mesh::make_neighbours_and_edges ( )
protected

This replaces read_neighbours() in order to avoid using NGH preprocessor.

TODO:

  • Avoid maps:

    5) need not to have temporary array for Edges, only postpone setting pointers in elements and set them after edges are found; we can temporary save Edge index instead of pointer in Neigbours and elements

    6) Try replace Edge * by indexes in Neigbours and elements (anyway we have mesh pointer in elements so it is accessible also from Neigbours)

TODO:

  • use std::is_any for setting is_neigbour
  • possibly make appropriate constructors for Edge and Neighbour
  • check side!=-1 when searching neigbouring element
  • process boundary elements first, there should be no Neigh, but check it set Edge and boundary there

Definition at line 623 of file mesh.cc.

Here is the caller graph for this function:

◆ mesh_file()

FilePath Mesh::mesh_file ( )
inline

Return FilePath object representing "mesh_file" input key.

Definition at line 550 of file mesh.h.

◆ mixed_intersections()

MixedMeshIntersections & Mesh::mixed_intersections ( )

Definition at line 849 of file mesh.cc.

Here is the caller graph for this function:

◆ modify_element_ids()

void Mesh::modify_element_ids ( const RegionDB::MapElementIDToRegionID map)
protected

Possibly modify region id of elements sets by user in "regions" part of input file.

TODO: This method needs check in issue 'Review mesh setting'. Changes have been done during generalized region key and may be causing problems during the further development.

Definition at line 345 of file mesh.cc.

Here is the caller graph for this function:

◆ n_boundaries()

unsigned int Mesh::n_boundaries ( ) const
inline

Definition at line 429 of file mesh.h.

◆ n_corners()

unsigned int Mesh::n_corners ( )

Definition at line 318 of file mesh.cc.

◆ n_local_nodes()

unsigned int Mesh::n_local_nodes ( ) const
inline

Definition at line 447 of file mesh.h.

Here is the caller graph for this function:

◆ n_sides()

unsigned int Mesh::n_sides ( ) const

Definition at line 308 of file mesh.cc.

Here is the caller graph for this function:

◆ node_index()

int Mesh::node_index ( int  node_id) const
inline

For node of given node_id returns index in element_vec_ or (-1) if node doesn't exist.

Definition at line 561 of file mesh.h.

Here is the caller graph for this function:

◆ optimize()

void Mesh::optimize ( )
protected

Apply functionality of MeshOptimizer to sort nodes and elements.

Use Hilbert curve, need call sort_permuted_nodes_elements method.

Definition at line 482 of file mesh.cc.

Here is the caller graph for this function:

◆ output_internal_ngh_data()

void Mesh::output_internal_ngh_data ( )
protected

Output of neighboring data into raw output.

Definition at line 1190 of file mesh.cc.

Here is the caller graph for this function:

◆ read_gmsh_from_stream()

void Mesh::read_gmsh_from_stream ( istream &  in)

Reads mesh from stream.

Method is especially used in unit tests.

◆ read_regions_from_input()

void Mesh::read_regions_from_input ( Input::Array  region_list)

Reads elements and their affiliation to regions and region sets defined by user in input file Format of input record is defined in method RegionSetBase::get_input_type()

Parameters
region_listArray input AbstractRecords which define regions, region sets and elements

Definition at line 1028 of file mesh.cc.

Here is the caller graph for this function:

◆ setup_topology()

void Mesh::setup_topology ( )

Initialize all mesh structures from raw information about nodes and elements (including boundary elements). Namely: create remaining boundary elements and Boundary objects, find edges and compatible neighborings.

Definition at line 444 of file mesh.cc.

Here is the caller graph for this function:

◆ sort_permuted_nodes_elements()

void Mesh::sort_permuted_nodes_elements ( std::vector< int >  new_node_ids,
std::vector< int >  new_elem_ids 
)
protected

Sort elements and nodes by order stored in permutation vectors.

Definition at line 492 of file mesh.cc.

Here is the caller graph for this function:

◆ TYPEDEF_ERR_INFO() [1/9]

Mesh::TYPEDEF_ERR_INFO ( EI_Dim  ,
unsigned int   
)

◆ TYPEDEF_ERR_INFO() [2/9]

Mesh::TYPEDEF_ERR_INFO ( EI_DimOther  ,
unsigned int   
)

◆ TYPEDEF_ERR_INFO() [3/9]

Mesh::TYPEDEF_ERR_INFO ( EI_ElemLast  ,
int   
)

◆ TYPEDEF_ERR_INFO() [4/9]

Mesh::TYPEDEF_ERR_INFO ( EI_ElemNew  ,
int   
)

◆ TYPEDEF_ERR_INFO() [5/9]

Mesh::TYPEDEF_ERR_INFO ( EI_Quality  ,
double   
)

◆ TYPEDEF_ERR_INFO() [6/9]

Mesh::TYPEDEF_ERR_INFO ( EI_RegIdx  ,
unsigned int   
)

◆ TYPEDEF_ERR_INFO() [7/9]

Mesh::TYPEDEF_ERR_INFO ( EI_Region  ,
std::string   
)

◆ TYPEDEF_ERR_INFO() [8/9]

Mesh::TYPEDEF_ERR_INFO ( EI_RegLast  ,
std::string   
)

◆ TYPEDEF_ERR_INFO() [9/9]

Mesh::TYPEDEF_ERR_INFO ( EI_RegNew  ,
std::string   
)

Friends And Related Function Documentation

◆ BCMesh

friend class BCMesh
friend

Definition at line 693 of file mesh.h.

◆ BIHTree

friend class BIHTree
friend

Definition at line 691 of file mesh.h.

◆ Boundary

friend class Boundary
friend

Definition at line 692 of file mesh.h.

◆ Edge

friend class Edge
friend

Definition at line 687 of file mesh.h.

◆ Element

friend class Element
friend

Definition at line 690 of file mesh.h.

◆ ElementAccessor

template<int spacedim>
friend class ElementAccessor
friend

Definition at line 694 of file mesh.h.

◆ NodeAccessor

template<int spacedim>
friend class NodeAccessor
friend

Definition at line 695 of file mesh.h.

◆ RegionSetBase

friend class RegionSetBase
friend

Definition at line 689 of file mesh.h.

◆ Side

friend class Side
friend

Definition at line 688 of file mesh.h.

Member Data Documentation

◆ bc_mesh_

BCMesh* Mesh::bc_mesh_
private

Boundary mesh, object is created only if it's necessary.

Definition at line 711 of file mesh.h.

◆ bih_tree_

std::shared_ptr<BIHTree> Mesh::bih_tree_
protected

BIH Tree for intersection and observe points lookup.

Definition at line 674 of file mesh.h.

◆ boundary_

vector<BoundaryData> Mesh::boundary_
mutable

Vector of boundary sides where is prescribed boundary condition. TODO: apply all boundary conditions in the main assembling cycle over elements and remove this Vector.

Definition at line 506 of file mesh.h.

◆ comm_

MPI_Comm Mesh::comm_
protected

MPI communicator used for partitioning and ...

Definition at line 685 of file mesh.h.

◆ in_record_

Input::Record Mesh::in_record_
protected

Accessor to the input record for the mesh.

Definition at line 680 of file mesh.h.

◆ intersections

std::shared_ptr<MixedMeshIntersections> Mesh::intersections

Vector of individual intersections of two elements. This is enough for local mortar.

Definition at line 514 of file mesh.h.

◆ master_elements

vector<vector<unsigned int> > Mesh::master_elements

Definition at line 520 of file mesh.h.

◆ n_bb_neigh

unsigned int Mesh::n_bb_neigh
protected

Definition at line 634 of file mesh.h.

◆ n_exsides

int Mesh::n_exsides

Definition at line 524 of file mesh.h.

◆ n_insides

int Mesh::n_insides

Definition at line 523 of file mesh.h.

◆ n_local_nodes_

unsigned int Mesh::n_local_nodes_
private

Hold number of local nodes (own + ghost), value is equal with size of node_4_loc array.

Definition at line 709 of file mesh.h.

◆ n_sides_

int Mesh::n_sides_
mutable

Definition at line 525 of file mesh.h.

◆ n_vb_neigh

unsigned int Mesh::n_vb_neigh
protected

Definition at line 634 of file mesh.h.

◆ node_4_loc_

LongIdx* Mesh::node_4_loc_
private

Index set assigning to local node index its global index.

Definition at line 705 of file mesh.h.

◆ node_ds_

Distribution* Mesh::node_ds_
private

Parallel distribution of nodes. Depends on elements distribution.

Definition at line 707 of file mesh.h.

◆ optimize_memory_locality

bool Mesh::optimize_memory_locality
protected

Flag for optimization perfomed at the beginning of setup_topology. Default true, can be set to flase by the optimize_mesh key of the input recoed.

Definition at line 664 of file mesh.h.

◆ part_

std::shared_ptr<Partitioning> Mesh::part_
protected

Mesh partitioning. Created in setup_topology.

Definition at line 669 of file mesh.h.


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