NEMoSys  0.63.0
A modular, extensible resource with robust automated mesh generation, mesh quality analysis, adaptive mesh refinement, and data transfer between arbitrary meshes.
MeshQuality.H
Go to the documentation of this file.
1 /*******************************************************************************
2 * Promesh *
3 * Copyright (C) 2022, IllinoisRocstar LLC. All rights reserved. *
4 * *
5 * Promesh is the property of IllinoisRocstar LLC. *
6 * *
7 * IllinoisRocstar LLC *
8 * Champaign, IL *
9 * www.illinoisrocstar.com *
10 * promesh@illinoisrocstar.com *
11 *******************************************************************************/
12 /*******************************************************************************
13 * This file is part of Promesh *
14 * *
15 * This version of Promesh is free software: you can redistribute it and/or *
16 * modify it under the terms of the GNU Lesser General Public License as *
17 * published by the Free Software Foundation, either version 3 of the License, *
18 * or (at your option) any later version. *
19 * *
20 * Promesh is distributed in the hope that it will be useful, but WITHOUT ANY *
21 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS *
22 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more *
23 * details. *
24 * *
25 * You should have received a copy of the GNU Lesser General Public License *
26 * along with this program. If not, see <https://www.gnu.org/licenses/>. *
27 * *
28 *******************************************************************************/
29 #ifndef NEMOSYS_MESHQUALITY_H_
30 #define NEMOSYS_MESHQUALITY_H_
31 
32 #include "nemosys_export.h"
33 
34 #include <ostream>
35 #include <string>
36 
37 #include <vtkDoubleArray.h>
38 #include <vtkMeshQuality.h>
39 #include <vtkSmartPointer.h>
40 #ifdef HAVE_CFMSH
42 #endif
43 
44 #include "Mesh/meshBase.H"
45 
46 class NEMOSYS_EXPORT MeshQuality {
47  public:
48  MeshQuality() = default;
49  explicit MeshQuality(const meshBase *_mesh);
50 #ifdef HAVE_CFMSH
51  explicit MeshQuality(const cfmeshQualityParams *params) { _cfmQPrms = params; }
52 #endif
53  ~MeshQuality();
54 
55  // disable copy and copy-assignment constructors
56  MeshQuality(const MeshQuality &that) = delete;
57  MeshQuality &operator=(const MeshQuality &that) = delete;
58 
59  public:
60  void checkMesh(std::ostream &outputStream);
61  void checkMesh();
62  void checkMesh(const std::string &fname);
63  vtkSmartPointer<vtkDoubleArray> getStats(int n);
64 
65  public:
66  void cfmOptimize();
67 
68  private:
69  const meshBase *mesh;
70  vtkSmartPointer<vtkMeshQuality> qualityFilter;
71 #ifdef HAVE_CFMSH
73 #endif
74 };
75 
76 #endif // NEMOSYS_MESHQUALITY_H_
const cfmeshQualityParams * _cfmQPrms
Definition: MeshQuality.H:72
A brief description of meshBase.
Definition: meshBase.H:64
MeshQuality(const cfmeshQualityParams *params)
Definition: MeshQuality.H:51
vtkSmartPointer< vtkMeshQuality > qualityFilter
Definition: MeshQuality.H:70
const meshBase * mesh
Definition: MeshQuality.H:69