31 : parent_mesh_(parent_mesh),
55 for (
unsigned int sid=0; sid<parent_el->n_sides(); sid++)
57 if (parent_el.side(sid)->is_boundary())
59 loc_el_ids.push_back(parent_el.side(sid)->cond().element_accessor().idx());
66 for (
unsigned int i=0; i<loc_el_ids.size(); i++) this->
el_4_loc[i] = loc_el_ids[i];
70 for (
unsigned int i=0; i<loc_el_ids.size(); i++)
71 row_4_loc_el[loc_el_ids[i]] = i + this->
el_ds->
begin();
85 unsigned int bc_ele_idx;
87 if (ele->boundary_idx_ != NULL)
88 for (
unsigned int i=0; i<ele->n_sides(); ++i)
89 if ((
int)ele->boundary_idx_[i] != -1) {
114 unsigned int ngh_element_idx;
117 neighbour.
mesh_ =
this;
129 for (
unsigned int s=0; s<e->n_sides(); s++)
136 for (
unsigned n=0; n<e.side(s)->
n_nodes(); n++)
side_nodes[n] = e.side(s)->node(n).idx();
146 last_edge_idx=
edges.size();
147 edges.resize(last_edge_idx+1);
148 edg = &(
edges.back() );
150 edg->
side_ =
new struct SideIter[ intersection_list.size() ];
155 if (intersection_list.size() <= 1) {
158 edg->
side_[0] = e.side(s);
169 for (
unsigned int ecs=0; ecs<elem->
n_sides(); ecs++) {
175 last_edge_idx=
edges.size();
176 edges.resize(last_edge_idx+1);
177 edg = &(
edges.back() );
199 ASSERT_EQ( (
unsigned int) edg->
n_sides, intersection_list.size())(e.input_id())(s).error(
"Missing edge sides.");
#define ASSERT_PERMANENT(expr)
Allow use shorter versions of macro names if these names is not used with external library.
#define ASSERT_EQ(a, b)
Definition of comparative assert macro (EQual) only for debug mode.
#define ASSERT_PTR(ptr)
Definition of assert macro checking non-null pointer (PTR) only for debug mode.
std::shared_ptr< EquivalentMeshMap > check_compatible_mesh(Mesh &input_mesh) override
Overwrite Mesh::check_compatible_mesh()
void make_neighbours_and_edges()
void init_distribution()
setup distribution of elements and related vectors
BCMesh(Mesh *parent_mesh)
~BCMesh() override
Destructor.
Partitioning * get_part() override
Overwrite Mesh::get_part()
const LongIdx * get_local_part() override
Overwrite Mesh::get_local_part()
Mesh * parent_mesh_
Pointer to parent (bulk) mesh.
Boundary boundary(unsigned int) const override
LongIdx * local_part_
Distribution of boundary elements to processors.
unsigned int begin(int proc) const
get starting local index
SideIter side(const unsigned int loc_index)
unsigned int idx() const
We need this method after replacing Region by RegionIdx, and movinf RegionDB instance into particular...
unsigned int edge_idx(unsigned int edg_idx) const
Return edge_idx of given index.
unsigned int n_sides() const
vector< Element > element_vec_
shared_ptr< Armor::Array< double > > nodes_
vector< vector< vector< unsigned int > > > side_nodes
void intersect_element_lists(vector< unsigned int > const &nodes_list, vector< unsigned int > &intersection_element_list)
LongIdx * get_el_4_loc() const
bool same_sides(const SideIter &si, vector< unsigned int > &side_nodes)
Distribution * el_ds
Parallel distribution of elements.
std::shared_ptr< RegionDB > region_db_
shared_ptr< BidirectionalMap< int > > node_ids_
Maps node ids to indexes into vector node_vec_.
void init_element_vector(unsigned int size)
Initialize element_vec_, set size and reset counters of boundary and bulk elements.
unsigned int n_nodes() const
LongIdx * el_4_loc
Index set assigning to local element index its global index.
bool find_lower_dim_element(vector< unsigned int > &element_list, unsigned int dim, unsigned int &element_idx)
void create_node_element_lists()
vector< Neighbour > vb_neighbours_
Vector of compatible neighbourings.
std::vector< EdgeData > edges
Vector of MH edges, this should not be part of the geometrical mesh.
void init_node_vector(unsigned int size)
Initialize node_vec_, set size.
Distribution * get_el_ds() const
unsigned int n_elements() const
Range< ElementAccessor< 3 > > elements_range() const
Returns range of mesh elements.
static const unsigned int undef_idx
unsigned int max_edge_sides_[3]
Maximal number of sides per one edge in the actual mesh (set in make_neighbours_and_edges()).
ElementAccessor< 3 > element_accessor(unsigned int idx) const
Create and return ElementAccessor to element of given idx.
const LongIdx * get_local_part() override
Partitioning * get_part() override
vector< BoundaryData > boundary_
std::shared_ptr< EquivalentMeshMap > check_compatible_mesh(Mesh &input_mesh) override
MeshBase * mesh_
Pointer to Mesh to which belonged.
unsigned int elem_idx_
Index of element in Mesh::element_vec_.
unsigned int edge_idx_
Index of Edge in Mesh.
Class for the mesh partitioning. This should provide:
Support classes for parallel programing.
int LongIdx
Define type that represents indices of large arrays (elements, nodes, dofs etc.)
#define MessageOut()
Macro defining 'message' record of log.
#define MPI_Allreduce(sendbuf, recvbuf, count, datatype, op, comm)
Implementation of range helper class.