OOFEM 3.0
Loading...
Searching...
No Matches
delaunaytriangle.h
Go to the documentation of this file.
1/*
2 *
3 * ##### ##### ###### ###### ### ###
4 * ## ## ## ## ## ## ## ### ##
5 * ## ## ## ## #### #### ## # ##
6 * ## ## ## ## ## ## ## ##
7 * ## ## ## ## ## ## ## ##
8 * ##### ##### ## ###### ## ##
9 *
10 *
11 * OOFEM : Object Oriented Finite Element Code
12 *
13 * Copyright (C) 1993 - 2025 Borek Patzak
14 *
15 *
16 *
17 * Czech Technical University, Faculty of Civil Engineering,
18 * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19 *
20 * This library is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU Lesser General Public
22 * License as published by the Free Software Foundation; either
23 * version 2.1 of the License, or (at your option) any later version.
24 *
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28 * Lesser General Public License for more details.
29 *
30 * You should have received a copy of the GNU Lesser General Public
31 * License along with this library; if not, write to the Free Software
32 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33 */
34
35// *************************
36// *** DELAUNAY TRIANGLE ***
37// *************************
38
39// used for Delaunay meshing
40
41
42#ifndef delaunaytriangle_h
43#define delaunaytriangle_h
44
45#include <list>
46#include "intarray.h"
47#include "floatarray.h"
48
49namespace oofem {
50class Domain;
51class TimeStep;
52class IntArray;
53class FloatArray;
54template< class T >class LocalInsertionData;
55
63{
64public:
66 DelaunayTriangle(Domain *d, int node1, int node2, int node3);
69
71 double giveXCenterCoordinate() const { return circumCircle.at(1); }
73 double giveYCenterCoordinate() const { return circumCircle.at(2); }
75 double giveCircumRadius() const { return circumCircle.at(3); }
77 double giveDistanceToCenter(const FloatArray &coords);
78
80 int giveNode(int i) { return nodes.at(i); }
82 std :: list< LocalInsertionData< DelaunayTriangle * > > *giveListOfCellsAndPosition();
84 void setValidFlag(bool newFlag) { validFlag = newFlag; }
86 bool giveValidFlag() { return validFlag; }
90 double giveEdgeLength(int nodeA, int nodeB);
91
92
93private:
97 void setCircumCircle(double x, double y, double r);
107 std :: list< LocalInsertionData< DelaunayTriangle * > >listOfCellsContainedInAndPosition;
108};
109} // end namespace oofem
110#endif // delaunaytriangle_h
IntArray nodes
Nodes defining the triangle.
FloatArray circumCircle
Parameters of the circumscribed circle: coordinates of center (x,y) and its radius.
double giveYCenterCoordinate() const
Gives the y coordinate of the center of the circumscribed circle.
Domain * domain
Domain where the nodes are defined.
void setCircumCircle(double x, double y, double r)
Sets up the parameters of the calculated circumscribed circle.
double giveEdgeLength(int nodeA, int nodeB)
Gives the length of the edge between two nodes.
double giveCircumRadius() const
Gives the radius of the circumscribed circle.
void setValidFlag(bool newFlag)
Sets the flag whether Delaunay condition is fulfilled.
std ::list< LocalInsertionData< DelaunayTriangle * > > * giveListOfCellsAndPosition()
Returns a list of octree cells and with iterator position in their member lists.
bool giveValidFlag()
Gives true if the delaunay triangle is valid.
std ::list< LocalInsertionData< DelaunayTriangle * > > listOfCellsContainedInAndPosition
In order to allow fast search in octree, every triangle stores list of octree cells where its circums...
double giveDistanceToCenter(const FloatArray &coords)
Calculates the distance of a passed point to the center of the circumscribed circle.
double giveXCenterCoordinate() const
Gives the x coordinate of the center of the circumscribed circle.
bool validFlag
Flag for Delaunay property.
int giveNode(int i)
Gives the i-node of the triangle.
void computeCircumcircle()
Calculates the parameters of the circumscribed circle.
DelaunayTriangle(Domain *d, int node1, int node2, int node3)
Constructor.
double giveShortestEdgeLength()
Gives the length of the shortest triangle edge.

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011