Flow123d
JS_before_hm-2206-gca2a8366f
|
Go to the documentation of this file.
22 #include <unordered_map>
68 : nodes_(make_shared<
Armor::Array<double>>(3, 1, 0)),
73 duplicate_nodes_(nullptr),
87 for(
int dim=0; dim < 3; dim++) {
89 for(
int i_side=0; i_side < dim+2; i_side++)
93 for (
unsigned int sid=0; sid<RefElement<1>::n_sides; sid++)
94 for (
unsigned int nid=0; nid<RefElement<1>::n_nodes_per_side; nid++)
97 for (
unsigned int sid=0; sid<RefElement<2>::n_sides; sid++)
98 for (
unsigned int nid=0; nid<RefElement<2>::n_nodes_per_side; nid++)
101 for (
unsigned int sid=0; sid<RefElement<3>::n_sides; sid++)
102 for (
unsigned int nid=0; nid<RefElement<3>::n_nodes_per_side; nid++)
111 if (edg.side_)
delete[] edg.side_;
113 for (
unsigned int idx=0; idx <
element_vec_.size(); idx++) {
126 auto bgn_it = make_iter<Edge>(
Edge(
this, 0) );
127 auto end_it = make_iter<Edge>(
Edge(
this,
edges.size()) );
134 return Edge(
this, edge_idx);
149 std::array<std::pair<uint,uint>, 6>
_comparisons = { {{0,1},{0,2},{0,3},{1,2},{1,3},{2,3}} };
186 for(
uint i=0; i<6; i++) {
205 "Use BIH for finding initial candidates, then continue by prolongation.")
207 "Use BIH for finding all candidates.")
209 "Use bounding boxes for finding initial candidates, then continue by prolongation.")
214 return IT::Record(
"Mesh",
"Record with mesh related data." )
217 "Input file with mesh description.")
219 "List of additional region and region set definitions not contained in the mesh. "
220 "There are three region sets implicitly defined:\n\n"
221 "- ALL (all regions of the mesh)\n"
222 "- .BOUNDARY (all boundary regions)\n"
223 "- BULK (all bulk regions)")
227 IT::Default(
"\"BIHsearch\""),
"Search algorithm for element intersections.")
229 "Maximal snapping distance from the mesh in various search operations. In particular, it is used "
230 "to find the closest mesh element of an observe point; and in FieldFormula to find closest surface "
231 "element in plan view (Z projection).")
233 "Output file with neighboring data from mesh.")
235 "This will speed up the calculations. GMSH output preserves original ordering but is slower. All variants of VTK output use the permuted.")
241 node_4_loc_(nullptr),
243 bc_mesh_(new
BCMesh(this))
250 : optimize_memory_locality(true),
251 in_record_(in_record),
253 node_4_loc_(nullptr),
255 bc_mesh_(new
BCMesh(this))
263 : optimize_memory_locality(other.optimize_memory_locality),
264 in_record_(other.in_record_),
266 node_4_loc_(nullptr),
268 bc_mesh_(new
BCMesh(this))
285 istringstream is(
"{mesh_file=\"\", optimize_mesh=false}");
319 unsigned int li, count = 0;
321 for (li=0; li<ele->n_nodes(); li++) {
349 std::string reg_name =
"UndefinedRegion";
352 dim_to_check = ele.
dim();
356 for (
auto elem_to_region :
map) {
359 if( ele.
dim() != dim_to_check){
360 THROW(ExcRegionElmDiffDim() << EI_Region(reg_name) << EI_RegIdx(elem_to_region.second) << EI_Dim(dim_to_check)
361 << EI_DimOther(ele.
dim()) << EI_ElemId(elem_to_region.first) );
376 double quality = ele.quality_measure_smooth();
382 if (quality < 4*std::numeric_limits<double>::epsilon())
383 THROW( ExcBadElement() << EI_Quality(quality) << EI_ElemId(ele.idx()) );
385 WarningOut().fmt(
"Bad quality element ID={}, ({}<0.001).\n", ele.idx(), quality);
388 for (
uint ele_node=0; ele_node<ele->n_nodes(); ele_node++) {
389 uint inode = ele->node_idx(ele_node);
390 nodes_new_idx[inode] = inode;
400 for(
uint inode = 0; inode < nodes_new_idx.size(); inode++) {
402 WarningOut().fmt(
"A node {} does not belong to any element "
403 " and will be removed.",
408 nodes_new_idx[inode] = inode_new;
418 uint n_nodes_new = inode_new;
421 if(n_nodes_new < nodes_new_idx.size()){
423 DebugOut() <<
"Updating node-element numbering due to unused nodes: "
427 nodes_->resize(n_nodes_new);
432 for (
uint ele_node=0; ele_node<ele->n_nodes(); ele_node++) {
433 uint inode_orig = ele->node_idx(ele_node);
434 uint inode = nodes_new_idx[inode_orig];
436 const_cast<Element*
>(ele.element())->
nodes_[ele_node] = inode;
469 id_4_old[i++] = ele.idx();
509 this->
node_ids_->add_item( node_ids_backup[new_node_ids[i]] );
544 for (
unsigned int n=0; n<ele->n_nodes(); n++)
548 stable_sort(n->begin(), n->end());
558 if (nodes_list.size() == 0) {
559 intersection_element_list.clear();
560 }
else if (nodes_list.size() == 1) {
567 it1=set_intersection(
570 intersection_element_list.begin());
571 intersection_element_list.resize(it1-intersection_element_list.begin());
573 for(;it2<nodes_list.end();++it2) {
574 it1=set_intersection(
575 intersection_element_list.begin(), intersection_element_list.end(),
577 intersection_element_list.begin());
578 intersection_element_list.resize(it1-intersection_element_list.begin());
585 bool is_neighbour =
false;
596 if (is_neighbour)
THROW(ExcTooMatchingIds() << EI_ElemId(this->
elem_index(*ele)) << EI_ElemIdOther(this->
elem_index(element_idx)) );
602 element_list.resize( e_dest - element_list.begin());
611 return ( ni == si->
n_nodes() );
627 unsigned int ngh_element_idx;
630 neighbour.
mesh_ =
this;
651 THROW( ExcBdrElemMatchRegular() << EI_ElemId(bc_ele.
idx()) << EI_ElemIdOther(this->
elem_index(ngh_element_idx)) );
653 if (intersection_list.size() == 0) {
655 WarningOut().fmt(
"Lonely boundary element, id: {}, region: {}, dimension {}.\n",
659 last_edge_idx=
edges.size();
660 edges.resize(last_edge_idx+1);
661 edg = &(
edges.back() );
663 edg->
side_ =
new struct SideIter[ intersection_list.size() ];
677 for (
unsigned int ecs=0; ecs<elem->
n_sides(); ecs++) {
683 int new_bc_ele_idx=i;
684 THROW( ExcDuplicateBoundary()
710 for (
unsigned int s=0; s<e->n_sides(); s++)
713 if (e->edge_idx(s) !=
undef_idx)
continue;
718 for (
unsigned n=0; n<e.side(s)->
n_nodes(); n++)
side_nodes[n] = e.side(s)->node(n).idx();
728 last_edge_idx=
edges.size();
729 edges.resize(last_edge_idx+1);
730 edg = &(
edges.back() );
732 edg->
side_ =
new struct SideIter[ intersection_list.size() ];
736 if (intersection_list.size() == 1) {
740 edg->
side_[0] = e.side(s);
743 if (e->boundary_idx_ == NULL) {
756 bc_ele->
init(e->dim()-1,
region_db_->implicit_boundary_region() );
774 for (
unsigned int ecs=0; ecs<elem->
n_sides(); ecs++) {
780 last_edge_idx=
edges.size();
781 edges.resize(last_edge_idx+1);
782 edg = &(
edges.back() );
804 ASSERT_EQ( (
unsigned int) edg->
n_sides, intersection_list.size())(e.input_id())(s).error(
"Missing edge sides.");
822 ele->n_neighs_vb_ =0;
825 for (
auto & ngh : this->
vb_neighbours_) ngh.element()->n_neighs_vb_++;
829 if( ele->n_neighs_vb() > 0 ) {
830 ele->neigh_vb =
new struct Neighbour* [ele->n_neighs_vb()];
836 for (
auto & ngh : this->vb_neighbours_) {
858 intersections = std::make_shared<MixedMeshIntersections>(
this);
880 if (bulk_elements_id.size() ==0) {
884 map_it = bulk_elements_id.begin();
885 for(
unsigned int idx=0; idx <
n_elements(); idx++, ++map_it) {
889 std::sort(bulk_elements_id.begin(), bulk_elements_id.end());
892 map_it = boundary_elements_id.begin();
898 if (
id < 0) *map_it=-1;
906 static const double point_tolerance = 1E-10;
907 return fabs(p1[0]-p2[0]) < point_tolerance
908 && fabs(p1[1]-p2[1]) < point_tolerance
909 && fabs(p1[2]-p2[2]) < point_tolerance;
921 std::shared_ptr<EquivalentMeshMap> map_ptr =
932 unsigned int i_node, i_elm_node;
943 for (i_node=0; i_node<ele->
n_nodes(); i_node++)
945 static const double point_tolerance = 1E-10;
946 if ( arma::norm(*ele.
node(i_node) - *nod, 1) < point_tolerance) {
947 i_elm_node = ele.
node(i_node).idx();
949 found_i_node = i_elm_node;
950 else if (found_i_node != i_elm_node) {
952 return std::make_shared<EquivalentMeshMap>();
959 node_ids[nod.idx()] = found_i_node;
961 searched_elements.clear();
965 unsigned int n_found = 0;
973 return std::make_shared<EquivalentMeshMap>();
992 unsigned int n_found = 0;
996 for (
unsigned int j=0; j<elm->n_nodes(); j++) {
997 if (node_ids[ elm->node_idx(j) ] ==
undef_idx)
999 node_list.push_back( node_ids[ elm->node_idx(j) ] );
1004 for (
auto i_elm : candidate_list) {
1006 result_list.push_back(i_elm);
1010 if (result_list.size() == 1) {
1011 map[result_list[0]] = elm.idx();
1016 result_list.clear();
1025 it != region_list.
end();
1055 boxes[i] =
element.bounding_box();
1064 bih_tree_ = std::make_shared<BIHTree>();
1076 region_db_->add_region(
id, name, dim,
"$PhysicalNames");
1088 void Mesh::add_element(
unsigned int elm_id,
unsigned int dim,
unsigned int region_id,
unsigned int partition_id,
1092 region_idx =
region_db_->add_region( region_id,
region_db_->create_label_from_id(region_id), dim,
"$Element" );
1097 WarningOut().fmt(
"Bulk elements of zero size(dim=0) are not supported. Element ID: {}.\n", elm_id);
1100 this->
init_element(ele, elm_id, dim, region_idx, partition_id, node_ids);
1107 ele->
init(dim, region_idx);
1108 ele->
pid_ = partition_id;
1111 for (; ni<ele->
n_nodes(); ni++) {
1122 WarningOut().fmt(
"Tetrahedron element with id {} has wrong numbering or is degenerated (Jacobian = {}).",elm_id, jac);
1191 ofstream raw_ngh_output_file;
1195 MessageOut() <<
"Opening raw ngh output: " << raw_output_file_path <<
"\n";
1197 raw_output_file_path.
open_stream(raw_ngh_output_file);
1201 if (! raw_ngh_output_file.is_open())
return;
1204 raw_ngh_output_file <<
"// fields:\n//ele_id n_sides ns_side_neighbors[n] neighbors[n*ns] n_vb_neighbors vb_neighbors[n_vb]\n";
1210 unsigned int undefined_ele_id = -1;
1213 if(ele->n_neighs_vb() > 0){
1214 for (
unsigned int i = 0; i < ele->n_neighs_vb(); i++){
1217 auto search = neigh_vb_map.find(higher_ele.
idx());
1218 if(search != neigh_vb_map.end()){
1220 search->second[ele->neigh_vb[i]->side()->side_idx()] = ele.idx();
1225 higher_ele_side_ngh[ele->neigh_vb[i]->side()->side_idx()] = ele.idx();
1226 neigh_vb_map[higher_ele.
idx()] = higher_ele_side_ngh;
1232 for (
unsigned int i_elem=0; i_elem<
n_elements(); ++i_elem)
1235 std::stringstream ss;
1236 ss << ele.input_id() <<
" ";
1237 ss << ele->n_sides() <<
" ";
1240 auto &new_to_old_node = ele.orig_nodes_order();
1242 for (
unsigned int i = 0; i < ele->n_sides(); i++) {
1244 uint new_opp_node = ele->n_sides() - i - 1;
1245 uint old_opp_node = new_to_old_node[new_opp_node];
1246 uint old_iside = ele->n_sides() - old_opp_node - 1;
1247 old_to_new_side[old_iside] = i;
1250 auto search_neigh = neigh_vb_map.end();
1251 for (
unsigned int i = 0; i < ele->n_sides(); i++) {
1252 uint new_iside = old_to_new_side[i];
1254 uint n_side_neighs = ele.side(new_iside)->edge().n_sides()-1;
1256 if(n_side_neighs == 0){
1258 if(search_neigh == neigh_vb_map.end())
1259 search_neigh = neigh_vb_map.find(ele.idx());
1261 if(search_neigh != neigh_vb_map.end())
1262 if(search_neigh->second[new_iside] != undefined_ele_id)
1265 ss << n_side_neighs <<
" ";
1268 for (
unsigned int i = 0; i < ele->n_sides(); i++) {
1269 uint new_iside = old_to_new_side[i];
1273 if(
edge.
side(j) != ele.side(new_iside))
1278 else if(search_neigh != neigh_vb_map.end()
1279 && search_neigh->second[new_iside] != undefined_ele_id){
1281 ss << neigh_ele.input_id() <<
" ";
1286 ss << ele->n_neighs_vb() <<
" ";
1287 for (
unsigned int i = 0; i < ele->n_neighs_vb(); i++)
1288 ss << ele->neigh_vb[i]->side()->element().input_id() <<
" ";
1291 string line = ss.str();
1292 raw_ngh_output_file << line.substr(0, line.size()-1) << endl;
1295 raw_ngh_output_file <<
"$EndFlowField\n" << endl;
1303 ASSERT_PTR(
el_4_loc).error(
"Array 'el_4_loc' is not initialized. Did you call Partitioning::id_maps?\n");
1305 unsigned int i_proc, i_node, i_ghost_node, elm_node;
1306 unsigned int my_proc =
el_ds->
myp();
1307 unsigned int n_proc =
el_ds->
np();
1315 i_proc = elm.proc();
1316 for (elm_node=0; elm_node<elm->n_nodes(); elm_node++) {
1317 i_node = elm->node_idx(elm_node);
1318 if (i_proc == my_proc) local_node_flag[i_node] =
true;
1319 if (i_proc < node_proc[i_node]) node_proc[i_node] = i_proc;
1325 for(
uint i_proc : node_proc) {
1326 if (i_proc == my_proc)
1328 else if (i_proc == n_proc)
1336 i_ghost_node = n_own_nodes;
1337 for (
unsigned int i=0; i<this->
n_nodes(); ++i) {
1338 if (local_node_flag[i]) {
1339 if (node_proc[i]==my_proc)
shared_ptr< Armor::Array< double > > nodes_
std::shared_ptr< RegionDB > region_db_
Edge edge() const
Returns pointer to the edge connected to the side.
void calculate_node_curve_values_as_hilbert()
unsigned int np() const
get num of processors
std::vector< unsigned int > node_permutation_
Vector of node permutations of optimized mesh (see class MeshOptimizer)
const Element & element(unsigned idx) const
Bidirectional map templated by <T, unsigned int>.
Class RefElement defines numbering of vertices, sides, calculation of normal vectors etc.
std::vector< int > sort_elements(std::vector< unsigned int > &elem_permutation)
std::string label() const
Returns label of the region (using RegionDB)
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.
unsigned int edge_idx_
Index of Edge in Mesh.
LongIdx * node_4_loc_
Index set assigning to local node index its global index.
LongIdx * row_4_el
Index set assigning to global element index the local index used in parallel vectors.
unsigned int elem_idx_
Index of element in Mesh::element_vec_.
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.
unsigned int myp() const
get my processor
static Input::Type::Abstract & get_input_type()
void calculate_element_curve_values_as_hilbert_of_centers()
unsigned int n_sides() const
virtual std::shared_ptr< EquivalentMeshMap > check_compatible_mesh(Mesh &input_mesh)
Support classes for parallel programing.
unsigned int n_sides() const
Returns number of sides aligned with the edge.
std::array< std::pair< uint, uint >, 6 > _comparisons
Main class for computation of intersection of meshes of combined dimensions.
bool compare_points(const arma::vec3 &p1, const arma::vec3 &p2)
ArmaVec< Type, nr > vec(uint mat_index) const
int pid_
Id # of mesh partition.
Dedicated class for storing path to input and output files.
LongIdx * el_4_loc
Index set assigning to local element index its global index.
bool is_valid() const
Returns false if the region has undefined/invalid value.
void sort_permuted_nodes_elements(std::vector< int > new_node_ids, std::vector< int > new_elem_ids)
Sort elements and nodes by order stored in permutation vectors.
static const Input::Type::Record & get_input_type()
Boundary boundary(uint edge_idx) const override
static const unsigned int undef_idx
Class for O(log N) lookup for intersections with a set of bounding boxes.
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
friend class RegionSetBase
shared_ptr< BidirectionalMap< int > > node_ids_
Maps node ids to indexes into vector node_vec_.
Class for the mesh partitioning. This should provide:
uint permutation_
Index of permutation of input nodes.
const LongIdx * get_loc_part() const
unsigned int idx() const
Returns a global index of the region.
unsigned int n_local_nodes_
Hold number of local nodes (own + ghost), value is equal with size of node_4_loc array.
std::string format(CStringRef format_str, ArgList args)
const Element * element() const
void open_stream(Stream &stream) const
Range< ElementAccessor< 3 > > elements_range() const
Returns range of mesh elements.
void read_regions_from_input(Input::Array region_list)
IntersectionSearch get_intersection_search()
Getter for input type selection for intersection search algorithm.
bool optimize_memory_locality
#define ASSERT_LT(a, b)
Definition of comparative assert macro (Less Than) only for debug mode.
DuplicateNodes * duplicate_nodes_
unsigned int id() const
Returns id of the region (using RegionDB)
const Neighbour & vb_neighbour(unsigned int nb) const
Return neighbour with given index.
int get_position(T val) const
Return position of item of given value.
bool same_sides(const SideIter &si, vector< unsigned int > &side_nodes)
static const unsigned int undefined_dim
std::vector< int > sort_nodes(std::vector< unsigned int > &node_permutation)
void output_internal_ngh_data()
Output of neighboring data into raw output.
BCMesh * bc_mesh() const override
Implement MeshBase::bc_mesh(), getter of boundary mesh.
std::vector< EdgeData > edges
Vector of MH edges, this should not be part of the geometrical mesh.
void check_mesh_on_read()
const LongIdx * get_local_part() override
void find_point(const Space< 3 >::Point &point, std::vector< unsigned int > &result_list, bool full_list=false) const
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.
#define ASSERT_PERMANENT(expr)
Allow use shorter versions of macro names if these names is not used with external library.
SideIter side(const unsigned int i) const
Gets side iterator of the i -th side.
const vector< vector< unsigned int > > & node_elements()
bool is_boundary() const
Returns true if it is a Boundary region and false if it is a Bulk region.
vector< Neighbour > vb_neighbours_
Vector of compatible neighbourings.
Range< NodeAccessor< 3 > > node_range() const
Returns range of nodes.
void elements_id_maps(vector< LongIdx > &bulk_elements_id, vector< LongIdx > &boundary_elements_id) const
Element * add_element_to_vector(int id, bool is_boundary=false)
Adds element to mesh data structures (element_vec_, element_ids_), returns pointer to this element.
unsigned int n_neighs_vb_
ElementAccessor< 3 > element_accessor(unsigned int idx) const
Create and return ElementAccessor to element of given idx.
NodeAccessor< 3 > node(unsigned int idx) const
Create and return NodeAccessor to node of given idx.
const unsigned int * get_lsizes_array()
get local sizes array
double jacobian_S3() const
IntersectionSearch
Types of search algorithm for finding intersection candidates.
#define ASSERT_EQ(a, b)
Definition of comparative assert macro (EQual) only for debug mode.
void init(unsigned int dim, RegionIdx reg)
void init_distribution()
setup distribution of elements and related vectors
ElementAccessor< 3 > element() const
Returns iterator to the element of the side.
std::shared_ptr< BIHTree > bih_tree_
Distribution * node_ds_
Parallel distribution of nodes. Depends on elements distribution.
unsigned int n_nodes() const
Returns number of nodes of the side.
NodeAccessor< 3 > node(unsigned int ni) const
~Mesh() override
Destructor.
void element_to_neigh_vb()
unsigned int node_idx(unsigned int ni) const
Return index (in Mesh::node_vec) of ni-th node.
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.
unsigned int side_idx() const
Returns local index of the side on the element.
unsigned int input_id() const
Return the element ID in the input mesh. Should be only used for special output.
static const Input::Type::Record & get_input_type()
void init_node_vector(unsigned int size)
Initialize node_vec_, set size.
Partitioning * get_part() override
std::array< unsigned int, 4 > nodes_
indices to element's nodes
int find_elem_id(unsigned int pos) const
Return element id (in GMSH file) of element of given position in element vector.
unsigned int edge_idx(unsigned int edg_idx) const
Return edge_idx of given index.
int LongIdx
Define type that represents indices of large arrays (elements, nodes, dofs etc.)
Edge edge(uint edge_idx) const
Return edge with given index.
void modify_element_ids(const RegionDB::MapElementIDToRegionID &map)
void intersect_element_lists(vector< unsigned int > const &nodes_list, vector< unsigned int > &intersection_element_list)
unsigned int n_sides() const
Distribution * el_ds
Parallel distribution of elements.
unsigned int check_compatible_elements(MeshBase *source_mesh, MeshBase *target_mesh, const std::vector< unsigned int > &node_ids, std::vector< LongIdx > &map)
void init_element_vector(unsigned int size)
Initialize element_vec_, set size and reset counters of boundary and bulk elements.
void make_neighbours_and_edges()
void clear()
Clear the content. Do not release memory.
std::vector< unsigned int > elem_permutation_
Vector of element permutations of optimized mesh (see class MeshOptimizer)
MeshBase * mesh_
Pointer to Mesh to which belonged.
#define WarningOut()
Macro defining 'warning' record of log.
vector< vector< unsigned int > > node_elements_
For each node the vector contains a list of elements that use this node.
Base class for Mesh and BCMesh.
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.
unsigned int n_vb_neighbours() const
vector< vector< vector< unsigned int > > > side_nodes
bool find_lower_dim_element(vector< unsigned int > &element_list, unsigned int dim, unsigned int &element_idx)
void add_node(unsigned int node_id, arma::vec3 coords)
Add new node of given id and coordinates to mesh.
BCMesh * bc_mesh() const override
Implement MeshBase::bc_mesh()
Range< Edge > edge_range() const
Return range of edges.
unsigned int idx() const
We need this method after replacing Region by RegionIdx, and movinf RegionDB instance into particular...
std::shared_ptr< Partitioning > part_
BidirectionalMap< int > element_ids_
Maps element ids to indexes into vector element_vec_.
unsigned int add_item(T val)
Add new item at the end position of map.
double global_snap_radius() const
Maximal distance of observe point from Mesh relative to its size.
unsigned int n_elements() const
vector< BoundaryData > boundary_
unsigned int n_local_nodes() const
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 create_node_element_lists()
NodeAccessor< 3 > node(unsigned int i) const
Returns node for given local index i on the side.
BCMesh * bc_mesh_
Boundary mesh, object is created only if it's necessary.
MixedMeshIntersections & mixed_intersections()
#define DebugOut()
Macro defining 'debug' record of log.
#define ASSERT_PTR(ptr)
Definition of assert macro checking non-null pointer (PTR) only for debug mode.
SideIter side(const unsigned int loc_index)
int find_node_id(unsigned int pos) const
Return node id (in GMSH file) of node of given position in node vector.
void reserve(unsigned int init_size=0)
Reset data of map, reserve space for given size.
unsigned int max_edge_sides_[3]
Maximal number of sides per one edge in the actual mesh (set in make_neighbours_and_edges()).
vector< Element > element_vec_
#define START_TIMER(tag)
Starts a timer with specified tag.
unsigned int n_nodes() const
virtual BCMesh * bc_mesh() const =0
unsigned int * boundary_idx_
std::array< std::array< uint, 4 >, 64 > element_nodes_original_
void add_physical_name(unsigned int dim, unsigned int id, std::string name)
Add new node of given id and coordinates to mesh.
#define END_TIMER(tag)
Ends a timer with specified tag.
unsigned int n_nodes() const
Implementation of range helper class.
#define MessageOut()
Macro defining 'message' record of log.
std::shared_ptr< MixedMeshIntersections > intersections