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.
MeshManipulationFoamParams.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_MESHMANIPULATIONFOAMPARAMS_H_
30 #define NEMOSYS_MESHMANIPULATIONFOAMPARAMS_H_
31 
32 #include "nemosys_export.h"
33 
34 #include <string>
35 #include <vector>
36 
37 /** @brief MeshManipulationFoamParams defines basic parameters needed for
38  * utilities in MeshManipulationFoam class. These parameters are
39  * assigned a value during user input parsing through JSON in
40  * PackMeshDriver.
41  */
42 class NEMOSYS_EXPORT MeshManipulationFoamParams {
43  public:
44  struct NEMOSYS_EXPORT SurfaceLambdaMuSmooth {
45  // --- SurfaceLambdaMuSmooth
46  /** @brief If enabled, allows adding feature file for surfLambdaMuSmooth
47  * (Default is off)
48  */
49  bool addFeatureFile; // Add feature file for smoothing
50 
51  /** @brief Input surface file for surfLambdaMuSmooth utility
52  */
53  std::string slmssurfaceFile; // Defines input surface file
54 
55  /** @brief Output surface file for surfLambdaMuSmooth utility
56  */
57  std::string slmsoutputFile; // Defines output surface file
58 
59  /** @brief Lambda (Range 0....1) for surfLambdaMuSmooth smoothing
60  */
61  double lambda_{1.}; // Lambda (0...1) for smoothing
62 
63  /** @brief Mu (Range 0....1) for surfLambdaMuSmooth smoothing.
64  */
65  double mu{1.}; // Mu (0...1) for smoothing
66 
67  /** @brief Number of smoothing iterations for surfLambdaMuSmooth
68  */
69  int slmsIterations{50}; // Number of smoothing iterations
70  };
71 
72  struct NEMOSYS_EXPORT SplitMeshRegions {
73  // --- splitMeshRegions
74  /** @brief Enables overwriting mesh in splitMshRegions
75  * (Default is on)
76  */
77  bool overwriteMsh{true}; // Enable overwriting mesh
78 
79  /** @brief Enables using of cellZones option in splitMshRegions
80  * (Default is on)
81  */
82  bool cellZones{true}; // Enable cellZones feature
83  };
84 
85  struct NEMOSYS_EXPORT MergeMeshes {
86  // --- mergeMeshes
87  /** @brief Defines master mesh region for mergeMeshes
88  */
89  std::string masterCase; // Defines master mesh region
90 
91  /** @brief Defines total number of domains (meshes) to merge using mergeMeshes
92  */
93  int numDomains; // Defines number of disconnected domains
94 
95  /** @brief Defines name of first mesh region to add to master mesh
96  */
97  std::string addCase; // Defines name of slave region to add
98 
99  /** @brief Enables overwriting merged mesh in mergeMeshes
100  * (Default is on)
101  */
102  bool overwriteMergeMsh{true}; // Enable overwriting mesh
103 
104  /** @brief Specifies directory for master mesh
105  */
106  std::string masterCasePath; // Defines directory of master region
107 
108  /** @brief Specifies directory for mesh to be merge with master mesh
109  */
110  std::string addCasePath; // Defines directory of slave region
111  };
112 
113  struct NEMOSYS_EXPORT CreatePatch {
114  // --- createPatch
115  /** @brief Enables overwrite option for createPatch utility
116  * (Default is on)
117  */
118  bool overwritecpMsh{true}; // Enable overwriting mesh
119 
120  /** @brief Defines surrounding patch name for createPatch utility
121  * (this is specific to "Pack Mesh" workflow)
122  */
123  std::string surroundingName; // Patch name for surrounding
124 
125  /** @brief Defines packs patch name for createPatch utility
126  * (this is specific to "Pack Mesh" workflow)
127  */
128  std::string packsName; // Patch name for packs
129 
130  /** @brief Defines surrounding patch type for createPatch utility
131  * (this is specific to "Pack Mesh" workflow)
132  */
133  std::string srrndngPatchType; // Patch type - surrounding (wall, symm., etc.)
134 
135  /** @brief Defines packs patch type for createPatch utility
136  * (this is specific to "Pack Mesh" workflow)
137  */
138  std::string packsPatchType; // Patch type - packs (wall, symm., etc.)
139 
140  /** @brief Defines surrounding mesh path from main directory
141  */
142  std::string pathSurrounding; // Path for surrounding mesh
143 
144  /** @brief Defines pack mesh path from main directory
145  */
146  std::string pathPacks; // Path for pack mesh
147  };
148 
149  struct NEMOSYS_EXPORT FoamToSurface {
150  // --- foamToSurface
151  /** @brief Output surface file name.extension for foamToSurface utility
152  */
153  std::string outSurfName; // Output surface file name (Accepts path from
154  // current directory)
155  };
156 
157  struct NEMOSYS_EXPORT SurfaceSplitByManifold {
158  // --- surfaceSplitByTopology
159  /** @brief Input surface file for surfSpltByTopology utility
160  */
161  std::string surfFile; // Input surface file
162 
163  /** @brief Output surface file for surfSpltByTopology utility
164  */
165  std::string outSurfFile; // Output surface file
166 
167  /** @brief A vector containing all region names for packs
168  **/
169  std::vector<std::string> pckRegionNames;
170  };
171 
173 
175 
177 
179 
181 
183 };
184 
185 #endif // NEMOSYS_MESHMANIPULATIONFOAMPARAMS_H_
std::string masterCasePath
Specifies directory for master mesh.
int numDomains
Defines total number of domains (meshes) to merge using mergeMeshes.
std::string outSurfFile
Output surface file for surfSpltByTopology utility.
MeshManipulationFoamParams defines basic parameters needed for utilities in MeshManipulationFoam clas...
std::string packsPatchType
Defines packs patch type for createPatch utility (this is specific to "Pack Mesh" workflow) ...
bool addFeatureFile
If enabled, allows adding feature file for surfLambdaMuSmooth (Default is off)
std::vector< std::string > pckRegionNames
A vector containing all region names for packs.
SurfaceLambdaMuSmooth surfLMSmoothParams
std::string addCasePath
Specifies directory for mesh to be merge with master mesh.
std::string slmssurfaceFile
Input surface file for surfLambdaMuSmooth utility.
std::string pathSurrounding
Defines surrounding mesh path from main directory.
SurfaceSplitByManifold surfSplitParams
std::string outSurfName
Output surface file name.extension for foamToSurface utility.
std::string masterCase
Defines master mesh region for mergeMeshes.
std::string srrndngPatchType
Defines surrounding patch type for createPatch utility (this is specific to "Pack Mesh" workflow) ...
std::string pathPacks
Defines pack mesh path from main directory.
std::string addCase
Defines name of first mesh region to add to master mesh.
std::string slmsoutputFile
Output surface file for surfLambdaMuSmooth utility.
std::string packsName
Defines packs patch name for createPatch utility (this is specific to "Pack Mesh" workflow) ...
std::string surroundingName
Defines surrounding patch name for createPatch utility (this is specific to "Pack Mesh" workflow) ...
std::string surfFile
Input surface file for surfSpltByTopology utility.