Branch data Line data Source code
1 : : /* *****************************************************************
2 : : MESQUITE -- The Mesh Quality Improvement Toolkit
3 : :
4 : : Copyright 2006 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 : : ***************************************************************** */
24 : :
25 : : /** \file ElementAvgQM.hpp
26 : : * \brief
27 : : * \author Boyd Tidwell
28 : : */
29 : :
30 : : #ifndef MSQ_ELEMENT_AVG_QM_HPP
31 : : #define MSQ_ELEMENT_AVG_QM_HPP
32 : :
33 : : #include "Mesquite.hpp"
34 : : #include "ElementQM.hpp"
35 : :
36 : : namespace MBMesquite
37 : : {
38 : :
39 : : class ElemSampleQM;
40 : :
41 : : class ElementAvgQM : public ElementQM
42 : : {
43 : : public:
44 : : MESQUITE_EXPORT ElementAvgQM( ElemSampleQM* metric );
45 : :
46 : : MESQUITE_EXPORT virtual ~ElementAvgQM();
47 : :
48 : 0 : MESQUITE_EXPORT ElemSampleQM* get_quality_metric() const
49 : : {
50 : 0 : return mMetric;
51 : : }
52 : :
53 : : MESQUITE_EXPORT virtual std::string get_name() const;
54 : :
55 : : MESQUITE_EXPORT virtual int get_negate_flag() const;
56 : :
57 : : MESQUITE_EXPORT virtual bool evaluate( PatchData& pd, size_t handle, double& value, MsqError& err );
58 : :
59 : : private:
60 : : ElemSampleQM* mMetric;
61 : : mutable std::vector< size_t > mHandles;
62 : : };
63 : :
64 : : } // namespace MBMesquite
65 : :
66 : : #endif
|