Flow123d
release_3.0.0-968-gc87a28e79
|
Go to the documentation of this file.
35 for (
unsigned int i=0; i<4; i++)
42 n_duplicated_nodes_(0)
66 for (
unsigned int i=0; i<edge.side(0)->dim()+1; ++i)
67 obj.
nodes[i] = edge.side(0)->node(i).idx();
69 objects_[edge.side(0)->dim()].push_back(obj);
80 for (
unsigned int i=0; i<ele->dim()+1; i++)
81 l.
nodes[i] = ele->node_idx(i);
82 for (
unsigned int i=0; i<ele->dim()+1; i++)
111 while (node_elements.size() > 0)
114 std::queue<unsigned int> q;
115 q.push(*node_elements.begin());
116 node_elements.erase(node_elements.begin());
117 std::set<unsigned int> component;
118 while (q.size() > 0) {
120 component.insert(elem.idx());
122 for (
unsigned int sid=0; sid<elem->n_sides(); ++sid) {
123 auto side = elem.
side(sid);
124 for (
unsigned int esid=0; esid < side->edge()->n_sides; ++esid) {
126 if (adj_el_idx != elem.idx())
128 auto it = std::find(node_elements.begin(), node_elements.end(), adj_el_idx);
129 if (
it != node_elements.end()) {
130 node_elements.erase(
it);
138 components.push_back(component);
144 if (components.size() > 0) {
146 components.erase(components.begin());
148 for (
auto component : components) {
151 for (
auto el_idx : component) {
156 if (elem->
nodes[i] == n.idx())
157 elem->
nodes[i] = new_nid;
void init_nodes()
Initialize the vector of nodes from mesh.
void init_from_elements()
Initialize objects from mesh elements.
virtual Range< ElementAccessor< 3 > > elements_range() const
Returns range of bulk elements.
const Edge * edge() const
unsigned int elem_idx() const
Range< NodeAccessor< 3 > > node_range() const
Returns range of nodes.
std::vector< unsigned int > obj_4_edg_
Vector of object indices for each mesh edge.
SideIter side(const unsigned int i) const
std::vector< Edge > edges
Vector of MH edges, this should not be part of the geometrical mesh.
DuplicateNodes(Mesh *mesh)
unsigned int n_duplicated_nodes_
Number of nodes (including duplicated ones).
std::vector< unsigned int > obj_4_el_
std::vector< unsigned int > node_dim_
Vector of space dimensions of elements using the particular duplicated node.
unsigned int nodes[4]
Indices of nodes.
const vector< vector< unsigned int > > & node_elements()
std::vector< MeshObject > objects_[4]
Array of n-faces by their dimension.
MeshObject(unsigned int dim)
SideIter side(const unsigned int loc_index)
Mesh * mesh_
The mesh object.
virtual ElementAccessor< 3 > element_accessor(unsigned int idx) const
Create and return ElementAccessor to element of given idx.
void duplicate_nodes()
Duplicate nodes that are lying on interfaces with fractures.
virtual unsigned int n_nodes() const
#define START_TIMER(tag)
Starts a timer with specified tag.
#define END_TIMER(tag)
Ends a timer with specified tag.
void init_from_edges()
Initialize objects from mesh edges.
MeshObject * faces[4]
(dim-1)-dimensional faces