Branch data Line data Source code
1 : : /* *****************************************************************
2 : : MESQUITE -- The Mesh Quality Improvement Toolkit
3 : :
4 : : Copyright 2004 Sandia Corporation and Argonne National
5 : : Laboratory. Under the terms of Contract DE-AC04-94AL85000
6 : : with Sandia Corporation, the U.S. Government retains certain
7 : : rights in 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 : : [email protected], [email protected], [email protected],
24 : : [email protected], [email protected], [email protected]
25 : :
26 : : ***************************************************************** */
27 : : // -*- Mode : c++; tab-width: 3; c-tab-always-indent: t; indent-tabs-mode: nil; c-basic-offset: 3
28 : : // -*-
29 : :
30 : : /*! \file UntangleBetaQualityMetric.hpp
31 : :
32 : : Header file for the MBMesquite::UntangleBetaQualityMetric class
33 : :
34 : : \author Michael Brewer
35 : : \date 2002-09-10
36 : : */
37 : :
38 : : #ifndef UNTANGLE_BETA_QUALITY_METRIC_HPP
39 : : #define UNTANGLE_BETA_QUALITY_METRIC_HPP
40 : :
41 : : #include "Mesquite.hpp"
42 : : #include "ElementQM.hpp"
43 : : #include "AveragingQM.hpp"
44 : : namespace MBMesquite
45 : : {
46 : : /*! \class UntangleBetaQualityMetric
47 : : \brief The untangle beta quality metric.
48 : :
49 : : Given a scalar value beta and local signed element volume alpha_i,
50 : : define delta_i to be alpha_i minus beta. The Untangle beta value
51 : : is then defined as square root of the sum over sample points
52 : : of the absolute value of delta_i minus delta_i, difference squared.
53 : : That is, the root mean square of the difference, abs(delta_i) minus
54 : : delta_i.
55 : :
56 : : The constructor defaults to RMS AveragingMethod and
57 : : ELEMENT_VERTICES evaluationMode. The default beta value is
58 : : .05.
59 : : */
60 : :
61 : : class UntangleBetaQualityMetric : public ElementQM, public AveragingQM
62 : : {
63 : : public:
64 : : MESQUITE_EXPORT UntangleBetaQualityMetric( double bet = 0.05 );
65 : :
66 : : // virtual destructor ensures use of polymorphism during destruction
67 [ - + ]: 8 : MESQUITE_EXPORT virtual ~UntangleBetaQualityMetric() {}
68 : :
69 : : /*!Function to allow users to set the beta value after the
70 : : metric has already been created. */
71 : : MESQUITE_EXPORT void set_beta( double beta_in )
72 : : {
73 : : mBeta = beta_in;
74 : : }
75 : : /*!Function to allow the user to check the value of beta.*/
76 : : MESQUITE_EXPORT double get_beta()
77 : : {
78 : : return mBeta;
79 : : }
80 : :
81 : : MESQUITE_EXPORT virtual std::string get_name() const;
82 : :
83 : : MESQUITE_EXPORT virtual int get_negate_flag() const;
84 : :
85 : : MESQUITE_EXPORT virtual bool evaluate( PatchData& pd, size_t handle, double& value, MsqError& err );
86 : :
87 : : private:
88 : : double mBeta;
89 : : };
90 : :
91 : : } // namespace MBMesquite
92 : :
93 : : #endif // UntangleBetaQualityMetric_hpp
|