The Face class is an abstract base class that supplies implemented general methods, as well as a vew virtual interface methods to child classes. More...
#include <Face.hpp>
Public Types | |
enum | Type { e_tri, e_quad, e_MAX_TYPE } |
enum | eType { e_tet, e_hex, e_tri_cohesive, e_quad_cohesive, e_MAX_ELEMENT_TYPE } |
Public Member Functions | |
Face (Type type) | |
Constructor: set type & reset params. More... | |
Face () | |
~Face () | |
Destructor. More... | |
void | setID (int theID) |
Sets the serial ID for the face. More... | |
int | getID () const |
Returns the serial ID of the face. More... | |
void | setFlag (int theFlag) |
Sets the flag for the face. More... | |
int | getFlag () const |
Gets the flag for the face. More... | |
virtual int | getNumNodes () const =0 |
Retrieves the number of nodes that make up the face. More... | |
Node ** | getNodes () |
Returns the array of nodes. More... | |
void | setElement1 (Element *elem1) |
Sets the pointer to the first element that this face is associated with. More... | |
Element * | getElement1 () |
Get the pointer to the first element that this face is associated with. More... | |
void | setElement2 (Element *elem2) |
Sets the pointer to the second element that this face is associated with. More... | |
Element * | getElement2 () |
Get the pointer to the second element that this face is associated with. More... | |
void | addElement (Element *theElement) |
void | removeElement (Element *theElement) |
Type | getFaceType () const |
Returns the face type of this face (see the Type attribute of the Face class). More... | |
boolean | isExterior () const |
virtual Element * | buildCohesive (Element *side_elem, Node *node, Node *new_node)=0 |
void | replaceNode (Node *node, Node *new_node) |
boolean | containsNode (Node *node) const |
Static Public Member Functions | |
static Face * | create (eType type) |
static void | setMesh (Mesh *emesh) |
Protected Attributes | |
int | d_ID |
Serial ID assigned to this face. More... | |
int | d_flag |
User-defined integer flag assigned to this face. More... | |
Element * | d_E1 |
Pointer to the first element that this face is associated with. More... | |
Element * | d_E2 |
The second element that this face is associated with. More... | |
Node ** | d_nodes |
Array of nodes assigned to this face. More... | |
Type | d_eType |
The Type of face (triangular or square for now). More... | |
Static Protected Attributes | |
static Mesh * | s_mesh = 0 |
Friends | |
istream & | operator>> (istream &stream, Face &face) |
ostream & | operator<< (ostream &stream, Face &face) |
The Face class is an abstract base class that supplies implemented general methods, as well as a vew virtual interface methods to child classes.
It represents one face of a mesh element. It knows the nodes that make it up, and the elements that it is a part of. It knows whether or not it is on the surface of the mesh.
enum eType |
Enumerator | |
---|---|
e_tet | |
e_hex | |
e_tri_cohesive | |
e_quad_cohesive | |
e_MAX_ELEMENT_TYPE |
Definition at line 24 of file Face.hpp.
enum Type |
Enumerator | |
---|---|
e_tri | |
e_quad | |
e_MAX_TYPE |
Face | ( | Face::Type | ftype | ) |
Constructor: set type & reset params.
Definition at line 10 of file Face.cpp.
Face | ( | ) |
Definition at line 19 of file Face.cpp.
~Face | ( | ) |
|
inline |
Definition at line 200 of file Face.hpp.
Referenced by Element::setFace().
Implemented in QuadFace, and TriFace.
Referenced by Mesh::replaceNode().
Definition at line 108 of file Face.cpp.
References d_nodes, FALSE, getNumNodes(), i, and TRUE.
Referenced by Mesh::replaceNode().
|
static |
Definition at line 34 of file Face.cpp.
References e_hex, e_quad_cohesive, e_tet, e_tri_cohesive, and face.
Referenced by operator>>().
|
inline |
Get the pointer to the first element that this face is associated with.
Definition at line 191 of file Face.hpp.
References d_E1.
Referenced by Mesh::addCohesive(), Node::getSeparateElements(), Mesh::replaceNode(), and Mesh::write_boundary().
|
inline |
Get the pointer to the second element that this face is associated with.
Definition at line 197 of file Face.hpp.
References d_E2.
Referenced by Mesh::addCohesive(), Node::getSeparateElements(), and Mesh::replaceNode().
|
inline |
|
inline |
Gets the flag for the face.
Will return -1 if it was not set.
Definition at line 182 of file Face.hpp.
References d_flag.
Referenced by Mesh::write_boundary().
|
inline |
|
inline |
Returns the array of nodes.
Definition at line 185 of file Face.hpp.
References d_nodes.
Referenced by Mesh::addCohesive(), operator>>(), and Node::sharedFace().
|
pure virtual |
Retrieves the number of nodes that make up the face.
Will be either three or four depending upon the face type.
Implemented in QuadFace, and TriFace.
Referenced by Mesh::addCohesive(), containsNode(), operator>>(), replaceNode(), and Node::sharedFace().
|
inline |
void removeElement | ( | Element * | theElement | ) |
Definition at line 81 of file Face.cpp.
Referenced by HexElement::~HexElement(), QCoElement::~QCoElement(), TCoElement::~TCoElement(), and TetElement::~TetElement().
Definition at line 93 of file Face.cpp.
References Node::addFace(), d_nodes, getNumNodes(), i, and Node::removeFace().
Referenced by QCoElement::replaceFaceNode(), TCoElement::replaceFaceNode(), and Element::replaceNode().
|
inline |
Sets the pointer to the first element that this face is associated with.
Definition at line 188 of file Face.hpp.
References d_E1.
|
inline |
Sets the pointer to the second element that this face is associated with.
Definition at line 194 of file Face.hpp.
References d_E2.
|
inline |
Sets the flag for the face.
Will return -1 if it was not set.
Definition at line 179 of file Face.hpp.
References d_flag.
Referenced by operator>>().
|
inline |
Sets the serial ID for the face.
Definition at line 173 of file Face.hpp.
References d_ID.
Referenced by Mesh::addFace(), and Mesh::removeFace().
|
inlinestatic |
Definition at line 215 of file Face.hpp.
References s_mesh.
Referenced by Mesh::Mesh().
|
friend |
|
friend |
Definition at line 64 of file Face.cpp.
|
protected |
Pointer to the first element that this face is associated with.
A face will always have at least one element.
Definition at line 147 of file Face.hpp.
Referenced by addElement(), TriFace::buildCohesive(), QuadFace::buildCohesive(), getElement1(), removeElement(), and setElement1().
|
protected |
The second element that this face is associated with.
This element will be Null if the face is an exterior face. This face will have a normal opposite of the one for the element in E2.
Definition at line 154 of file Face.hpp.
Referenced by addElement(), TriFace::buildCohesive(), QuadFace::buildCohesive(), getElement2(), isExterior(), removeElement(), and setElement2().
|
protected |
The Type of face (triangular or square for now).
Definition at line 166 of file Face.hpp.
Referenced by getFaceType().
|
protected |
|
protected |
|
protected |
Array of nodes assigned to this face.
The number of nodes will depend on the type of face.
Definition at line 161 of file Face.hpp.
Referenced by TriFace::buildCohesive(), QuadFace::buildCohesive(), containsNode(), getNodes(), operator>>(), QuadFace::QuadFace(), replaceNode(), TriFace::TriFace(), ~Face(), QuadFace::~QuadFace(), and TriFace::~TriFace().
|
staticprotected |
Definition at line 168 of file Face.hpp.
Referenced by operator>>(), and setMesh().