71 double x = coords.
at(1);
72 double y = coords.
at(2);
77 return ( sqrt( ( xC - x ) * ( xC - x ) + ( yC - y ) * ( yC - y ) ) );
102 a = x1 * y2 + y1 * x3 + x2 * y3 - 1.0 * ( x1 * y3 + y1 * x2 + y2 * x3 );
103 bx = -1.0 * ( ( ( x1 * x1 + y1 * y1 ) * y2 + y1 * ( x3 * x3 + y3 * y3 ) + ( x2 * x2 + y2 * y2 ) * y3 )
104 - 1.0 * ( ( x1 * x1 + y1 * y1 ) * y3 + y1 * ( x2 * x2 + y2 * y2 ) + y2 * ( x3 * x3 + y3 * y3 ) ) );
105 by = ( ( ( x1 * x1 + y1 * y1 ) * x2 + x1 * ( x3 * x3 + y3 * y3 ) + ( x2 * x2 + y2 * y2 ) * x3 )
106 - 1.0 * ( ( x1 * x1 + y1 * y1 ) * x3 + x1 * ( x2 * x2 + y2 * y2 ) + x2 * ( x3 * x3 + y3 * y3 ) ) );
107 c = ( ( ( x1 * x1 + y1 * y1 ) * x2 * y3 + x1 * y2 * ( x3 * x3 + y3 * y3 ) + y1 * ( x2 * x2 + y2 * y2 ) * x3 )
108 - 1.0 * ( ( x1 * x1 + y1 * y1 ) * y2 * x3 + x1 * ( x2 * x2 + y2 * y2 ) * y3 + y1 * x2 * ( x3 * x3 + y3 * y3 ) ) );
110 double xCenterCoordinate = ( -1.0 * bx / ( 2 * a ) );
111 double yCenterCoordinate = ( -1.0 * by / ( 2 * a ) );
112 double absA = a < 0 ? -1.0 * a : a;
114 double radius = ( ( sqrt(bx * bx + by * by + 4.0 * a * c) ) / ( 2.0 * absA ) );
119 std :: list< LocalInsertionData< DelaunayTriangle * > > *
131 return min( length1,
min(length2, length3) );
double & at(int i)
Coefficient access function.
double giveShortestEdgeLength()
Gives the length of the shortest triangle edge.
void setCircumCircle(double x, double y, double r)
Sets up the parameters of the calculated circumscribed circle.
virtual FloatArray * giveCoordinates()
double giveDistanceToCenter(const FloatArray &coords)
Calculates the distance of a passed point to the center of the circumscribed circle.
Base class for dof managers.
int & at(int i)
Coefficient access function.
std::list< LocalInsertionData< DelaunayTriangle * > > * giveListOfCellsAndPosition()
Returns a list of octree cells and with iterator position in their member lists.
FloatArray circumCircle
Parameters of the circumscribed circle: coordinates of center (x,y) and its radius.
double distance(const FloatArray &x) const
Computes the distance between position represented by receiver and position given as parameter...
IntArray nodes
Nodes defining the triangle.
double giveEdgeLength(int nodeA, int nodeB)
Gives the length of the edge between two nodes.
double giveYCenterCoordinate() const
Gives the y coordinate of the center of the circumscribed circle.
void computeCircumcircle()
Calculates the parameters of the circumscribed circle.
double giveXCenterCoordinate() const
Gives the x coordinate of the center of the circumscribed circle.
Class representing vector of real numbers.
int giveNode(int i)
Gives the i-node of the triangle.
int min(int i, int j)
Returns smaller value from two given decimals.
Domain * domain
Domain where the nodes are defined.
~DelaunayTriangle()
Destructor.
virtual double giveCoordinate(int i)
the oofem namespace is to define a context or scope in which all oofem names are defined.
DofManager * giveDofManager(int n)
Service for accessing particular domain dof manager.
std::list< LocalInsertionData< DelaunayTriangle * > > listOfCellsContainedInAndPosition
In order to allow fast search in octree, every triangle stores list of octree cells where its circums...
DelaunayTriangle(Domain *d, int node1, int node2, int node3)
Constructor.