OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::DelaunayTriangle Class Reference

Delaunay triangle for the triangulation of a set of nodes. More...

#include <delaunaytriangle.h>

+ Collaboration diagram for oofem::DelaunayTriangle:

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

Domaindomain
 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...
 

Detailed Description

Delaunay triangle for the triangulation of a set of nodes.

According the definition a Delaunay triangle has an empty circumscribed circle.

Author
David Krybus

Definition at line 62 of file delaunaytriangle.h.

Constructor & Destructor Documentation

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.

Member Function Documentation

void oofem::DelaunayTriangle::computeCircumcircle ( )
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().

double oofem::DelaunayTriangle::giveCircumRadius ( ) const
inline
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().

int oofem::DelaunayTriangle::giveNode ( int  i)
inline
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().

bool oofem::DelaunayTriangle::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.

double oofem::DelaunayTriangle::giveXCenterCoordinate ( ) const
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().

double oofem::DelaunayTriangle::giveYCenterCoordinate ( ) const
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().

void oofem::DelaunayTriangle::setCircumCircle ( double  x,
double  y,
double  r 
)
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().

void oofem::DelaunayTriangle::setValidFlag ( bool  newFlag)
inline

Sets the flag whether Delaunay condition is fulfilled.

Definition at line 84 of file delaunaytriangle.h.

References validFlag.

Referenced by oofem::DelaunayTriangulator::findNonDelaunayTriangles().

Member Data Documentation

FloatArray oofem::DelaunayTriangle::circumCircle
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().

Domain* oofem::DelaunayTriangle::domain
private

Domain where the nodes are defined.

Definition at line 99 of file delaunaytriangle.h.

Referenced by computeCircumcircle(), and giveEdgeLength().

std :: list< LocalInsertionData< DelaunayTriangle * > > oofem::DelaunayTriangle::listOfCellsContainedInAndPosition
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().

IntArray oofem::DelaunayTriangle::nodes
private

Nodes defining the triangle.

Definition at line 101 of file delaunaytriangle.h.

Referenced by DelaunayTriangle(), and giveNode().

bool oofem::DelaunayTriangle::validFlag
private

Flag for Delaunay property.

Definition at line 105 of file delaunaytriangle.h.

Referenced by giveValidFlag(), and setValidFlag().


The documentation for this class was generated from the following files:

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:34 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011