OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
edge2d.C
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 - 2013 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 #include "edge2d.h"
36 #include "delaunaytriangle.h"
37 
38 namespace oofem {
39 Edge2D :: Edge2D(int node1, int node2) :
40  nodeNumbers{node1, node2}
41 {}
42 
44 { }
45 
46 bool
48 {
49  return ( this->nodeNumbers.first == right.nodeNumbers.first && this->nodeNumbers.second == right.nodeNumbers.second ) ||
50  ( this->nodeNumbers.first == right.nodeNumbers.second && this->nodeNumbers.second == right.nodeNumbers.first );
51 }
52 
53 
54 
55 AlphaEdge2D :: AlphaEdge2D(int node1, int node2, double _length) :
56  Edge2D(node1, node2)
57  , isOnConvexHull(true)
58  , outerAlphaBound(0.0)
59  , innerAlphaBound(0.0)
60  , length(_length)
61 {
62  sharedByTriangles [ 0 ] = NULL;
63  sharedByTriangles [ 1 ] = NULL;
64 }
65 
67 { }
68 
69 void
71 {
72  sharedByTriangles [ n - 1 ] = pTE;
73 }
74 }
Edge class for Delaunay triangulation.
Definition: edge2d.h:49
void setSharing(int n, DelaunayTriangle *pTE)
Stores DelaunayTriangle sharing the receiver.
Definition: edge2d.C:70
std::pair< int, int > nodeNumbers
Global node numbers.
Definition: edge2d.h:53
Delaunay triangle for the triangulation of a set of nodes.
virtual ~AlphaEdge2D()
Destructor.
Definition: edge2d.C:66
virtual bool operator==(const Edge2D &right)
Compares receiver with passed Edge2D. Returns true if node numbers are equal, false otherwise...
Definition: edge2d.C:47
DelaunayTriangle * sharedByTriangles[2]
Triangles which share the alphaEdge.
Definition: edge2d.h:112
Edge2D(int node1, int node2)
Constructor.
Definition: edge2d.C:39
AlphaEdge2D(int node1, int node2, double _length)
Constructor.
Definition: edge2d.C:55
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual ~Edge2D()
Destructor.
Definition: edge2d.C:43

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:28 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011