Viskores  1.0
MeshQuality.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 // This software is distributed WITHOUT ANY WARRANTY; without even
14 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 // PURPOSE. See the above copyright notice for more information.
16 //
17 // Copyright 2014 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
18 // Copyright 2014 UT-Battelle, LLC.
19 // Copyright 2014 Los Alamos National Security.
20 //
21 // Under the terms of Contract DE-NA0003525 with NTESS,
22 // the U.S. Government retains certain rights in this software.
23 //
24 // Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
25 // Laboratory (LANL), the U.S. Government retains certain rights in
26 // this software.
27 //============================================================================
28 
29 #ifndef viskores_filter_mesh_info_MeshQuality_h
30 #define viskores_filter_mesh_info_MeshQuality_h
31 
32 #include <viskores/filter/Filter.h>
34 
35 #include <viskores/Deprecated.h>
36 
37 namespace viskores
38 {
39 namespace filter
40 {
41 namespace mesh_info
42 {
43 
44 enum struct CellMetric
45 {
47  Area,
53  Condition,
57  Dimension,
59  Jacobian,
61  MaxAngle,
65  MinAngle,
69  Oddy,
75  Shape,
79  Shear,
81  Skew,
83  Stretch,
85  Taper,
87  Volume,
89  Warpage,
90  None
91 };
92 
103 class VISKORES_FILTER_MESH_INFO_EXPORT MeshQuality : public viskores::filter::Filter
104 {
105 public:
106  MeshQuality();
107 
108  VISKORES_DEPRECATED(2.2, "use default constructor and SetMetric().")
110 
112  VISKORES_CONT void SetMetric(CellMetric metric);
114  VISKORES_CONT CellMetric GetMetric() const { return this->MyMetric; }
115 
117  VISKORES_CONT std::string GetMetricName() const;
118 
119 private:
120  VISKORES_CONT viskores::cont::DataSet DoExecute(const viskores::cont::DataSet& input) override;
121 
123 };
124 } // namespace mesh_info
125 } // namespace filter
126 } // namespace viskores
127 
128 #endif // viskores_filter_mesh_info_MeshQuality_h
viskores::filter::mesh_info::CellMetric::Shear
@ Shear
Compute the shear of each cell.
viskores::filter::mesh_info::CellMetric::ShapeAndSize
@ ShapeAndSize
Compute a metric for each cell based on the shape scaled by the cell size.
viskores::cont::DataSet
Contains and manages the geometric data structures that Viskores operates on.
Definition: DataSet.h:66
viskores::filter::mesh_info::CellMetric::RelativeSizeSquared
@ RelativeSizeSquared
Compute for each cell the ratio of area or volume to the mesh average.
viskores::filter::mesh_info::CellMetric::Dimension
@ Dimension
Compute for each cell a metric specifically designed for Sandia's Pronto code.
viskores::filter::mesh_info::CellMetric::Area
@ Area
Compute the area of each cell.
viskores::filter::Filter
Base class for all filters.
Definition: Filter.h:171
viskores::filter::mesh_info::CellMetric::Shape
@ Shape
Compute a shape-based metric for each cell.
viskores::filter::mesh_info::CellMetric::AspectGamma
@ AspectGamma
For each cell, compute the normalized root-mean-square of the edge lengths.
viskores::filter::mesh_info::MeshQuality::GetMetric
CellMetric GetMetric() const
Specify the metric to compute on the mesh.
Definition: MeshQuality.h:114
viskores::filter::mesh_info::CellMetric::AspectRatio
@ AspectRatio
Compute for each cell the ratio of its longest edge to its circumradius.
viskores::filter::mesh_info::CellMetric::MaxDiagonal
@ MaxDiagonal
Computes the maximum diagonal length within each cell in degrees.
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::filter::mesh_info::MeshQuality
Computes the quality of an unstructured cell-based mesh.
Definition: MeshQuality.h:103
viskores::filter::mesh_info::CellMetric::Jacobian
@ Jacobian
Compute for each cell the minimum determinant of the Jacobian matrix, over corners and cell center.
viskores::filter::mesh_info::CellMetric::MinAngle
@ MinAngle
Computes the minimum angle within each cell in degrees.
VISKORES_DEPRECATED
#define VISKORES_DEPRECATED(...)
Definition: Deprecated.h:156
viskores::filter::mesh_info::CellMetric::Stretch
@ Stretch
Compute the stretch of each cell.
viskores::filter::mesh_info::CellMetric::Volume
@ Volume
Compute the volume each cell.
viskores::filter::mesh_info::CellMetric::Oddy
@ Oddy
Compute for each cell the maximum deviation of a metric tensor from an identity matrix,...
viskores::filter::mesh_info::CellMetric::MaxAngle
@ MaxAngle
Computes the maximum angle within each cell in degrees.
Deprecated.h
viskores::filter::mesh_info::CellMetric::ScaledJacobian
@ ScaledJacobian
Compute for each cell a metric derived from the Jacobian matric with normalization involving edge len...
viskores::filter::mesh_info::CellMetric::Skew
@ Skew
Compute the skew of each cell.
viskores::filter::mesh_info::CellMetric::DiagonalRatio
@ DiagonalRatio
Compute for each cell the ratio of the maximum diagonal to the minimum diagonal.
viskores::filter::mesh_info::CellMetric
CellMetric
Definition: MeshQuality.h:44
viskores::filter::mesh_info::CellMetric::Warpage
@ Warpage
Compute the flatness of cells.
viskores::filter::mesh_info::CellMetric::MinDiagonal
@ MinDiagonal
Computes the minimal diagonal length within each cell in degrees.
viskores_filter_mesh_info_export.h
viskores::filter::mesh_info::CellMetric::None
@ None
viskores::filter::mesh_info::CellMetric::Taper
@ Taper
Compute the taper of each cell.
viskores::filter::mesh_info::CellMetric::Condition
@ Condition
Compute for each cell the condition number of the weighted Jacobian matrix.
Filter.h