Flow123d
JS_before_hm-1713-g943b6bc16
|
Go to the documentation of this file.
34 for (
unsigned int i=0; i<4; i++)
41 n_duplicated_nodes_(0)
65 for (
unsigned int i=0; i<
edge.side(0)->dim()+1; ++i)
66 obj.
nodes[i] =
edge.side(0)->node(i).idx();
79 for (
unsigned int i=0; i<ele->dim()+1; i++)
80 l.
nodes[i] = ele->node_idx(i);
81 for (
unsigned int i=0; i<ele->dim()+1; i++)
110 while (node_elements.size() > 0)
113 std::queue<unsigned int> q;
114 q.push(*node_elements.begin());
115 node_elements.erase(node_elements.begin());
116 std::set<unsigned int> component;
117 while (q.size() > 0) {
119 component.insert(elem.idx());
121 for (
unsigned int sid=0; sid<elem->n_sides(); ++sid) {
122 auto side = elem.
side(sid);
123 for (
unsigned int esid=0; esid < side->edge().n_sides(); ++esid) {
125 if (adj_el_idx != elem.idx())
127 auto it = std::find(node_elements.begin(), node_elements.end(), adj_el_idx);
128 if (
it != node_elements.end()) {
129 node_elements.erase(
it);
137 components.push_back(component);
143 if (components.size() > 0) {
145 components.erase(components.begin());
147 for (
auto component : components) {
150 for (
auto el_idx : component) {
155 if (elem->
nodes[i] == n.idx())
156 elem->
nodes[i] = new_nid;
Edge edge() const
Returns pointer to the edge connected to the side.
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.
unsigned int elem_idx() const
Returns index of element in Mesh::element_vec_.
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
Gets side iterator of the i -th side.
DuplicateNodes(Mesh *mesh)
unsigned int n_duplicated_nodes_
Number of nodes (including duplicated ones).
std::vector< unsigned int > obj_4_el_
Range< Edge > edge_range() const
Returns range of edges.
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