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) kraftche@cae.wisc.edu
24 
25   ***************************************************************** */
26 
27 
28 /** \file VertexQM.hpp
29  *  \brief
30  *  \author Jason Kraftcheck
31  */
32 
33 #ifndef MSQ_VERTEX_QM_HPP
34 #define MSQ_VERTEX_QM_HPP
35 
36 #include "Mesquite.hpp"
37 #include "QualityMetric.hpp"
38 
39 namespace MBMesquite {
40 
41 /**\brief Base type for per-vertex quality metrics */
42 class VertexQM : public QualityMetric
43 {
44 public:
45 
46   MESQUITE_EXPORT virtual ~VertexQM();
47 
get_metric_type() const48   MESQUITE_EXPORT virtual MetricType get_metric_type() const
49     { return VERTEX_BASED; }
50 
51   /**\brief Returns list of vertex indices in PatchData */
52   MESQUITE_EXPORT virtual
53   void get_evaluations( PatchData& pd,
54                         std::vector<size_t>& handles,
55                         bool free_vertices_only,
56                         MsqError& err );
57 
58   MESQUITE_EXPORT static
59   void get_vertex_evaluations( PatchData& pd,
60                                std::vector<size_t>& handles,
61                                bool free_vertices_only,
62                                MsqError& err );
63 
64   MESQUITE_EXPORT static
65   void get_vertex_corner_handles( PatchData& pd, size_t vertex_index,
66                                   std::vector<size_t>& handles_out,
67                                   MsqError& err );
68 };
69 
70 } // namespace MBMesquite
71 
72 #endif
73