51 #define MESH_CRITICAL_VOLUME 1.0E-12 58 #define FOR_NODES(_mesh_, i) \ 59 for( NodeFullIter i( (_mesh_)->node_vector.begin() ); \ 60 i != (_mesh_)->node_vector.end(); \ 66 #define NODE_FULL_ITER(_mesh_,i) \ 67 (_mesh_)->node_vector.full_iter(i) 72 #define NODE_FULL_ITER_NULL(_mesh_) \ 73 NodeFullIter((_mesh_)->node_vector) 78 #define ELEM_FULL_ITER(_mesh_,i) \ 79 (_mesh_)->element.full_iter(i) 82 #define FOR_NODE_ELEMENTS(i,j) for((j)=0;(j)<(i)->n_elements();(j)++) 83 #define FOR_NODE_SIDES(i,j) for((j)=0;(j)<(i)->n_sides;(j)++) 104 <<
"Duplicate boundary elements! \n" 105 <<
"Element id: " << EI_ElemLast::val <<
" on region name: " << EI_RegLast::val <<
"\n" 106 <<
"Element id: " << EI_ElemNew::val <<
" on region name: " << EI_RegNew::val <<
"\n");
110 static const unsigned int undef_idx=-1;
116 enum {x_coord=0, y_coord=1, z_coord=2};
138 return node_vector.size();
142 return element.size();
146 return boundary_.size();
153 unsigned int n_corners();
161 node_vector.reserve(n_nodes);
166 element.reserve(n_elements);
189 void make_intersec_elements();
191 unsigned int n_sides();
194 return vb_neighbours_.size();
201 unsigned int max_edge_sides(
unsigned int dim)
const {
return max_edge_sides_[dim-1]; }
283 void setup_topology();
288 void check_and_finish();
300 void add_node(
unsigned int node_id,
arma::vec3 coords);
303 void add_element(
unsigned int elm_id,
unsigned int dim,
unsigned int region_id,
unsigned int partition_id,
307 void add_physical_name(
unsigned int dim,
unsigned int id, std::string name);
311 return in_record_.val<
FilePath>(
"mesh_file");
333 void make_neighbours_and_edges();
339 void make_edge_permutations();
343 void create_node_element_lists();
357 void element_to_neigh_vb();
359 void count_element_types();
360 void count_side_types();
374 unsigned int max_edge_sides_[3];
384 std::shared_ptr<Partitioning>
part_;
426 #define FOR_ELEMENTS(_mesh_,__i) \ 427 for( ElementFullIter __i( (_mesh_)->element.begin() ); \ 428 __i != (_mesh_)->element.end(); \ 434 #define ELEMENT_FULL_ITER(_mesh_,i) \ 435 (_mesh_)->element.full_iter(i) 440 #define ELEMENT_FULL_ITER_NULL(_mesh_) \ 441 ElementFullIter((_mesh_)->element) 444 #define FOR_BOUNDARIES(_mesh_,i) \ 445 for( std::vector<Boundary>::iterator i= (_mesh_)->boundary_.begin(); \ 446 i != (_mesh_)->boundary_.end(); \ 452 #define BOUNDARY_FULL_ITER(_mesh_,i) \ 453 (_mesh_)->boundary.full_iter(i) 458 #define BOUNDARY_NULL(_mesh_) \ 459 BoundaryFullIter((_mesh_)->boundary) 465 #define FOR_EDGES(_mesh_,__i) \ 466 for( vector<Edge>::iterator __i = (_mesh_)->edges.begin(); \ 467 __i !=(_mesh_)->edges.end(); \ 470 #define FOR_SIDES(_mesh_, it) \ 471 FOR_ELEMENTS((_mesh_), ele) \ 472 for(SideIter it = ele->side(0); it->el_idx() < ele->n_sides(); ++it) 474 #define FOR_SIDE_NODES(i,j) for((j)=0;(j)<(i)->n_nodes;(j)++) 477 #define FOR_NEIGHBOURS(_mesh_, it) \ 478 for( std::vector<Neighbour>::iterator it = (_mesh_)->vb_neighbours_.begin(); \ 479 (it)!= (_mesh_)->vb_neighbours_.end(); ++it) 481 #define FOR_NEIGH_ELEMENTS(i,j) for((j)=0;(j)<(i)->n_elements;(j)++) 482 #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:
static Input::Type::Record input_type
#define DECLARE_EXCEPTION(ExcName, Format)
Macro for simple definition of exceptions.
int * get_el_4_loc() const
vector< vector< vector< unsigned int > > > side_nodes
const RegionDB & region_db() const
vector< Boundary > boundary_
int * el_4_loc
Index set assigning to local element index its global index.
int * row_4_el
Index set assigning to global element index the local index used in parallel vectors.
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.
int * get_row_4_el() const
std::vector< Edge > edges
Vector of MH edges, this should not be part of the geometrical mesh.
vector< Intersection > intersections
unsigned int n_nodes() const
unsigned int n_edges() const
void reserve_node_size(unsigned int n_nodes)
Reserve size of node vector.
std::shared_ptr< Partitioning > part_
NodeVector node_vector
Vector of nodes of the mesh.
ElementVector element
Vector of elements of the mesh.