#include <EFAFace.h>
|
| EFAFace (unsigned int n_nodes, unsigned int num_interior_face_nodes=0) |
|
| EFAFace (const EFAFace &other_face) |
|
| EFAFace (const EFAFragment2D *frag) |
|
| ~EFAFace () |
|
unsigned int | numNodes () const |
|
void | setNode (unsigned int node_id, EFANode *node) |
|
EFANode * | getNode (unsigned int node_id) const |
|
void | switchNode (EFANode *new_node, EFANode *old_node) |
|
bool | getMasterInfo (EFANode *node, std::vector< EFANode * > &master_nodes, std::vector< double > &master_weights) const |
|
bool | getEdgeNodeParametricCoords (EFANode *node, std::vector< double > &xi_2d) const |
|
bool | getFaceNodeParametricCoords (EFANode *node, std::vector< double > &xi_2d) const |
|
unsigned int | numInteriorNodes () const |
|
void | createNodes () |
|
unsigned int | numEdges () const |
|
EFAEdge * | getEdge (unsigned int edge_id) const |
|
void | setEdge (unsigned int edge_id, EFAEdge *new_edge) |
|
void | createEdges () |
|
void | combineTwoEdges (unsigned int edge_id1, unsigned int edge_id2) |
|
void | sortEdges () |
|
void | reverseEdges () |
|
bool | isTriOrQuad () const |
|
EFANode * | getInteriorFaceNode (unsigned int i) const |
|
void | setInteriorFaceNode (unsigned int i, EFANode *node) |
|
bool | equivalent (const EFAFace *other_face) const |
|
bool | containsNode (const EFANode *node) const |
|
bool | containsFace (const EFAFace *other_face) const |
|
bool | ownsEdge (const EFAEdge *other_edge) const |
|
void | removeEmbeddedNode (EFANode *emb_node) |
|
std::vector< EFAFace * > | split () const |
|
EFAFace * | combineWithFace (const EFAFace *other_face) const |
|
void | resetEdgeIntersection (const EFAFace *ref_face) |
|
unsigned int | getNumCuts () const |
|
bool | hasIntersection () const |
|
void | copyIntersection (const EFAFace &from_face) |
|
bool | isAdjacent (const EFAFace *other_face) const |
|
unsigned int | adjacentCommonEdge (const EFAFace *other_face) const |
|
bool | hasSameOrientation (const EFAFace *other_face) const |
|
EFAFaceNode * | getInteriorNode (unsigned int index) const |
|
Definition at line 19 of file EFAFace.h.
◆ EFAFace() [1/3]
EFAFace::EFAFace |
( |
unsigned int |
n_nodes, |
|
|
unsigned int |
num_interior_face_nodes = 0 |
|
) |
| |
◆ EFAFace() [2/3]
EFAFace::EFAFace |
( |
const EFAFace & |
other_face | ) |
|
◆ EFAFace() [3/3]
Definition at line 43 of file EFAFace.C.
49 for (
unsigned int k = 0; k < frag->
numEdges(); ++k)
52 unsigned int kprev(k > 0 ? (k - 1) : (frag->
numEdges() - 1));
◆ ~EFAFace()
Definition at line 60 of file EFAFace.C.
62 for (
unsigned int i = 0; i <
_edges.size(); ++i)
◆ adjacentCommonEdge()
unsigned int EFAFace::adjacentCommonEdge |
( |
const EFAFace * |
other_face | ) |
const |
◆ combineTwoEdges()
void EFAFace::combineTwoEdges |
( |
unsigned int |
edge_id1, |
|
|
unsigned int |
edge_id2 |
|
) |
| |
Definition at line 288 of file EFAFace.C.
294 unsigned int edge1_next(edge_id1 < (
_num_edges - 1) ? edge_id1 + 1 : 0);
295 if (edge1_next != edge_id2)
297 unsigned int itmp = edge_id1;
307 EFAError(
"in combine_two_edges face edges are not correctly set up");
314 _edges[edge_id1] = full_edge;
325 EFAError(
"two edges to be combined are not ajacent to each other");
Referenced by EFAFragment3D::combine_two_faces().
◆ combineWithFace()
EFAFace * EFAFace::combineWithFace |
( |
const EFAFace * |
other_face | ) |
const |
Definition at line 490 of file EFAFace.C.
497 std::vector<EFANode *> common_nodes;
498 common_nodes.push_back(
_edges[this_common_edge_id]->
getNode(0));
499 common_nodes.push_back(
_edges[this_common_edge_id]->
getNode(1));
505 unsigned int this_edge_id0(this_common_edge_id > 0 ? this_common_edge_id - 1
507 unsigned int this_edge_id1(this_common_edge_id < (
_num_edges - 1) ? this_common_edge_id + 1
509 unsigned int other_edge_id0(
510 other_common_edge_id < (other_face->
_num_edges - 1) ? other_common_edge_id + 1 : 0);
511 unsigned int other_edge_id1(other_common_edge_id > 0 ? other_common_edge_id - 1
515 other_face->
_edges[other_edge_id0]->getNode(1));
517 -1.0, common_nodes[0], new_edge0->
getNode(0));
520 unsigned int other_iedge(other_edge_id0 < (other_face->
_num_edges - 1) ? other_edge_id0 + 1
522 while (!other_face->
_edges[other_iedge]->equivalent(*other_face->
_edges[other_edge_id1]))
531 _edges[this_edge_id1]->getNode(1));
533 -1.0, common_nodes[1], new_edge1->
getNode(0));
536 unsigned int this_iedge(this_edge_id1 < (
_num_edges - 1) ? this_edge_id1 + 1 : 0);
545 new_face =
new EFAFace(new_frag);
547 if (new_face->
numNodes() != new_n_nodes)
548 EFAError(
"combine_with() sanity check fails");
◆ containsFace()
bool EFAFace::containsFace |
( |
const EFAFace * |
other_face | ) |
const |
◆ containsNode()
bool EFAFace::containsNode |
( |
const EFANode * |
node | ) |
const |
◆ copyIntersection()
void EFAFace::copyIntersection |
( |
const EFAFace & |
from_face | ) |
|
Definition at line 618 of file EFAFace.C.
620 for (
unsigned int i = 0; i <
_edges.size(); ++i)
621 if (from_face.
_edges[i]->hasIntersection())
◆ createEdges()
void EFAFace::createEdges |
( |
| ) |
|
Definition at line 272 of file EFAFace.C.
276 unsigned int i_plus1(i < (
_num_nodes - 1) ? i + 1 : 0);
283 EFAError(
"EFAface::createEdges requires exsiting _nodes");
◆ createNodes()
void EFAFace::createNodes |
( |
| ) |
|
◆ equivalent()
bool EFAFace::equivalent |
( |
const EFAFace * |
other_face | ) |
const |
◆ getEdge()
EFAEdge * EFAFace::getEdge |
( |
unsigned int |
edge_id | ) |
const |
◆ getEdgeNodeParametricCoords()
bool EFAFace::getEdgeNodeParametricCoords |
( |
EFANode * |
node, |
|
|
std::vector< double > & |
xi_2d |
|
) |
| const |
Definition at line 183 of file EFAFace.C.
186 bool edge_found =
false;
187 unsigned int edge_id;
189 EFAError(
"EFAface::getEdgeNodeParaCoor can only work for quad or tri faces");
202 double rel_dist =
_edges[edge_id]->distanceFromNode1(node);
203 double xi_1d = 2.0 * rel_dist - 1.0;
Referenced by getFaceNodeParametricCoords().
◆ getFaceNodeParametricCoords()
bool EFAFace::getFaceNodeParametricCoords |
( |
EFANode * |
node, |
|
|
std::vector< double > & |
xi_2d |
|
) |
| const |
Definition at line 210 of file EFAFace.C.
212 bool node_in_face =
false;
214 EFAError(
"EFAface::getFaceNodeParaCoor can only work for quad or tri faces");
224 xi_2d.resize(2, 0.0);
Referenced by resetEdgeIntersection().
◆ getInteriorFaceNode()
EFANode* EFAFace::getInteriorFaceNode |
( |
unsigned int |
i | ) |
const |
|
inline |
◆ getInteriorNode()
EFAFaceNode * EFAFace::getInteriorNode |
( |
unsigned int |
index | ) |
const |
◆ getMasterInfo()
bool EFAFace::getMasterInfo |
( |
EFANode * |
node, |
|
|
std::vector< EFANode * > & |
master_nodes, |
|
|
std::vector< double > & |
master_weights |
|
) |
| const |
Definition at line 132 of file EFAFace.C.
138 master_nodes.clear();
139 master_weights.clear();
140 bool masters_found =
false;
145 masters_found =
_edges[i]->getNodeMasters(node, master_nodes, master_weights);
149 EFAError(
"In getMasterInfo: cannot find master nodes in element edges");
159 std::vector<double> emb_xi(2, 0.0);
164 master_nodes.push_back(
_nodes[j]);
171 EFAError(
"EFAface::getMasterInfo() only works for quad and tri EFAface");
172 master_weights.push_back(weight);
174 masters_found =
true;
179 return masters_found;
◆ getNode()
EFANode * EFAFace::getNode |
( |
unsigned int |
node_id | ) |
const |
Definition at line 99 of file EFAFace.C.
Referenced by combineTwoEdges(), combineWithFace(), EFAElement3D::connectNeighbors(), containsNode(), EFAElement3D::createChild(), EFAElement2D::EFAElement2D(), XFEMCutElem3D::getCutPlaneNormal(), XFEMCutElem3D::getCutPlaneOrigin(), getFaceNodeParametricCoords(), XFEM::getFragmentFaces(), XFEMCutElem3D::getIntersectionInfo(), getMasterInfo(), EFAElement3D::getNeighborFaceNodeID(), and removeEmbeddedNode().
◆ getNumCuts()
unsigned int EFAFace::getNumCuts |
( |
| ) |
const |
◆ hasIntersection()
bool EFAFace::hasIntersection |
( |
| ) |
const |
◆ hasSameOrientation()
bool EFAFace::hasSameOrientation |
( |
const EFAFace * |
other_face | ) |
const |
Definition at line 658 of file EFAFace.C.
660 bool same_order =
false;
663 for (
unsigned int i = 0; i < other_face->
numNodes(); ++i)
667 unsigned int iplus1(i < (other_face->
_num_nodes - 1) ? i + 1 : 0);
674 EFAError(
"two faces overlap but can't find correct common nodes");
679 EFAWarning(
"in hasSameOrientation two faces does not overlap");
Referenced by EFAElement3D::overlaysElement().
◆ isAdjacent()
bool EFAFace::isAdjacent |
( |
const EFAFace * |
other_face | ) |
const |
◆ isTriOrQuad()
bool EFAFace::isTriOrQuad |
( |
| ) |
const |
◆ mapParametricCoordsFrom1DTo2D()
void EFAFace::mapParametricCoordsFrom1DTo2D |
( |
unsigned int |
edge_id, |
|
|
double |
xi_1d, |
|
|
std::vector< double > & |
xi_2d |
|
) |
| const |
|
private |
Definition at line 690 of file EFAFace.C.
695 xi_2d.resize(2, 0.0);
703 else if (edge_id == 1)
708 else if (edge_id == 2)
713 else if (edge_id == 3)
719 EFAError(
"edge_id out of bounds");
725 xi_2d[0] = 0.5 * (1.0 - xi_1d);
726 xi_2d[1] = 0.5 * (1.0 + xi_1d);
728 else if (edge_id == 1)
731 xi_2d[1] = 0.5 * (1.0 - xi_1d);
733 else if (edge_id == 2)
735 xi_2d[0] = 0.5 * (1.0 + xi_1d);
739 EFAError(
"edge_id out of bounds");
742 EFAError(
"the EFAface::mapParametricCoordsFrom1DTo2D only works for quad and tri faces");
Referenced by getEdgeNodeParametricCoords().
◆ numEdges()
unsigned int EFAFace::numEdges |
( |
| ) |
const |
◆ numInteriorNodes()
unsigned int EFAFace::numInteriorNodes |
( |
| ) |
const |
◆ numNodes()
unsigned int EFAFace::numNodes |
( |
| ) |
const |
◆ ownsEdge()
bool EFAFace::ownsEdge |
( |
const EFAEdge * |
other_edge | ) |
const |
◆ removeEmbeddedNode()
void EFAFace::removeEmbeddedNode |
( |
EFANode * |
emb_node | ) |
|
Definition at line 441 of file EFAFace.C.
446 unsigned int index = 0;
447 bool node_found =
false;
◆ resetEdgeIntersection()
void EFAFace::resetEdgeIntersection |
( |
const EFAFace * |
ref_face | ) |
|
Definition at line 554 of file EFAFace.C.
563 if (
_edges[j]->numEmbeddedNodes() > 1)
564 EFAError(
"frag face edge can only have 1 emb node at this point");
569 double inters_x =
_edges[j]->getIntersection(0, edge_node1);
570 if (std::abs(inters_x + 1.0) < 1.0e-4)
572 std::vector<double> node1_xi2d(2, 0.0);
573 std::vector<double> node2_xi2d(2, 0.0);
574 std::vector<double> emb_xi2d(2, 0.0);
581 std::sqrt((emb_xi2d[0] - node1_xi2d[0]) * (emb_xi2d[0] - node1_xi2d[0]) +
582 (emb_xi2d[1] - node1_xi2d[1]) * (emb_xi2d[1] - node1_xi2d[1]));
584 std::sqrt((node2_xi2d[0] - node1_xi2d[0]) * (node2_xi2d[0] - node1_xi2d[0]) +
585 (node2_xi2d[1] - node1_xi2d[1]) * (node2_xi2d[1] - node1_xi2d[1]));
586 inters_x = dist2node1 / full_dist;
589 EFAError(
"reference face does not contain the edge with invalid inters");
590 _edges[j]->resetIntersection(inters_x, emb_node, edge_node1);
Referenced by EFAFragment3D::combine_two_faces().
◆ reverseEdges()
void EFAFace::reverseEdges |
( |
| ) |
|
◆ setEdge()
void EFAFace::setEdge |
( |
unsigned int |
edge_id, |
|
|
EFAEdge * |
new_edge |
|
) |
| |
◆ setInteriorFaceNode()
void EFAFace::setInteriorFaceNode |
( |
unsigned int |
i, |
|
|
EFANode * |
node |
|
) |
| |
◆ setNode()
void EFAFace::setNode |
( |
unsigned int |
node_id, |
|
|
EFANode * |
node |
|
) |
| |
◆ sortEdges()
void EFAFace::sortEdges |
( |
| ) |
|
◆ split()
std::vector< EFAFace * > EFAFace::split |
( |
| ) |
const |
Definition at line 465 of file EFAFace.C.
467 std::vector<EFAFace *> new_faces;
472 std::vector<EFAFragment2D *> new_frags_tmp = frag_tmp->
split();
475 for (
unsigned int i = 0; i < new_frags_tmp.size(); ++i)
476 new_faces.push_back(
new EFAFace(new_frags_tmp[i]));
480 for (
unsigned int i = 0; i < new_frags_tmp.size(); ++i)
481 delete new_frags_tmp[i];
484 new_faces.push_back(
new EFAFace(*
this));
◆ switchNode()
Definition at line 105 of file EFAFace.C.
107 bool is_face_node =
true;
110 if (
_nodes[i] == old_node)
113 is_face_node =
false;
124 for (
unsigned int i = 0; i <
_edges.size(); ++i)
◆ _edges
std::vector<EFAEdge *> EFAFace::_edges |
|
private |
Definition at line 32 of file EFAFace.h.
Referenced by adjacentCommonEdge(), combineTwoEdges(), combineWithFace(), containsNode(), copyIntersection(), createEdges(), createNodes(), EFAFace(), getEdge(), getEdgeNodeParametricCoords(), getMasterInfo(), getNumCuts(), isAdjacent(), numEdges(), ownsEdge(), removeEmbeddedNode(), resetEdgeIntersection(), reverseEdges(), setEdge(), sortEdges(), switchNode(), and ~EFAFace().
◆ _face_interior_nodes
std::vector<EFANode *> EFAFace::_face_interior_nodes |
|
private |
◆ _interior_nodes
◆ _nodes
std::vector<EFANode *> EFAFace::_nodes |
|
private |
Definition at line 30 of file EFAFace.h.
Referenced by combineTwoEdges(), containsFace(), createEdges(), createNodes(), EFAFace(), equivalent(), getMasterInfo(), getNode(), hasSameOrientation(), numNodes(), setNode(), and switchNode().
◆ _num_edges
unsigned int EFAFace::_num_edges |
|
private |
Definition at line 31 of file EFAFace.h.
Referenced by adjacentCommonEdge(), combineTwoEdges(), combineWithFace(), containsNode(), getEdgeNodeParametricCoords(), getMasterInfo(), isAdjacent(), isTriOrQuad(), mapParametricCoordsFrom1DTo2D(), removeEmbeddedNode(), resetEdgeIntersection(), and sortEdges().
◆ _num_nodes
unsigned int EFAFace::_num_nodes |
|
private |
The documentation for this class was generated from the following files:
EFAEdge * getEdge(unsigned int edge_id) const
bool hasIntersection() const
double linearTriShape2D(unsigned int node_id, std::vector< double > &xi_2d)
EFANode * getNode(unsigned int node_id) const
void copyIntersection(const EFAFace &from_face)
EFAEdge * getEdge(unsigned int edge_id) const
void addIntersection(double position, EFANode *embedded_node_tmp, EFANode *from_node)
double linearQuadShape2D(unsigned int node_id, std::vector< double > &xi_2d)
std::vector< EFAFragment2D * > split()
bool containsNode(const EFANode *node) const
std::vector< EFAFaceNode * > _interior_nodes
bool getEdgeNodeParametricCoords(EFANode *node, std::vector< double > &xi_2d) const
bool containsNode(const EFANode *node) const
void mapParametricCoordsFrom1DTo2D(unsigned int edge_id, double xi_1d, std::vector< double > &xi_2d) const
void switchNode(EFANode *new_node, EFANode *old_node)
bool getFaceNodeParametricCoords(EFANode *node, std::vector< double > &xi_2d) const
bool ownsEdge(const EFAEdge *other_edge) const
EFANode * getNode(unsigned int index) const
unsigned int getNumCuts() const
unsigned int numInteriorNodes() const
std::vector< EFAEdge * > _edges
bool isAdjacent(const EFAFace *other_face) const
EFAFace(unsigned int n_nodes, unsigned int num_interior_face_nodes=0)
std::vector< EFANode * > _face_interior_nodes
unsigned int numNodes() const
void addEdge(EFAEdge *new_edge)
std::vector< EFANode * > _nodes
unsigned int numEdges() const
bool equivalent(const EFAFace *other_face) const
void removeEmbeddedNode(EFANode *emb_node)
unsigned int adjacentCommonEdge(const EFAFace *other_face) const