Forward compatibility: flex
[foam-extend-3.2.git] / src / dynamicMesh / dynamicTopoFvMesh / tetMetrics / tetMetric.H
blob73853db46bfcca46f6765994c1899508c926a2d4
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend is free software: you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation, either version 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     tetMetric
27 Description
28     Base class for tetrahedral mesh-quality metrics.
30 Author
31     Sandeep Menon
32     University of Massachusetts Amherst
33     All rights reserved
35 \*---------------------------------------------------------------------------*/
37 #ifndef tetMetric_H
38 #define tetMetric_H
40 #include "point.H"
41 #include "scalar.H"
42 #include "memberFunctionSelectionTables.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 namespace Foam
49 // Class forward declarations
50 class word;
51 class dictionary;
53 class tetMetric
55     // Private Member Functions
57         //- Disallow default bitwise copy construct
58         tetMetric(const tetMetric&);
60         //- Disallow default bitwise assignment
61         void operator=(const tetMetric&);
64 public:
66     // Typedef for tetrahedral metrics
68         typedef scalar (*tetMetricReturnType)
69         (
70             const point& p0,
71             const point& p1,
72             const point& p2,
73             const point& p3
74         );
77     // Selector
79         static tetMetricReturnType New
80         (
81             const dictionary& dict,
82             const word& metricName
83         );
86     // Member Function Selectors
88         declareMemberFunctionSelectionTable
89         (
90             scalar,
91             tetMetric,
92             metric,
93             Point,
94             (
95                 const point& p0,
96                 const point& p1,
97                 const point& p2,
98                 const point& p3
99             ),
100             (metricName)
101         );
103         static scalar metric
104         (
105             const point& p0,
106             const point& p1,
107             const point& p2,
108             const point& p3
109         );
111     // Destructor
113         virtual ~tetMetric()
114         {}
117 } // End namespace Foam
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 #endif
123 // ************************************************************************* //