VTK-m  2.2
MeshQuality.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 // This software is distributed WITHOUT ANY WARRANTY; without even
6 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
7 // PURPOSE. See the above copyright notice for more information.
8 //
9 // Copyright 2014 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
10 // Copyright 2014 UT-Battelle, LLC.
11 // Copyright 2014 Los Alamos National Security.
12 //
13 // Under the terms of Contract DE-NA0003525 with NTESS,
14 // the U.S. Government retains certain rights in this software.
15 //
16 // Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
17 // Laboratory (LANL), the U.S. Government retains certain rights in
18 // this software.
19 //============================================================================
20 
21 #ifndef vtk_m_filter_mesh_info_MeshQuality_h
22 #define vtk_m_filter_mesh_info_MeshQuality_h
23 
24 #include <vtkm/filter/Filter.h>
26 
27 #include <vtkm/Deprecated.h>
28 
29 namespace vtkm
30 {
31 namespace filter
32 {
33 namespace mesh_info
34 {
35 
36 enum struct CellMetric
37 {
39  Area,
45  Condition,
49  Dimension,
51  Jacobian,
53  MaxAngle,
57  MinAngle,
61  Oddy,
67  Shape,
71  Shear,
73  Skew,
75  Stretch,
77  Taper,
79  Volume,
81  Warpage,
82  None
83 };
84 
96 {
97 public:
98  MeshQuality();
99 
100  VTKM_DEPRECATED(2.2, "use default constructor and SetMetric().")
101  VTKM_CONT explicit MeshQuality(CellMetric);
102 
104  VTKM_CONT void SetMetric(CellMetric metric);
106  VTKM_CONT CellMetric GetMetric() const { return this->MyMetric; }
107 
109  VTKM_CONT std::string GetMetricName() const;
110 
111 private:
112  VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
113 
115 };
116 } // namespace mesh_info
117 } // namespace filter
118 } // namespace vtkm
119 
120 #endif // vtk_m_filter_mesh_info_MeshQuality_h
vtkm::filter::mesh_info::CellMetric::DiagonalRatio
@ DiagonalRatio
Compute for each cell the ratio of the maximum diagonal to the minimum diagonal.
vtkm::filter::mesh_info::CellMetric::MaxAngle
@ MaxAngle
Computes the maximum angle within each cell in degrees.
vtkm::filter::mesh_info::CellMetric::Dimension
@ Dimension
Compute for each cell a metric specifically designed for Sandia's Pronto code.
vtkm::filter::mesh_info::CellMetric::None
@ None
vtkm::filter::mesh_info::CellMetric::Taper
@ Taper
Compute the taper of each cell.
vtkm::filter::mesh_info::CellMetric::MaxDiagonal
@ MaxDiagonal
Computes the maximum diagonal length within each cell in degrees.
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::mesh_info::CellMetric::MinDiagonal
@ MinDiagonal
Computes the minimal diagonal length within each cell in degrees.
VTKM_FILTER_MESH_INFO_EXPORT
#define VTKM_FILTER_MESH_INFO_EXPORT
Definition: vtkm_filter_mesh_info_export.h:44
vtkm::filter::mesh_info::CellMetric::Shear
@ Shear
Compute the shear of each cell.
vtkm::filter::mesh_info::CellMetric
CellMetric
Definition: MeshQuality.h:36
vtkm::cont::DataSet
Contains and manages the geometric data structures that VTK-m operates on.
Definition: DataSet.h:57
vtkm::filter::mesh_info::CellMetric::Oddy
@ Oddy
Compute for each cell the maximum deviation of a metric tensor from an identity matrix,...
vtkm::filter::mesh_info::CellMetric::RelativeSizeSquared
@ RelativeSizeSquared
Compute for each cell the ratio of area or volume to the mesh average.
vtkm::filter::mesh_info::CellMetric::Jacobian
@ Jacobian
Compute for each cell the minimum determinant of the Jacobian matrix, over corners and cell center.
vtkm::filter::mesh_info::MeshQuality
Computes the quality of an unstructured cell-based mesh.
Definition: MeshQuality.h:95
vtkm::filter::mesh_info::CellMetric::ShapeAndSize
@ ShapeAndSize
Compute a metric for each cell based on the shape scaled by the cell size.
vtkm::filter::mesh_info::CellMetric::Area
@ Area
Compute the area of each cell.
vtkm::filter::mesh_info::CellMetric::Shape
@ Shape
Compute a shape-based metric for each cell.
vtkm::filter::Filter
Base class for all filters.
Definition: Filter.h:163
vtkm::filter::mesh_info::CellMetric::Skew
@ Skew
Compute the skew of each cell.
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::filter::mesh_info::CellMetric::Warpage
@ Warpage
Compute the flatness of cells.
vtkm::filter::mesh_info::CellMetric::Condition
@ Condition
Compute for each cell the condition number of the weighted Jacobian matrix.
vtkm::filter::mesh_info::MeshQuality::GetMetric
CellMetric GetMetric() const
Specify the metric to compute on the mesh.
Definition: MeshQuality.h:106
vtkm::filter::mesh_info::CellMetric::ScaledJacobian
@ ScaledJacobian
Compute for each cell a metric derived from the Jacobian matric with normalization involving edge len...
vtkm::filter::mesh_info::CellMetric::Volume
@ Volume
Compute the volume each cell.
vtkm::filter::mesh_info::CellMetric::AspectRatio
@ AspectRatio
Compute for each cell the ratio of its longest edge to its circumradius.
vtkm::filter::mesh_info::CellMetric::Stretch
@ Stretch
Compute the stretch of each cell.
Deprecated.h
vtkm::filter::mesh_info::CellMetric::AspectGamma
@ AspectGamma
For each cell, compute the normalized root-mean-square of the edge lengths.
vtkm_filter_mesh_info_export.h
VTKM_DEPRECATED
#define VTKM_DEPRECATED(...)
Definition: Deprecated.h:145
vtkm::filter::mesh_info::CellMetric::MinAngle
@ MinAngle
Computes the minimum angle within each cell in degrees.
Filter.h