Flow123d
release_3.0.0-973-g92f55e826
|
Go to the documentation of this file.
52 template <
class Object>
class Range;
64 #define MESH_CRITICAL_VOLUME 1.0E-12
87 <<
"Duplicate boundary elements! \n"
88 <<
"Element id: " << EI_ElemLast::val <<
" on region name: " << EI_RegLast::val <<
"\n"
89 <<
"Element id: " << EI_ElemNew::val <<
" on region name: " << EI_RegNew::val <<
"\n");
325 void add_element(
unsigned int elm_id,
unsigned int dim,
unsigned int region_id,
unsigned int partition_id,
499 std::shared_ptr<Partitioning>
part_;
unsigned int partition_id
Distribution * get_el_ds() const
void permute_triangle(unsigned int elm_idx, std::vector< unsigned int > permutation_vec)
Permute nodes of 2D elements of given elm_idx.
Template Iter serves as general template for internal iterators.
void permute_tetrahedron(unsigned int elm_idx, std::vector< unsigned int > permutation_vec)
Permute nodes of 3D elements of given elm_idx.
vector< Boundary > boundary_
static const Input::Type::Selection & get_input_intersection_variant()
The definition of input record for selection of variant of file format.
std::vector< BoundingBox > get_element_boxes()
Compute bounding boxes of elements contained in mesh.
LongIdx * node_4_loc_
Index set assigning to local node index its global index.
void init_element_vector(unsigned int size)
Initialize element_vec_, set size and reset counters of boundary and bulk elements.
static const unsigned int undef_idx
void create_boundary_elements()
Create boundary elements from data of temporary structure, this method MUST be call after read mesh f...
ElementTmpData(unsigned int e_id, unsigned int dm, RegionIdx reg_idx, unsigned int part_id, std::vector< unsigned int > nodes)
Constructor.
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.
General iterator template. Provides iterator over objects in some container.
int LongIdx
Define type that represents indices of large arrays (elements, nodes, dofs etc.)
virtual Range< ElementAccessor< 3 > > elements_range() const
Returns range of bulk elements.
unsigned int n_sides() const
void reinit(Input::Record in_record)
Main class for computation of intersection of meshes of combined dimensions.
unsigned int boundary_loaded_size_
Count of boundary elements loaded from mesh file.
vector< Element > element_vec_
Dedicated class for storing path to input and output files.
static const Input::Type::Record & get_input_type()
Class for O(log N) lookup for intersections with a set of bounding boxes.
unsigned int max_edge_sides_[3]
Maximal number of sides per one edge in the actual mesh (set in make_neighbours_and_edges()).
unsigned int n_edges() const
TYPEDEF_ERR_INFO(EI_ElemLast, int)
Class for the mesh partitioning. This should provide:
void make_edge_permutations()
LongIdx * get_row_4_el() const
Range< NodeAccessor< 3 > > node_range() const
Returns range of nodes.
Iter< ElementAccessor< 3 > > ElementIter
unsigned int n_local_nodes_
Hold number of local nodes (own + ghost), value is equal with size of node_4_loc array.
void read_regions_from_input(Input::Array region_list)
IntersectionSearch get_intersection_search()
Getter for input type selection for intersection search algorithm.
unsigned int n_vb_neighbours() const
Distribution * get_node_ds() const
Distribution * el_ds
Parallel distribution of elements.
void intersect_element_lists(vector< unsigned int > const &nodes_list, vector< unsigned int > &intersection_element_list)
int get_position(T val) const
Return position of item of given value.
void output_internal_ngh_data()
Output of neighboring data into raw output.
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")
std::vector< unsigned int > node_ids
virtual const LongIdx * get_local_part()
BidirectionalMap< int > node_ids_
Maps node ids to indexes into vector node_vec_.
void check_mesh_on_read()
bool find_lower_dim_element(vector< unsigned int > &element_list, unsigned int dim, unsigned int &element_idx)
void count_element_types()
const BIHTree & get_bih_tree()
Getter for BIH. Creates and compute BIH at first call.
void distribute_nodes()
Fill array node_4_loc_ and create object node_ds_ according to element distribution.
LongIdx * get_node_4_loc() const
void read_gmsh_from_stream(istream &in)
BCMesh * get_bc_mesh()
Create boundary mesh if doesn't exist and return it.
LongIdx * el_4_loc
Index set assigning to local element index its global index.
void elements_id_maps(vector< LongIdx > &bulk_elements_id, vector< LongIdx > &boundary_elements_id) const
vector< vector< vector< unsigned int > > > side_nodes
Implementation of bidirectional map.
IntersectionSearch
Types of search algorithm for finding intersection candidates.
int find_elem_id(unsigned int pos) const
Return element id (in GMSH file) of element of given position in element vector.
const RegionDB & region_db() const
Vector classes to support both Iterator, index and Id access and creating co-located vectors.
vector< vector< unsigned int > > master_elements
FilePath mesh_file()
Return FilePath object representing "mesh_file" input key.
std::shared_ptr< BIHTree > bih_tree_
Distribution * node_ds_
Parallel distribution of nodes. Depends on elements distribution.
virtual bool check_compatible_mesh(Mesh &mesh, vector< LongIdx > &bulk_elements_id, vector< LongIdx > &boundary_elements_id)
bool same_sides(const SideIter &si, vector< unsigned int > &side_nodes)
void element_to_neigh_vb()
void check_element_size(unsigned int elem_idx) const
Check if given index is in element_vec_.
MPI_Comm get_comm() const
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.
virtual ~Mesh()
Destructor.
void create_node_element_lists()
std::vector< Edge > edges
Vector of MH edges, this should not be part of the geometrical mesh.
void modify_element_ids(const RegionDB::MapElementIDToRegionID &map)
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.
void make_neighbours_and_edges()
void init_node_vector(unsigned int size)
Initialize node_vec_, set size.
unsigned int n_boundaries() const
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.
Class represents boundary part of mesh.
static Input::Type::Record input_type
vector< vector< unsigned int > > node_elements_
For each node the vector contains a list of elements that use this node.
BidirectionalMap< int > element_ids_
Maps element ids to indexes into vector element_vec_.
void add_node(unsigned int node_id, arma::vec3 coords)
Add new node of given id and coordinates to mesh.
unsigned int max_edge_sides(unsigned int dim) const
vector< ElementTmpData > bc_element_tmp_
Hold data of boundary elements during reading mesh (allow to preserve correct order during reading of...
NodeAccessor< 3 > node_accessor(unsigned int idx) const
Create and return NodeAccessor to node of given idx.
Iter< NodeAccessor< 3 > > NodeIter
std::shared_ptr< Partitioning > part_
unsigned int bulk_size_
Count of bulk elements.
LongIdx * row_4_el
Index set assigning to global element index the local index used in parallel vectors.
Element * add_element_to_vector(int id, bool boundary=false)
Adds element to mesh data structures (element_vec_, element_ids_), returns pointer to this element.
const vector< vector< unsigned int > > & node_elements()
double global_snap_radius() const
Maximal distance of observe point from Mesh relative to its size.
unsigned int n_local_nodes() const
virtual unsigned int n_elements(bool boundary=false) const
Returns count of boundary or bulk elements.
virtual Partitioning * get_part()
BCMesh * bc_mesh_
Boundary mesh, object is created only if it's necessary.
MixedMeshIntersections & mixed_intersections()
virtual ElementAccessor< 3 > element_accessor(unsigned int idx) const
Create and return ElementAccessor to element of given idx.
virtual unsigned int n_nodes() const
ofstream raw_ngh_output_file
int find_node_id(unsigned int pos) const
Return node id (in GMSH file) of node of given position in node vector.
void add_physical_name(unsigned int dim, unsigned int id, std::string name)
Add new node of given id and coordinates to mesh.
vector< Neighbour > vb_neighbours_
unsigned int size() const
Return size of map.
Implementation of range helper class.
LongIdx * get_el_4_loc() const
std::shared_ptr< MixedMeshIntersections > intersections