Branch data Line data Source code
1 : : /* *****************************************************************
2 : : MESQUITE -- The Mesh Quality Improvement Toolkit
3 : :
4 : : Copyright 2010 Sandia National Laboratories. Developed at the
5 : : University of Wisconsin--Madison under SNL contract number
6 : : 624796. The U.S. Government and the University of Wisconsin
7 : : retain certain rights to this software.
8 : :
9 : : This library is free software; you can redistribute it and/or
10 : : modify it under the terms of the GNU Lesser General Public
11 : : License as published by the Free Software Foundation; either
12 : : version 2.1 of the License, or (at your option) any later version.
13 : :
14 : : This library is distributed in the hope that it will be useful,
15 : : but WITHOUT ANY WARRANTY; without even the implied warranty of
16 : : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 : : Lesser General Public License for more details.
18 : :
19 : : You should have received a copy of the GNU Lesser General Public License
20 : : (lgpl.txt) along with this library; if not, write to the Free Software
21 : : Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 : :
23 : : (2010) [email protected]
24 : :
25 : : ***************************************************************** */
26 : :
27 : : /** \file TMetricNonBarrier.hpp
28 : : * \brief
29 : : * \author Boyd Tidwell
30 : : */
31 : :
32 : : #ifndef MSQ_T_METRIC_NON_BARRIER_HPP
33 : : #define MSQ_T_METRIC_NON_BARRIER_HPP
34 : :
35 : : #include "Mesquite.hpp"
36 : : #include "TMetric.hpp"
37 : : #include <string>
38 : :
39 : : namespace MBMesquite
40 : : {
41 : :
42 : : class MsqError;
43 : : template < unsigned R, unsigned C >
44 : : class MsqMatrix;
45 : :
46 : 8 : class TMetricNonBarrier : public TMetric
47 : : {
48 : : public:
49 : : MESQUITE_EXPORT virtual ~TMetricNonBarrier();
50 : :
51 : 0 : MESQUITE_EXPORT virtual std::string get_name() const
52 : : {
53 [ # # ]: 0 : return "TMetricNonBarrier";
54 : : }
55 : :
56 : : static inline bool invalid_determinant( double d )
57 : : {
58 : : return d < 1e-12;
59 : : }
60 : : };
61 : :
62 : 2 : class TMetricNonBarrier2D : public TMetric
63 : : {
64 : : public:
65 : : MESQUITE_EXPORT virtual ~TMetricNonBarrier2D();
66 : :
67 : : /**\brief Evaluate \f$\mu(T)\f$
68 : : *
69 : : * This method always returns an error for 2D-only metrics
70 : : */
71 : : MESQUITE_EXPORT virtual bool evaluate( const MsqMatrix< 3, 3 >& T, double& result, MsqError& err );
72 : : };
73 : :
74 : 46 : class TMetricNonBarrier3D : public TMetric
75 : : {
76 : : public:
77 : : MESQUITE_EXPORT virtual ~TMetricNonBarrier3D();
78 : :
79 : : /**\brief Evaluate \f$\mu(T)\f$
80 : : *
81 : : * This method always returns an error for 3D-only metrics
82 : : */
83 : : MESQUITE_EXPORT virtual bool evaluate( const MsqMatrix< 2, 2 >& T, double& result, MsqError& err );
84 : : };
85 : :
86 : : } // namespace MBMesquite
87 : :
88 : : #endif
|