OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Delaunay triangle for the triangulation of a set of nodes. More...
#include <delaunaytriangle.h>
Public Member Functions | |
DelaunayTriangle (Domain *d, int node1, int node2, int node3) | |
Constructor. More... | |
~DelaunayTriangle () | |
Destructor. More... | |
double | giveXCenterCoordinate () const |
Gives the x coordinate of the center of the circumscribed circle. More... | |
double | giveYCenterCoordinate () const |
Gives the y coordinate of the center of the circumscribed circle. More... | |
double | giveCircumRadius () const |
Gives the radius of the circumscribed circle. More... | |
double | giveDistanceToCenter (const FloatArray &coords) |
Calculates the distance of a passed point to the center of the circumscribed circle. More... | |
int | giveNode (int i) |
Gives the i-node of the triangle. More... | |
std::list< LocalInsertionData< DelaunayTriangle * > > * | giveListOfCellsAndPosition () |
Returns a list of octree cells and with iterator position in their member lists. More... | |
void | setValidFlag (bool newFlag) |
Sets the flag whether Delaunay condition is fulfilled. More... | |
bool | giveValidFlag () |
Gives true if the delaunay triangle is valid. More... | |
double | giveShortestEdgeLength () |
Gives the length of the shortest triangle edge. More... | |
double | giveEdgeLength (int nodeA, int nodeB) |
Gives the length of the edge between two nodes. More... | |
Private Member Functions | |
void | computeCircumcircle () |
Calculates the parameters of the circumscribed circle. More... | |
void | setCircumCircle (double x, double y, double r) |
Sets up the parameters of the calculated circumscribed circle. More... | |
Private Attributes | |
Domain * | domain |
Domain where the nodes are defined. More... | |
IntArray | nodes |
Nodes defining the triangle. More... | |
FloatArray | circumCircle |
Parameters of the circumscribed circle: coordinates of center (x,y) and its radius. More... | |
bool | validFlag |
Flag for Delaunay property. More... | |
std::list< LocalInsertionData< DelaunayTriangle * > > | listOfCellsContainedInAndPosition |
In order to allow fast search in octree, every triangle stores list of octree cells where its circumscribed circle is contained. More... | |
Delaunay triangle for the triangulation of a set of nodes.
According the definition a Delaunay triangle has an empty circumscribed circle.
Definition at line 62 of file delaunaytriangle.h.
oofem::DelaunayTriangle::DelaunayTriangle | ( | Domain * | d, |
int | node1, | ||
int | node2, | ||
int | node3 | ||
) |
Constructor.
Definition at line 42 of file delaunaytriangle.C.
References oofem::IntArray::at(), computeCircumcircle(), and nodes.
oofem::DelaunayTriangle::~DelaunayTriangle | ( | ) |
Destructor.
Definition at line 56 of file delaunaytriangle.C.
|
private |
Calculates the parameters of the circumscribed circle.
Definition at line 81 of file delaunaytriangle.C.
References domain, oofem::DofManager::giveCoordinate(), oofem::Domain::giveDofManager(), giveNode(), and setCircumCircle().
Referenced by DelaunayTriangle(), and giveValidFlag().
|
inline |
Gives the radius of the circumscribed circle.
Definition at line 75 of file delaunaytriangle.h.
References oofem::FloatArray::at(), circumCircle, and giveDistanceToCenter().
Referenced by oofem::InsertTriangleBasedOnCircumcircle::evaluate(), and oofem::ElementCircumCirclesContainingNode::evaluate().
double oofem::DelaunayTriangle::giveDistanceToCenter | ( | const FloatArray & | coords | ) |
Calculates the distance of a passed point to the center of the circumscribed circle.
Definition at line 69 of file delaunaytriangle.C.
References oofem::FloatArray::at(), giveXCenterCoordinate(), and giveYCenterCoordinate().
Referenced by giveCircumRadius().
double oofem::DelaunayTriangle::giveEdgeLength | ( | int | nodeA, |
int | nodeB | ||
) |
Gives the length of the edge between two nodes.
Definition at line 135 of file delaunaytriangle.C.
References oofem::FloatArray::distance(), domain, oofem::DofManager::giveCoordinates(), oofem::Domain::giveDofManager(), and giveNode().
Referenced by giveShortestEdgeLength(), and giveValidFlag().
std::list< LocalInsertionData< DelaunayTriangle * > > * oofem::DelaunayTriangle::giveListOfCellsAndPosition | ( | ) |
Returns a list of octree cells and with iterator position in their member lists.
Definition at line 120 of file delaunaytriangle.C.
References listOfCellsContainedInAndPosition.
Referenced by oofem::InsertTriangleBasedOnCircumcircle::giveInsertionList(), giveNode(), and oofem::InsertTriangleBasedOnCircumcircle::registerInsertion().
|
inline |
Gives the i-node of the triangle.
Definition at line 80 of file delaunaytriangle.h.
References oofem::IntArray::at(), giveListOfCellsAndPosition(), and nodes.
Referenced by computeCircumcircle(), oofem::DelaunayTriangulator::findNonDelaunayTriangles(), and giveEdgeLength().
double oofem::DelaunayTriangle::giveShortestEdgeLength | ( | ) |
Gives the length of the shortest triangle edge.
Definition at line 126 of file delaunaytriangle.C.
References giveEdgeLength(), and oofem::min().
Referenced by giveValidFlag().
|
inline |
Gives true if the delaunay triangle is valid.
Definition at line 86 of file delaunaytriangle.h.
References computeCircumcircle(), giveEdgeLength(), giveShortestEdgeLength(), setCircumCircle(), and validFlag.
|
inline |
Gives the x coordinate of the center of the circumscribed circle.
Definition at line 71 of file delaunaytriangle.h.
References oofem::FloatArray::at(), and circumCircle.
Referenced by oofem::InsertTriangleBasedOnCircumcircle::evaluate(), oofem::ElementCircumCirclesContainingNode::evaluate(), and giveDistanceToCenter().
|
inline |
Gives the y coordinate of the center of the circumscribed circle.
Definition at line 73 of file delaunaytriangle.h.
References oofem::FloatArray::at(), and circumCircle.
Referenced by oofem::InsertTriangleBasedOnCircumcircle::evaluate(), oofem::ElementCircumCirclesContainingNode::evaluate(), and giveDistanceToCenter().
|
private |
Sets up the parameters of the calculated circumscribed circle.
Definition at line 61 of file delaunaytriangle.C.
References oofem::FloatArray::at(), and circumCircle.
Referenced by computeCircumcircle(), and giveValidFlag().
|
inline |
Sets the flag whether Delaunay condition is fulfilled.
Definition at line 84 of file delaunaytriangle.h.
References validFlag.
Referenced by oofem::DelaunayTriangulator::findNonDelaunayTriangles().
|
private |
Parameters of the circumscribed circle: coordinates of center (x,y) and its radius.
Definition at line 103 of file delaunaytriangle.h.
Referenced by giveCircumRadius(), giveXCenterCoordinate(), giveYCenterCoordinate(), and setCircumCircle().
|
private |
Domain where the nodes are defined.
Definition at line 99 of file delaunaytriangle.h.
Referenced by computeCircumcircle(), and giveEdgeLength().
|
private |
In order to allow fast search in octree, every triangle stores list of octree cells where its circumscribed circle is contained.
Definition at line 107 of file delaunaytriangle.h.
Referenced by giveListOfCellsAndPosition().
|
private |
Nodes defining the triangle.
Definition at line 101 of file delaunaytriangle.h.
Referenced by DelaunayTriangle(), and giveNode().
|
private |
Flag for Delaunay property.
Definition at line 105 of file delaunaytriangle.h.
Referenced by giveValidFlag(), and setValidFlag().