49 #define MESH_CRITICAL_VOLUME 1.0E-12 56 #define FOR_NODES(_mesh_, i) \ 57 for( NodeFullIter i( (_mesh_)->node_vector.begin() ); \ 58 i != (_mesh_)->node_vector.end(); \ 64 #define NODE_FULL_ITER(_mesh_,i) \ 65 (_mesh_)->node_vector.full_iter(i) 70 #define NODE_FULL_ITER_NULL(_mesh_) \ 71 NodeFullIter((_mesh_)->node_vector) 76 #define ELEM_FULL_ITER(_mesh_,i) \ 77 (_mesh_)->element.full_iter(i) 80 #define FOR_NODE_ELEMENTS(i,j) for((j)=0;(j)<(i)->n_elements();(j)++) 81 #define FOR_NODE_SIDES(i,j) for((j)=0;(j)<(i)->n_sides;(j)++) 106 <<
"Duplicate boundary elements! \n" 107 <<
"Element id: " << EI_ElemLast::val <<
" on region name: " << EI_RegLast::val <<
"\n" 108 <<
"Element id: " << EI_ElemNew::val <<
" on region name: " << EI_RegNew::val <<
"\n");
125 static const unsigned int undef_idx=-1;
131 enum {x_coord=0, y_coord=1, z_coord=2};
153 return node_vector.size();
157 return element.size();
161 return boundary_.size();
168 unsigned int n_corners();
176 node_vector.reserve(n_nodes);
181 element.reserve(n_elements);
206 unsigned int n_sides();
209 return vb_neighbours_.size();
216 unsigned int max_edge_sides(
unsigned int dim)
const {
return max_edge_sides_[dim-1]; }
223 void read_gmsh_from_stream(istream &in);
227 void init_from_input();
234 void setup_topology();
314 void check_and_finish();
317 void compute_element_boxes();
325 const BIHTree &get_bih_tree();\
335 void add_node(
unsigned int node_id,
arma::vec3 coords);
338 void add_element(
unsigned int elm_id,
unsigned int dim,
unsigned int region_id,
unsigned int partition_id,
342 void add_physical_name(
unsigned int dim,
unsigned int id, std::string name);
346 return in_record_.val<
FilePath>(
"mesh_file");
353 double global_observe_radius()
const;
375 void make_neighbours_and_edges();
381 void make_edge_permutations();
385 void create_node_element_lists();
399 void element_to_neigh_vb();
401 void count_element_types();
402 void count_side_types();
416 unsigned int max_edge_sides_[3];
426 std::shared_ptr<Partitioning>
part_;
480 #define FOR_ELEMENTS(_mesh_,__i) \ 481 for( ElementFullIter __i( (_mesh_)->element.begin() ); \ 482 __i != (_mesh_)->element.end(); \ 488 #define ELEMENT_FULL_ITER(_mesh_,i) \ 489 (_mesh_)->element.full_iter(i) 494 #define ELEMENT_FULL_ITER_NULL(_mesh_) \ 495 ElementFullIter((_mesh_)->element) 498 #define FOR_BOUNDARIES(_mesh_,i) \ 499 for( std::vector<Boundary>::iterator i= (_mesh_)->boundary_.begin(); \ 500 i != (_mesh_)->boundary_.end(); \ 506 #define BOUNDARY_FULL_ITER(_mesh_,i) \ 507 (_mesh_)->boundary.full_iter(i) 512 #define BOUNDARY_NULL(_mesh_) \ 513 BoundaryFullIter((_mesh_)->boundary) 519 #define FOR_EDGES(_mesh_,__i) \ 520 for( vector<Edge>::iterator __i = (_mesh_)->edges.begin(); \ 521 __i !=(_mesh_)->edges.end(); \ 524 #define FOR_SIDES(_mesh_, it) \ 525 FOR_ELEMENTS((_mesh_), ele) \ 526 for(SideIter it = ele->side(0); it->el_idx() < ele->n_sides(); ++it) 528 #define FOR_SIDE_NODES(i,j) for((j)=0;(j)<(i)->n_nodes;(j)++) 531 #define FOR_NEIGHBOURS(_mesh_, it) \ 532 for( std::vector<Neighbour>::iterator it = (_mesh_)->vb_neighbours_.begin(); \ 533 (it)!= (_mesh_)->vb_neighbours_.end(); ++it) 535 #define FOR_NEIGH_ELEMENTS(i,j) for((j)=0;(j)<(i)->n_elements;(j)++) 536 #define FOR_NEIGH_SIDES(i,j) for((j)=0;(j)<(i)->n_sides;(j)++)
Distribution * el_ds
Parallel distribution of elements.
Class for the mesh partitioning. This should provide:
const BoundingBox & get_mesh_boungin_box()
Return the mesh bounding box. Is set after call compute_element_boxes().
int IdxInt
Define integers that are indices into large arrays (elements, nodes, dofs etc.)
Bounding box in 3d ambient space.
static Input::Type::Record input_type
IdxInt * get_el_4_loc() const
#define DECLARE_EXCEPTION(ExcName, Format)
Macro for simple definition of exceptions.
std::shared_ptr< MixedMeshIntersections > intersections
BoundingBox mesh_box_
Bounding box of whole mesh.
vector< vector< vector< unsigned int > > > side_nodes
const RegionDB & region_db() const
vector< Boundary > boundary_
unsigned int n_vb_neighbours() const
unsigned int n_elements() const
MPI_Comm get_comm() const
unsigned int n_boundaries() const
Class for O(log N) lookup for intersections with a set of bounding boxes.
ElementVector bc_elements
void reserve_element_size(unsigned int n_elements)
Reserve size of element vector.
#define TYPEDEF_ERR_INFO(EI_Type, Type)
Macro to simplify declaration of error_info types.
std::shared_ptr< BIHTree > bih_tree_
Distribution * get_el_ds() const
vector< vector< unsigned int > > node_elements_
Dedicated class for storing path to input and output files.
vector< vector< unsigned int > > master_elements
vector< Neighbour > vb_neighbours_
unsigned int n_all_input_elements_
Number of elements read from input.
unsigned int max_edge_sides(unsigned int dim) const
FilePath mesh_file()
Return FilePath object representing "mesh_file" input key.
IdxInt * row_4_el
Index set assigning to global element index the local index used in parallel vectors.
std::vector< Edge > edges
Vector of MH edges, this should not be part of the geometrical mesh.
unsigned int n_nodes() const
IntersectionSearch
Types of search algorithm for finding intersection candidates.
unsigned int n_edges() const
void reserve_node_size(unsigned int n_nodes)
Reserve size of node vector.
IdxInt * get_row_4_el() const
std::shared_ptr< Partitioning > part_
NodeVector node_vector
Vector of nodes of the mesh.
Main class for computation of intersection of meshes of combined dimensions.
ElementVector element
Vector of elements of the mesh.
std::vector< BoundingBox > element_box_
Auxiliary vector of mesh elements bounding boxes.
IdxInt * el_4_loc
Index set assigning to local element index its global index.