www.mooseframework.org
EFAFace.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #include "EFAFace.h"
9 
10 #include "EFAFaceNode.h"
11 #include "EFANode.h"
12 #include "EFAEdge.h"
13 #include "EFAFragment2D.h"
14 #include "EFAFuncs.h"
15 #include "EFAError.h"
16 
17 EFAFace::EFAFace(unsigned int n_nodes, unsigned int num_interior_face_nodes)
18  : _num_nodes(n_nodes),
19  _nodes(_num_nodes, NULL),
20  _num_edges(_num_nodes),
21  _edges(_num_edges, NULL),
22  _face_interior_nodes(num_interior_face_nodes, NULL)
23 {
24 }
25 
26 EFAFace::EFAFace(const EFAFace & other_face)
27  : _num_nodes(other_face._num_nodes),
28  _nodes(_num_nodes, NULL),
30  _edges(_num_edges, NULL)
31 {
32  for (unsigned int k = 0; k < other_face._num_nodes; ++k)
33  {
34  _nodes[k] = other_face._nodes[k];
35  _edges[k] = new EFAEdge(*other_face._edges[k]);
36  }
37  for (unsigned int k = 0; k < other_face._interior_nodes.size(); ++k)
38  _interior_nodes.push_back(new EFAFaceNode(*other_face._interior_nodes[k]));
39 }
40 
42  : _num_nodes(frag->numEdges()),
43  _nodes(_num_nodes, NULL),
45  _edges(_num_edges, NULL)
46 {
47  for (unsigned int k = 0; k < frag->numEdges(); ++k)
48  {
49  EFANode * node = frag->getEdge(k)->getNode(0);
50  unsigned int kprev(k > 0 ? (k - 1) : (frag->numEdges() - 1));
51  if (!frag->getEdge(kprev)->containsNode(node))
52  node = getEdge(k)->getNode(1);
53  _nodes[k] = node;
54  _edges[k] = new EFAEdge(*frag->getEdge(k));
55  }
56 }
57 
59 {
60  for (unsigned int i = 0; i < _edges.size(); ++i)
61  {
62  if (_edges[i])
63  {
64  delete _edges[i];
65  _edges[i] = NULL;
66  }
67  }
68  for (unsigned int i = 0; i < _interior_nodes.size(); ++i)
69  {
70  if (_interior_nodes[i])
71  {
72  delete _interior_nodes[i];
73  _interior_nodes[i] = NULL;
74  }
75  }
76 }
77 
78 void
79 EFAFace::setInteriorFaceNode(unsigned int i, EFANode * node)
80 {
81  _face_interior_nodes[i] = node;
82 }
83 
84 unsigned int
86 {
87  return _nodes.size();
88 }
89 
90 void
91 EFAFace::setNode(unsigned int node_id, EFANode * node)
92 {
93  _nodes[node_id] = node;
94 }
95 
96 EFANode *
97 EFAFace::getNode(unsigned int node_id) const
98 {
99  return _nodes[node_id];
100 }
101 
102 void
103 EFAFace::switchNode(EFANode * new_node, EFANode * old_node)
104 {
105  bool is_face_node = true;
106  for (unsigned int i = 0; i < _num_nodes; ++i)
107  {
108  if (_nodes[i] == old_node)
109  {
110  _nodes[i] = new_node;
111  is_face_node = false;
112  }
113  }
114  if (is_face_node)
115  {
116  for (unsigned int i = 0; i < _face_interior_nodes.size(); ++i)
117  if (_face_interior_nodes[i] == old_node)
118  _face_interior_nodes[i] = new_node;
119  }
120  else
121  {
122  for (unsigned int i = 0; i < _edges.size(); ++i)
123  _edges[i]->switchNode(new_node, old_node);
124  for (unsigned int i = 0; i < _interior_nodes.size(); ++i)
125  _interior_nodes[i]->switchNode(new_node, old_node);
126  }
127 }
128 
129 bool
131  std::vector<EFANode *> & master_nodes,
132  std::vector<double> & master_weights) const
133 {
134  // Given a EFAnode, find the element edge or fragment edge that contains it
135  // Return its master nodes and weights
136  master_nodes.clear();
137  master_weights.clear();
138  bool masters_found = false;
139  for (unsigned int i = 0; i < _num_edges; ++i) // check element exterior edges
140  {
141  if (_edges[i]->containsNode(node))
142  {
143  masters_found = _edges[i]->getNodeMasters(node, master_nodes, master_weights);
144  if (masters_found)
145  break;
146  else
147  EFAError("In getMasterInfo: cannot find master nodes in element edges");
148  }
149  }
150 
151  if (!masters_found) // check element interior embedded nodes
152  {
153  for (unsigned int i = 0; i < _interior_nodes.size(); ++i)
154  {
155  if (_interior_nodes[i]->getNode() == node)
156  {
157  std::vector<double> emb_xi(2, 0.0);
158  emb_xi[0] = _interior_nodes[i]->getParametricCoordinates(0);
159  emb_xi[1] = _interior_nodes[i]->getParametricCoordinates(1);
160  for (unsigned int j = 0; j < _num_nodes; ++j)
161  {
162  master_nodes.push_back(_nodes[j]);
163  double weight = 0.0;
164  if (_num_nodes == 4)
165  weight = Efa::linearQuadShape2D(j, emb_xi);
166  else if (_num_nodes == 3)
167  weight = Efa::linearTriShape2D(j, emb_xi);
168  else
169  EFAError("EFAface::getMasterInfo() only works for quad and tri EFAface");
170  master_weights.push_back(weight);
171  }
172  masters_found = true;
173  break;
174  }
175  }
176  }
177  return masters_found;
178 }
179 
180 bool
181 EFAFace::getEdgeNodeParametricCoords(EFANode * node, std::vector<double> & xi_2d) const
182 {
183  // get the parametric coords of a node in an edge
184  bool edge_found = false;
185  unsigned int edge_id;
186  if (!isTriOrQuad())
187  EFAError("EFAface::getEdgeNodeParaCoor can only work for quad or tri faces");
188 
189  for (unsigned int i = 0; i < _num_edges; ++i)
190  {
191  if (_edges[i]->containsNode(node))
192  {
193  edge_id = i;
194  edge_found = true;
195  break;
196  }
197  }
198  if (edge_found)
199  {
200  double rel_dist = _edges[edge_id]->distanceFromNode1(node);
201  double xi_1d = 2.0 * rel_dist - 1.0; // translate to [-1,1] parent coord syst
202  mapParametricCoordsFrom1DTo2D(edge_id, xi_1d, xi_2d);
203  }
204  return edge_found;
205 }
206 
207 bool
208 EFAFace::getFaceNodeParametricCoords(EFANode * node, std::vector<double> & xi_2d) const
209 {
210  bool node_in_face = false;
211  if (!isTriOrQuad())
212  EFAError("EFAface::getFaceNodeParaCoor can only work for quad or tri faces");
213 
214  if (getEdgeNodeParametricCoords(node, xi_2d))
215  node_in_face = true;
216  else
217  {
218  for (unsigned int i = 0; i < _interior_nodes.size(); ++i)
219  {
220  if (_interior_nodes[i]->getNode() == node)
221  {
222  xi_2d.resize(2, 0.0);
223  xi_2d[0] = _interior_nodes[i]->getParametricCoordinates(0);
224  xi_2d[1] = _interior_nodes[i]->getParametricCoordinates(1);
225  node_in_face = true;
226  break;
227  }
228  } // i
229  }
230  return node_in_face;
231 }
232 
233 unsigned int
235 {
236  return _interior_nodes.size();
237 }
238 
239 void
241 {
242  for (unsigned int i = 0; i < _edges.size(); ++i)
243  {
244  if (_edges[i] != NULL)
245  _nodes[i] = _edges[i]->getNode(0);
246  else
247  EFAError("in EFAface::createNodes() _edges[i] does not exist");
248  }
249 }
250 
251 unsigned int
253 {
254  return _edges.size();
255 }
256 
257 EFAEdge *
258 EFAFace::getEdge(unsigned int edge_id) const
259 {
260  return _edges[edge_id];
261 }
262 
263 void
264 EFAFace::setEdge(unsigned int edge_id, EFAEdge * new_edge)
265 {
266  _edges[edge_id] = new_edge;
267 }
268 
269 void
271 {
272  for (unsigned int i = 0; i < _num_nodes; ++i)
273  {
274  unsigned int i_plus1(i < (_num_nodes - 1) ? i + 1 : 0);
275  if (_nodes[i] != NULL && _nodes[i_plus1] != NULL)
276  {
277  EFAEdge * new_edge = new EFAEdge(_nodes[i], _nodes[i_plus1]);
278  _edges[i] = new_edge;
279  }
280  else
281  EFAError("EFAface::createEdges requires exsiting _nodes");
282  }
283 }
284 
285 void
286 EFAFace::combineTwoEdges(unsigned int edge_id1, unsigned int edge_id2)
287 {
288  if (_edges[edge_id1]->containsNode(_edges[edge_id2]->getNode(0)) ||
289  _edges[edge_id1]->containsNode(_edges[edge_id2]->getNode(1)))
290  {
291  // edge_id1 must precede edge_id2
292  unsigned int edge1_next(edge_id1 < (_num_edges - 1) ? edge_id1 + 1 : 0);
293  if (edge1_next != edge_id2) // if not, swap
294  {
295  unsigned int itmp = edge_id1;
296  edge_id1 = edge_id2;
297  edge_id2 = itmp;
298  }
299 
300  // build new edge and delete old ones
301  EFANode * new_node1 = _edges[edge_id1]->getNode(0);
302  EFANode * emb_node = _edges[edge_id1]->getNode(1);
303  EFANode * new_node2 = _edges[edge_id2]->getNode(1);
304  if (emb_node != _edges[edge_id2]->getNode(0))
305  EFAError("in combine_two_edges face edges are not correctly set up");
306 
307  EFAEdge * full_edge = new EFAEdge(new_node1, new_node2);
308  full_edge->addIntersection(-1.0, emb_node, new_node1); // dummy intersection_x
309 
310  delete _edges[edge_id1];
311  delete _edges[edge_id2];
312  _edges[edge_id1] = full_edge;
313  _edges.erase(_edges.begin() + edge_id2);
314 
315  // update face memeber variables
316  _num_edges -= 1;
317  _num_nodes -= 1;
318  _nodes.resize(_num_nodes, NULL);
319  for (unsigned int k = 0; k < _num_edges; ++k)
320  _nodes[k] = _edges[k]->getNode(0);
321  }
322  else
323  EFAError("two edges to be combined are not ajacent to each other");
324 }
325 
326 void
328 {
329  std::vector<EFAEdge *> ordered_edges(_num_edges, NULL);
330  ordered_edges[0] = _edges[0];
331  for (unsigned int i = 1; i < _num_edges; ++i)
332  {
333  EFAEdge * last_edge = ordered_edges[i - 1];
334  for (unsigned int j = 0; j < _num_edges; ++j)
335  {
336  if (!_edges[j]->equivalent(*last_edge) && _edges[j]->containsNode(last_edge->getNode(1)))
337  {
338  ordered_edges[i] = _edges[j];
339  break;
340  }
341  } // j
342  } // i
343  _edges = ordered_edges;
344 }
345 
346 void
348 {
349  // reverse the orientation of the face
350  for (unsigned int i = 0; i < _edges.size(); ++i)
351  _edges[i]->reverseNodes();
352  std::reverse(_edges.begin(), _edges.end());
353 }
354 
355 bool
357 {
358  if (_num_edges == 3 || _num_edges == 4)
359  return true;
360  else
361  return false;
362 }
363 
364 bool
365 EFAFace::equivalent(const EFAFace * other_face) const
366 {
367  unsigned int counter = 0; // counter number of equal nodes
368  bool overlap = false;
369  if (_num_nodes == other_face->_num_nodes)
370  {
371  for (unsigned int i = 0; i < _num_nodes; ++i)
372  {
373  for (unsigned int j = 0; j < other_face->_num_nodes; ++j)
374  {
375  if (_nodes[i] == other_face->_nodes[j])
376  {
377  counter += 1;
378  break;
379  }
380  } // j
381  } // i
382  if (counter == _num_nodes)
383  overlap = true;
384  }
385  return overlap;
386 }
387 
388 bool
389 EFAFace::containsNode(const EFANode * node) const
390 {
391  bool contains = false;
392  for (unsigned int i = 0; i < _num_edges; ++i)
393  {
394  if (_edges[i]->containsNode(node))
395  {
396  contains = true;
397  break;
398  }
399  }
400  if (!contains)
401  {
402  for (unsigned int i = 0; i < _interior_nodes.size(); ++i)
403  {
404  if (_interior_nodes[i]->getNode() == node)
405  {
406  contains = true;
407  break;
408  }
409  }
410  }
411  return contains;
412 }
413 
414 bool
415 EFAFace::containsFace(const EFAFace * other_face) const
416 {
417  unsigned int counter = 0;
418  for (unsigned int i = 0; i < other_face->_num_nodes; ++i)
419  {
420  if (containsNode(other_face->_nodes[i]))
421  counter += 1;
422  }
423  if (counter == other_face->_num_nodes)
424  return true;
425  else
426  return false;
427 }
428 
429 bool
430 EFAFace::ownsEdge(const EFAEdge * other_edge) const
431 {
432  for (unsigned int i = 0; i < _edges.size(); ++i)
433  if (_edges[i]->equivalent(*other_edge))
434  return true;
435  return false;
436 }
437 
438 void
440 {
441  for (unsigned int i = 0; i < _num_edges; ++i)
442  _edges[i]->removeEmbeddedNode(emb_node);
443 
444  unsigned int index = 0;
445  bool node_found = false;
446  for (unsigned int i = 0; i < _interior_nodes.size(); ++i)
447  {
448  if (_interior_nodes[i]->getNode() == emb_node)
449  {
450  node_found = true;
451  index = i;
452  break;
453  }
454  }
455  if (node_found)
456  {
457  delete _interior_nodes[index];
458  _interior_nodes.erase(_interior_nodes.begin() + index);
459  }
460 }
461 
462 std::vector<EFAFace *>
464 {
465  std::vector<EFAFace *> new_faces;
466  if (getNumCuts() > 0)
467  {
468  // construct a fragment from this face
469  EFAFragment2D * frag_tmp = new EFAFragment2D(NULL, this);
470  std::vector<EFAFragment2D *> new_frags_tmp = frag_tmp->split();
471 
472  // copy new_frags to new_faces
473  for (unsigned int i = 0; i < new_frags_tmp.size(); ++i)
474  new_faces.push_back(new EFAFace(new_frags_tmp[i]));
475 
476  // delete frag_tmp and new_frags
477  delete frag_tmp;
478  for (unsigned int i = 0; i < new_frags_tmp.size(); ++i)
479  delete new_frags_tmp[i];
480  }
481  else
482  new_faces.push_back(new EFAFace(*this));
483 
484  return new_faces;
485 }
486 
487 EFAFace *
488 EFAFace::combineWithFace(const EFAFace * other_face) const
489 {
490  // combine this face with another adjacent face
491  EFAFace * new_face = NULL;
492  if (isAdjacent(other_face))
493  {
494  unsigned int this_common_edge_id = adjacentCommonEdge(other_face);
495  std::vector<EFANode *> common_nodes;
496  common_nodes.push_back(_edges[this_common_edge_id]->getNode(0));
497  common_nodes.push_back(_edges[this_common_edge_id]->getNode(1));
498 
499  unsigned int other_common_edge_id = other_face->adjacentCommonEdge(this);
500  unsigned int new_n_nodes = _num_edges + other_face->_num_edges - 4;
501  EFAFragment2D * new_frag = new EFAFragment2D(NULL, false, NULL); // temp fragment
502 
503  unsigned int this_edge_id0(this_common_edge_id > 0 ? this_common_edge_id - 1
504  : _num_edges - 1); // common_nodes[0]
505  unsigned int this_edge_id1(this_common_edge_id < (_num_edges - 1) ? this_common_edge_id + 1
506  : 0); // common_nodes[1]
507  unsigned int other_edge_id0(
508  other_common_edge_id < (other_face->_num_edges - 1) ? other_common_edge_id + 1 : 0);
509  unsigned int other_edge_id1(other_common_edge_id > 0 ? other_common_edge_id - 1
510  : other_face->_num_edges - 1);
511 
512  EFAEdge * new_edge0 = new EFAEdge(_edges[this_edge_id0]->getNode(0),
513  other_face->_edges[other_edge_id0]->getNode(1));
514  new_edge0->addIntersection(
515  -1.0, common_nodes[0], new_edge0->getNode(0)); // dummy intersection_x
516  new_frag->addEdge(new_edge0); // common_nodes[0]'s edge
517 
518  unsigned int other_iedge(other_edge_id0 < (other_face->_num_edges - 1) ? other_edge_id0 + 1
519  : 0);
520  while (!other_face->_edges[other_iedge]->equivalent(*other_face->_edges[other_edge_id1]))
521  {
522  new_frag->addEdge(new EFAEdge(*other_face->_edges[other_iedge]));
523  other_iedge += 1;
524  if (other_iedge == other_face->_num_edges)
525  other_iedge = 0;
526  } // loop over other_face's edges
527 
528  EFAEdge * new_edge1 = new EFAEdge(other_face->_edges[other_edge_id1]->getNode(0),
529  _edges[this_edge_id1]->getNode(1));
530  new_edge1->addIntersection(
531  -1.0, common_nodes[1], new_edge1->getNode(0)); // dummy intersection_x
532  new_frag->addEdge(new_edge1);
533 
534  unsigned int this_iedge(this_edge_id1 < (_num_edges - 1) ? this_edge_id1 + 1 : 0);
535  while (!_edges[this_iedge]->equivalent(*_edges[this_edge_id0])) // common_nodes[1]'s edge
536  {
537  new_frag->addEdge(new EFAEdge(*_edges[this_iedge]));
538  this_iedge += 1;
539  if (this_iedge == _num_edges)
540  this_iedge = 0;
541  } // loop over this_face's edges
542 
543  new_face = new EFAFace(new_frag);
544  delete new_frag;
545  if (new_face->numNodes() != new_n_nodes)
546  EFAError("combine_with() sanity check fails");
547  }
548  return new_face;
549 }
550 
551 void
553 {
554  // set up correct edge intersections based on the reference face
555  // the reference face must contain the edge of this face that is to be set up
556  // the reference face must be an element face
557  for (unsigned int j = 0; j < _num_edges; ++j)
558  {
559  if (_edges[j]->hasIntersection())
560  {
561  if (_edges[j]->numEmbeddedNodes() > 1)
562  EFAError("frag face edge can only have 1 emb node at this point");
563 
564  EFANode * edge_node1 = _edges[j]->getNode(0);
565  EFANode * edge_node2 = _edges[j]->getNode(1);
566  EFANode * emb_node = _edges[j]->getEmbeddedNode(0);
567  double inters_x = _edges[j]->getIntersection(0, edge_node1);
568  if (std::abs(inters_x + 1.0) < 1.0e-4) // invalid intersection found
569  {
570  std::vector<double> node1_xi2d(2, 0.0);
571  std::vector<double> node2_xi2d(2, 0.0);
572  std::vector<double> emb_xi2d(2, 0.0);
573  if (ref_face->getFaceNodeParametricCoords(edge_node1, node1_xi2d) &&
574  ref_face->getFaceNodeParametricCoords(edge_node2, node2_xi2d) &&
575  ref_face->getFaceNodeParametricCoords(emb_node, emb_xi2d))
576  {
577  // TODO: this is not correct for unstructured elements. Need a fix
578  double dist2node1 =
579  std::sqrt((emb_xi2d[0] - node1_xi2d[0]) * (emb_xi2d[0] - node1_xi2d[0]) +
580  (emb_xi2d[1] - node1_xi2d[1]) * (emb_xi2d[1] - node1_xi2d[1]));
581  double full_dist =
582  std::sqrt((node2_xi2d[0] - node1_xi2d[0]) * (node2_xi2d[0] - node1_xi2d[0]) +
583  (node2_xi2d[1] - node1_xi2d[1]) * (node2_xi2d[1] - node1_xi2d[1]));
584  inters_x = dist2node1 / full_dist;
585  }
586  else
587  EFAError("reference face does not contain the edge with invalid inters");
588  _edges[j]->resetIntersection(inters_x, emb_node, edge_node1);
589  }
590  }
591  }
592 }
593 
594 unsigned int
596 {
597  unsigned int num_cuts = 0;
598  for (unsigned int i = 0; i < _edges.size(); ++i)
599  {
600  if (_edges[i]->hasIntersection())
601  num_cuts += _edges[i]->numEmbeddedNodes();
602  }
603  return num_cuts;
604 }
605 
606 bool
608 {
609  if (getNumCuts() > 1)
610  return true;
611  else
612  return false;
613 }
614 
615 void
617 {
618  for (unsigned int i = 0; i < _edges.size(); ++i)
619  if (from_face._edges[i]->hasIntersection())
620  _edges[i]->copyIntersection(*from_face._edges[i], 0);
621 
622  if (from_face.numInteriorNodes() > 0)
623  _interior_nodes = from_face._interior_nodes;
624 }
625 
626 bool
627 EFAFace::isAdjacent(const EFAFace * other_face) const
628 {
629  // two faces are adjacent if they only share one common edge
630  unsigned int counter = 0;
631  for (unsigned int i = 0; i < _num_edges; ++i)
632  if (other_face->ownsEdge(_edges[i]))
633  counter += 1;
634 
635  if (counter == 1)
636  return true;
637  else
638  return false;
639 }
640 
641 unsigned int
642 EFAFace::adjacentCommonEdge(const EFAFace * other_face) const
643 {
644  if (isAdjacent(other_face))
645  {
646  for (unsigned int i = 0; i < _num_edges; ++i)
647  if (other_face->ownsEdge(_edges[i]))
648  return i;
649  }
650  else
651  EFAError("this face is not adjacent with other_face");
652  return 99999;
653 }
654 
655 bool
656 EFAFace::hasSameOrientation(const EFAFace * other_face) const
657 {
658  bool same_order = false;
659  if (equivalent(other_face))
660  {
661  for (unsigned int i = 0; i < other_face->numNodes(); ++i)
662  {
663  if (other_face->_nodes[i] == _nodes[0])
664  {
665  unsigned int iplus1(i < (other_face->_num_nodes - 1) ? i + 1 : 0);
666  if (other_face->_nodes[iplus1] == _nodes[1])
667  {
668  same_order = true;
669  break;
670  }
671  else if (other_face->_nodes[iplus1] != _nodes[_num_nodes - 1])
672  EFAError("two faces overlap but can't find correct common nodes");
673  }
674  }
675  }
676  else
677  EFAWarning("in hasSameOrientation two faces does not overlap");
678  return same_order;
679 }
680 
681 EFAFaceNode *
682 EFAFace::getInteriorNode(unsigned int index) const
683 {
684  return _interior_nodes[index];
685 }
686 
687 void
689  double xi_1d,
690  std::vector<double> & xi_2d) const
691 {
692  // given the 1D parent coord of a point in an 2D element edge, translate it to 2D para coords
693  xi_2d.resize(2, 0.0);
694  if (_num_edges == 4)
695  {
696  if (edge_id == 0)
697  {
698  xi_2d[0] = xi_1d;
699  xi_2d[1] = -1.0;
700  }
701  else if (edge_id == 1)
702  {
703  xi_2d[0] = 1.0;
704  xi_2d[1] = xi_1d;
705  }
706  else if (edge_id == 2)
707  {
708  xi_2d[0] = -xi_1d;
709  xi_2d[1] = 1.0;
710  }
711  else if (edge_id == 3)
712  {
713  xi_2d[0] = -1.0;
714  xi_2d[1] = -xi_1d;
715  }
716  else
717  EFAError("edge_id out of bounds");
718  }
719  else if (_num_edges == 3)
720  {
721  if (edge_id == 0)
722  {
723  xi_2d[0] = 0.5 * (1.0 - xi_1d);
724  xi_2d[1] = 0.5 * (1.0 + xi_1d);
725  }
726  else if (edge_id == 1)
727  {
728  xi_2d[0] = 0.0;
729  xi_2d[1] = 0.5 * (1.0 - xi_1d);
730  }
731  else if (edge_id == 2)
732  {
733  xi_2d[0] = 0.5 * (1.0 + xi_1d);
734  xi_2d[1] = 0.0;
735  }
736  else
737  EFAError("edge_id out of bounds");
738  }
739  else
740  EFAError("the EFAface::mapParametricCoordsFrom1DTo2D only works for quad and tri faces");
741 }
bool getEdgeNodeParametricCoords(EFANode *node, std::vector< double > &xi_2d) const
Definition: EFAFace.C:181
unsigned int numNodes() const
Definition: EFAFace.C:85
unsigned int numEdges() const
bool isTriOrQuad() const
Definition: EFAFace.C:356
void copyIntersection(const EFAFace &from_face)
Definition: EFAFace.C:616
void setEdge(unsigned int edge_id, EFAEdge *new_edge)
Definition: EFAFace.C:264
std::vector< EFAFace * > split() const
Definition: EFAFace.C:463
unsigned int numInteriorNodes() const
Definition: EFAFace.C:234
bool hasIntersection() const
Definition: EFAFace.C:607
bool getFaceNodeParametricCoords(EFANode *node, std::vector< double > &xi_2d) const
Definition: EFAFace.C:208
bool ownsEdge(const EFAEdge *other_edge) const
Definition: EFAFace.C:430
void resetEdgeIntersection(const EFAFace *ref_face)
Definition: EFAFace.C:552
void setInteriorFaceNode(unsigned int i, EFANode *node)
Definition: EFAFace.C:79
void createEdges()
Definition: EFAFace.C:270
EFAEdge * getEdge(unsigned int edge_id) const
Definition: EFAFace.C:258
unsigned int adjacentCommonEdge(const EFAFace *other_face) const
Definition: EFAFace.C:642
void addEdge(EFAEdge *new_edge)
bool equivalent(const EFAFace *other_face) const
Definition: EFAFace.C:365
unsigned int numEdges() const
Definition: EFAFace.C:252
bool containsNode(const EFANode *node) const
Definition: EFAEdge.C:375
std::vector< EFAFragment2D * > split()
bool containsFace(const EFAFace *other_face) const
Definition: EFAFace.C:415
void combineTwoEdges(unsigned int edge_id1, unsigned int edge_id2)
Definition: EFAFace.C:286
~EFAFace()
Definition: EFAFace.C:58
std::vector< EFAEdge * > _edges
Definition: EFAFace.h:31
void sortEdges()
Definition: EFAFace.C:327
EFAFaceNode * getInteriorNode(unsigned int index) const
Definition: EFAFace.C:682
void mapParametricCoordsFrom1DTo2D(unsigned int edge_id, double xi_1d, std::vector< double > &xi_2d) const
Definition: EFAFace.C:688
bool containsNode(const EFANode *node) const
Definition: EFAFace.C:389
double linearQuadShape2D(unsigned int node_id, std::vector< double > &xi_2d)
Definition: EFAFuncs.C:14
std::vector< EFANode * > _face_interior_nodes
Definition: EFAFace.h:33
EFANode * getNode(unsigned int index) const
Definition: EFAEdge.C:177
unsigned int _num_edges
Definition: EFAFace.h:30
bool isAdjacent(const EFAFace *other_face) const
Definition: EFAFace.C:627
std::vector< EFAFaceNode * > _interior_nodes
Definition: EFAFace.h:32
bool hasSameOrientation(const EFAFace *other_face) const
Definition: EFAFace.C:656
void switchNode(EFANode *new_node, EFANode *old_node)
Definition: EFAFace.C:103
void reverseEdges()
Definition: EFAFace.C:347
void removeEmbeddedNode(EFANode *emb_node)
Definition: EFAFace.C:439
unsigned int getNumCuts() const
Definition: EFAFace.C:595
std::vector< EFANode * > _nodes
Definition: EFAFace.h:29
bool getMasterInfo(EFANode *node, std::vector< EFANode * > &master_nodes, std::vector< double > &master_weights) const
Definition: EFAFace.C:130
void createNodes()
Definition: EFAFace.C:240
double linearTriShape2D(unsigned int node_id, std::vector< double > &xi_2d)
Definition: EFAFuncs.C:21
void addIntersection(double position, EFANode *embedded_node_tmp, EFANode *from_node)
Definition: EFAEdge.C:128
void setNode(unsigned int node_id, EFANode *node)
Definition: EFAFace.C:91
EFANode * getNode(unsigned int node_id) const
Definition: EFAFace.C:97
EFAFace(unsigned int n_nodes, unsigned int num_interior_face_nodes=0)
Definition: EFAFace.C:17
EFAEdge * getEdge(unsigned int edge_id) const
static unsigned int counter
unsigned int _num_nodes
Definition: EFAFace.h:28
EFAFace * combineWithFace(const EFAFace *other_face) const
Definition: EFAFace.C:488