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;
const Edge * edge() const
vector< vector< unsigned int > > const & node_elements()
std::vector< unsigned int > node_dim_
Vector of space dimensions of elements using the particular duplicated node.
MeshObject * faces[4]
(dim-1)-dimensional faces
unsigned int n_duplicated_nodes_
Number of nodes (including duplicated ones).
Mesh * mesh_
The mesh object.
SideIter side(const unsigned int loc_index)
virtual unsigned int n_nodes() const
void init_from_edges()
Initialize objects from mesh edges.
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.
MeshObject(unsigned int dim)
void init_nodes()
Initialize the vector of nodes from mesh.
std::vector< unsigned int > obj_4_el_
std::vector< MeshObject > objects_[4]
Array of n-faces by their dimension.
#define START_TIMER(tag)
Starts a timer with specified tag.
virtual Range< ElementAccessor< 3 > > elements_range() const
Returns range of bulk elements.
unsigned int nodes[4]
Indices of nodes.
std::vector< unsigned int > obj_4_edg_
Vector of object indices for each mesh edge.
std::vector< Edge > edges
Vector of MH edges, this should not be part of the geometrical mesh.
void init_from_elements()
Initialize objects from mesh elements.
#define END_TIMER(tag)
Ends a timer with specified tag.
DuplicateNodes(Mesh *mesh)
Range< NodeAccessor< 3 > > node_range() const
Returns range of nodes.
unsigned int elem_idx() const
SideIter side(const unsigned int i) const