48 #include "boost/shared_ptr.hpp"
51 template <
int spacedim>
64 #define MESH_CRITICAL_VOLUME 1.0E-12
71 #define FOR_NODES(_mesh_, i) \
72 for( NodeFullIter i( (_mesh_)->node_vector.begin() ); \
73 i != (_mesh_)->node_vector.end(); \
79 #define NODE_FULL_ITER(_mesh_,i) \
80 (_mesh_)->node_vector.full_iter(i)
85 #define NODE_FULL_ITER_NULL(_mesh_) \
86 NodeFullIter((_mesh_)->node_vector)
91 #define ELEM_FULL_ITER(_mesh_,i) \
92 (_mesh_)->element.full_iter(i)
95 #define FOR_NODE_ELEMENTS(i,j) for((j)=0;(j)<(i)->n_elements();(j)++)
96 #define FOR_NODE_SIDES(i,j) for((j)=0;(j)<(i)->n_sides;(j)++)
333 boost::shared_ptr<Partitioning>
part_;
357 #define FOR_ELEMENTS(_mesh_,__i) \
358 for( ElementFullIter __i( (_mesh_)->element.begin() ); \
359 __i != (_mesh_)->element.end(); \
365 #define ELEMENT_FULL_ITER(_mesh_,i) \
366 (_mesh_)->element.full_iter(i)
371 #define ELEMENT_FULL_ITER_NULL(_mesh_) \
372 ElementFullIter((_mesh_)->element)
375 #define FOR_BOUNDARIES(_mesh_,i) \
376 for( std::vector<Boundary>::iterator i= (_mesh_)->boundary_.begin(); \
377 i != (_mesh_)->boundary_.end(); \
383 #define BOUNDARY_FULL_ITER(_mesh_,i) \
384 (_mesh_)->boundary.full_iter(i)
389 #define BOUNDARY_NULL(_mesh_) \
390 BoundaryFullIter((_mesh_)->boundary)
396 #define FOR_EDGES(_mesh_,__i) \
397 for( vector<Edge>::iterator __i = (_mesh_)->edges.begin(); \
398 __i !=(_mesh_)->edges.end(); \
401 #define FOR_SIDES(_mesh_, it) \
402 FOR_ELEMENTS((_mesh_), ele) \
403 for(SideIter it = ele->side(0); it->el_idx() < ele->n_sides(); ++it)
405 #define FOR_SIDE_NODES(i,j) for((j)=0;(j)<(i)->n_nodes;(j)++)
408 #define FOR_NEIGHBOURS(_mesh_, it) \
409 for( std::vector<Neighbour>::iterator it = (_mesh_)->vb_neighbours_.begin(); \
410 (it)!= (_mesh_)->vb_neighbours_.end(); ++it)
412 #define FOR_NEIGH_ELEMENTS(i,j) for((j)=0;(j)<(i)->n_elements;(j)++)
413 #define FOR_NEIGH_SIDES(i,j) for((j)=0;(j)<(i)->n_sides;(j)++)
Class for the mesh partitioning. This should provide:
Mesh(const std::string &input_str="{mesh_file=\"\"}", MPI_Comm com=MPI_COMM_WORLD)
vector< vector< unsigned int > > node_elements
void make_intersec_elements()
static Input::Type::Record input_type
static const unsigned int undef_idx
void create_node_element_lists()
unsigned int max_edge_sides_[3]
Maximal number of sides per one edge in the actual mesh (set in make_neighbours_and_edges()).
boost::shared_ptr< Partitioning > part_
vector< vector< vector< unsigned int > > > side_nodes
const RegionDB & region_db() const
ElementAccessor< 3 > element_accessor(unsigned int idx, bool boundary=false)
vector< Boundary > boundary_
Partitioning * get_part()
unsigned int size() const
Returns size of the container. This is independent of the allocated space.
unsigned int n_vb_neighbours() const
unsigned int n_elements() const
bool same_sides(const SideIter &si, vector< unsigned int > &side_nodes)
MPI_Comm get_comm() const
vector< int > const & elements_id_maps(bool boundary_domain) const
unsigned int n_boundaries() const
ElementVector bc_elements
vector< int > boundary_elements_id_
void count_element_types()
void read_gmsh_from_stream(istream &in)
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
static Input::Type::Record input_type
std::vector< Edge > edges
Vector of MH edges, this should not be part of the geometrical mesh.
vector< Intersection > intersections
void intersect_element_lists(vector< unsigned int > const &nodes_list, vector< unsigned int > &intersection_element_list)
void make_edge_permutations()
unsigned int n_nodes() const
unsigned int n_edges() const
void element_to_neigh_vb()
void reinit(Input::Record in_record)
bool find_lower_dim_element(ElementVector &elements, vector< unsigned int > &element_list, unsigned int dim, unsigned int &element_idx)
vector< int > bulk_elements_id_
void make_neighbours_and_edges()
NodeVector node_vector
Vector of nodes of the mesh.
ElementVector element
Vector of elements of the mesh.