49 #include "boost/shared_ptr.hpp"
52 template <
int spacedim>
65 #define MESH_CRITICAL_VOLUME 1.0E-12
72 #define FOR_NODES(_mesh_, i) \
73 for( NodeFullIter i( (_mesh_)->node_vector.begin() ); \
74 i != (_mesh_)->node_vector.end(); \
80 #define NODE_FULL_ITER(_mesh_,i) \
81 (_mesh_)->node_vector.full_iter(i)
86 #define NODE_FULL_ITER_NULL(_mesh_) \
87 NodeFullIter((_mesh_)->node_vector)
92 #define ELEM_FULL_ITER(_mesh_,i) \
93 (_mesh_)->element.full_iter(i)
96 #define FOR_NODE_ELEMENTS(i,j) for((j)=0;(j)<(i)->n_elements();(j)++)
97 #define FOR_NODE_SIDES(i,j) for((j)=0;(j)<(i)->n_sides;(j)++)
340 boost::shared_ptr<Partitioning>
part_;
364 #define FOR_ELEMENTS(_mesh_,__i) \
365 for( ElementFullIter __i( (_mesh_)->element.begin() ); \
366 __i != (_mesh_)->element.end(); \
372 #define ELEMENT_FULL_ITER(_mesh_,i) \
373 (_mesh_)->element.full_iter(i)
378 #define ELEMENT_FULL_ITER_NULL(_mesh_) \
379 ElementFullIter((_mesh_)->element)
382 #define FOR_BOUNDARIES(_mesh_,i) \
383 for( std::vector<Boundary>::iterator i= (_mesh_)->boundary_.begin(); \
384 i != (_mesh_)->boundary_.end(); \
390 #define BOUNDARY_FULL_ITER(_mesh_,i) \
391 (_mesh_)->boundary.full_iter(i)
396 #define BOUNDARY_NULL(_mesh_) \
397 BoundaryFullIter((_mesh_)->boundary)
403 #define FOR_EDGES(_mesh_,__i) \
404 for( vector<Edge>::iterator __i = (_mesh_)->edges.begin(); \
405 __i !=(_mesh_)->edges.end(); \
408 #define FOR_SIDES(_mesh_, it) \
409 FOR_ELEMENTS((_mesh_), ele) \
410 for(SideIter it = ele->side(0); it->el_idx() < ele->n_sides(); ++it)
412 #define FOR_SIDE_NODES(i,j) for((j)=0;(j)<(i)->n_nodes;(j)++)
415 #define FOR_NEIGHBOURS(_mesh_, it) \
416 for( std::vector<Neighbour>::iterator it = (_mesh_)->vb_neighbours_.begin(); \
417 (it)!= (_mesh_)->vb_neighbours_.end(); ++it)
419 #define FOR_NEIGH_ELEMENTS(i,j) for((j)=0;(j)<(i)->n_elements;(j)++)
420 #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.