https://mooseframework.inl.gov
Loading...
Searching...
No Matches
EFAFace.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include <vector>
13
14class EFANode;
15class EFAEdge;
16class EFAFaceNode;
17class EFAFragment2D;
18
20{
21public:
22 EFAFace(unsigned int n_nodes, unsigned int num_interior_face_nodes = 0);
23 EFAFace(const EFAFace & other_face);
24 EFAFace(const EFAFragment2D * frag);
25
26 ~EFAFace();
27
28private:
29 unsigned int _num_nodes;
30 std::vector<EFANode *> _nodes;
31 unsigned int _num_edges;
32 std::vector<EFAEdge *> _edges;
33 std::vector<EFAFaceNode *> _interior_nodes;
34 std::vector<EFANode *> _face_interior_nodes;
35
36public:
37 unsigned int numNodes() const;
38 void setNode(unsigned int node_id, EFANode * node);
39 EFANode * getNode(unsigned int node_id) const;
40 void switchNode(EFANode * new_node, EFANode * old_node);
41 bool getMasterInfo(EFANode * node,
42 std::vector<EFANode *> & master_nodes,
43 std::vector<double> & master_weights) const;
44 bool getEdgeNodeParametricCoords(EFANode * node, std::vector<double> & xi_2d) const;
45 bool getFaceNodeParametricCoords(EFANode * node, std::vector<double> & xi_2d) const;
46 unsigned int numInteriorNodes() const;
47 void createNodes();
48
49 unsigned int numEdges() const { return _edges.size(); }
50 EFAEdge * getEdge(unsigned int edge_id) const { return _edges[edge_id]; }
51 void setEdge(unsigned int edge_id, EFAEdge * new_edge);
52 void createEdges();
53 void combineTwoEdges(unsigned int edge_id1, unsigned int edge_id2);
54 void sortEdges();
55 void reverseEdges();
56 bool isTriOrQuad() const;
57
58 EFANode * getInteriorFaceNode(unsigned int i) const { return _face_interior_nodes[i]; };
59 void setInteriorFaceNode(unsigned int i, EFANode * node);
60 bool equivalent(const EFAFace * other_face) const;
61 bool containsNode(const EFANode * node) const;
62 bool containsFace(const EFAFace * other_face) const;
63 bool ownsEdge(const EFAEdge * other_edge) const;
64 void removeEmbeddedNode(EFANode * emb_node);
65 std::vector<EFAFace *> split() const;
66 EFAFace * combineWithFace(const EFAFace * other_face) const;
67 void resetEdgeIntersection(const EFAFace * ref_face);
68
69 unsigned int getNumCuts() const;
70 bool hasIntersection() const;
71 void copyIntersection(const EFAFace & from_face);
72 bool isAdjacent(const EFAFace * other_face) const;
73 unsigned int adjacentCommonEdge(const EFAFace * other_face) const;
74 bool hasSameOrientation(const EFAFace * other_face) const;
75 EFAFaceNode * getInteriorNode(unsigned int index) const;
76
77private:
78 void mapParametricCoordsFrom1DTo2D(unsigned int edge_id,
79 double xi_1d,
80 std::vector<double> & xi_2d) const;
81};
std::vector< EFAFaceNode * > _interior_nodes
Definition EFAFace.h:33
void sortEdges()
Definition EFAFace.C:317
unsigned int numEdges() const
Definition EFAFace.h:49
std::vector< EFANode * > _nodes
Definition EFAFace.h:30
void setInteriorFaceNode(unsigned int i, EFANode *node)
Definition EFAFace.C:81
std::vector< EFAEdge * > _edges
Definition EFAFace.h:32
bool hasSameOrientation(const EFAFace *other_face) const
Definition EFAFace.C:615
void resetEdgeIntersection(const EFAFace *ref_face)
Definition EFAFace.C:513
bool hasIntersection() const
Definition EFAFace.C:568
unsigned int getNumCuts() const
Definition EFAFace.C:556
void copyIntersection(const EFAFace &from_face)
Definition EFAFace.C:577
EFAFace * combineWithFace(const EFAFace *other_face) const
Definition EFAFace.C:449
void createNodes()
Definition EFAFace.C:242
unsigned int adjacentCommonEdge(const EFAFace *other_face) const
Definition EFAFace.C:603
bool containsFace(const EFAFace *other_face) const
Definition EFAFace.C:376
void mapParametricCoordsFrom1DTo2D(unsigned int edge_id, double xi_1d, std::vector< double > &xi_2d) const
Definition EFAFace.C:647
~EFAFace()
Definition EFAFace.C:60
void setEdge(unsigned int edge_id, EFAEdge *new_edge)
Definition EFAFace.C:254
EFAEdge * getEdge(unsigned int edge_id) const
Definition EFAFace.h:50
bool ownsEdge(const EFAEdge *other_edge) const
Definition EFAFace.C:391
bool getMasterInfo(EFANode *node, std::vector< EFANode * > &master_nodes, std::vector< double > &master_weights) const
Definition EFAFace.C:132
bool containsNode(const EFANode *node) const
Definition EFAFace.C:362
void reverseEdges()
Definition EFAFace.C:337
bool equivalent(const EFAFace *other_face) const
Definition EFAFace.C:355
std::vector< EFAFace * > split() const
Definition EFAFace.C:424
EFANode * getInteriorFaceNode(unsigned int i) const
Definition EFAFace.h:58
bool isTriOrQuad() const
Definition EFAFace.C:346
unsigned int _num_nodes
Definition EFAFace.h:29
unsigned int numNodes() const
Definition EFAFace.C:87
void combineTwoEdges(unsigned int edge_id1, unsigned int edge_id2)
Definition EFAFace.C:276
EFAFaceNode * getInteriorNode(unsigned int index) const
Definition EFAFace.C:641
void setNode(unsigned int node_id, EFANode *node)
Definition EFAFace.C:93
bool isAdjacent(const EFAFace *other_face) const
Definition EFAFace.C:588
std::vector< EFANode * > _face_interior_nodes
Definition EFAFace.h:34
void switchNode(EFANode *new_node, EFANode *old_node)
Definition EFAFace.C:105
bool getFaceNodeParametricCoords(EFANode *node, std::vector< double > &xi_2d) const
Definition EFAFace.C:210
unsigned int numInteriorNodes() const
Definition EFAFace.C:236
EFANode * getNode(unsigned int node_id) const
Definition EFAFace.C:99
unsigned int _num_edges
Definition EFAFace.h:31
bool getEdgeNodeParametricCoords(EFANode *node, std::vector< double > &xi_2d) const
Definition EFAFace.C:183
void createEdges()
Definition EFAFace.C:260
void removeEmbeddedNode(EFANode *emb_node)
Definition EFAFace.C:400
const dof_id_type n_nodes