Branch data Line data Source code
1 : : /* *****************************************************************
2 : : MESQUITE -- The Mesh Quality Improvement Toolkit
3 : :
4 : : Copyright 2006 Lawrence Livermore National Laboratory. Under
5 : : the terms of Contract B545069 with the University of Wisconsin --
6 : : Madison, Lawrence Livermore National Laboratory 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 : : (2006) [email protected]
24 : :
25 : : ***************************************************************** */
26 : :
27 : : /** \file ElementQM.hpp
28 : : * \brief
29 : : * \author Jason Kraftcheck
30 : : */
31 : :
32 : : #ifndef MSQ_ELEMENT_QM_HPP
33 : : #define MSQ_ELEMENT_QM_HPP
34 : :
35 : : #include "Mesquite.hpp"
36 : : #include "QualityMetric.hpp"
37 : :
38 : : namespace MBMesquite
39 : : {
40 : :
41 : : /**\brief Base type for per-element quality metrics */
42 : 158 : class ElementQM : public QualityMetric
43 : : {
44 : : public:
45 : : MESQUITE_EXPORT virtual ~ElementQM();
46 : :
47 : 178 : MESQUITE_EXPORT virtual MetricType get_metric_type() const
48 : : {
49 : 178 : return ELEMENT_BASED;
50 : : }
51 : :
52 : : /**\brief Returns list of element indices in PatchData */
53 : : MESQUITE_EXPORT virtual void get_evaluations( PatchData& pd, std::vector< size_t >& handles,
54 : : bool free_vertices_only, MsqError& err );
55 : :
56 : : MESQUITE_EXPORT static void get_element_evaluations( PatchData& pd, std::vector< size_t >& handles,
57 : : bool free_vertices_only, MsqError& err );
58 : :
59 : : /**\brief Default implementation for all element-based metrics
60 : : *
61 : : * Fill 'indices' with all free vertex indices in element,
62 : : * and call 'evaluate'.
63 : : */
64 : : MESQUITE_EXPORT virtual bool evaluate_with_indices( PatchData& pd, size_t handle, double& value,
65 : : std::vector< size_t >& indices, MsqError& err );
66 : : };
67 : :
68 : : } // namespace MBMesquite
69 : :
70 : : #endif
|