Flow123d
PE_user_fields-12e8aadde
|
Go to the documentation of this file.
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.");
shared_ptr< Armor::Array< double > > nodes_
std::shared_ptr< RegionDB > region_db_
unsigned int edge_idx_
Index of Edge in Mesh.
const LongIdx * get_local_part() override
Overwrite Mesh::get_local_part()
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_.
Distribution * get_el_ds() const
virtual std::shared_ptr< EquivalentMeshMap > check_compatible_mesh(Mesh &input_mesh)
Support classes for parallel programing.
LongIdx * el_4_loc
Index set assigning to local element index its global index.
static const unsigned int undef_idx
shared_ptr< BidirectionalMap< int > > node_ids_
Maps node ids to indexes into vector node_vec_.
Class for the mesh partitioning. This should provide:
Range< ElementAccessor< 3 > > elements_range() const
Returns range of mesh elements.
Mesh * parent_mesh_
Pointer to parent (bulk) mesh.
LongIdx * local_part_
Distribution of boundary elements to processors.
bool same_sides(const SideIter &si, vector< unsigned int > &side_nodes)
std::vector< EdgeData > edges
Vector of MH edges, this should not be part of the geometrical mesh.
const LongIdx * get_local_part() override
#define ASSERT_PERMANENT(expr)
Allow use shorter versions of macro names if these names is not used with external library.
vector< Neighbour > vb_neighbours_
Vector of compatible neighbourings.
void make_neighbours_and_edges()
ElementAccessor< 3 > element_accessor(unsigned int idx) const
Create and return ElementAccessor to element of given idx.
#define ASSERT_EQ(a, b)
Definition of comparative assert macro (EQual) only for debug mode.
void init_distribution()
setup distribution of elements and related vectors
void init_node_vector(unsigned int size)
Initialize node_vec_, set size.
Partitioning * get_part() override
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.)
BCMesh(Mesh *parent_mesh)
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.
void init_element_vector(unsigned int size)
Initialize element_vec_, set size and reset counters of boundary and bulk elements.
#define MPI_Allreduce(sendbuf, recvbuf, count, datatype, op, comm)
Boundary boundary(unsigned int) const override
LongIdx * get_el_4_loc() const
MeshBase * mesh_
Pointer to Mesh to which belonged.
Partitioning * get_part() override
Overwrite Mesh::get_part()
vector< vector< vector< unsigned int > > > side_nodes
std::shared_ptr< EquivalentMeshMap > check_compatible_mesh(Mesh &input_mesh) override
Overwrite Mesh::check_compatible_mesh()
bool find_lower_dim_element(vector< unsigned int > &element_list, unsigned int dim, unsigned int &element_idx)
unsigned int idx() const
We need this method after replacing Region by RegionIdx, and movinf RegionDB instance into particular...
unsigned int n_elements() const
vector< BoundaryData > boundary_
~BCMesh() override
Destructor.
void create_node_element_lists()
#define ASSERT_PTR(ptr)
Definition of assert macro checking non-null pointer (PTR) only for debug mode.
SideIter side(const unsigned int loc_index)
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_
unsigned int n_nodes() const
Implementation of range helper class.
unsigned int begin(int proc) const
get starting local index
#define MessageOut()
Macro defining 'message' record of log.