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.
GmshToExoConversionDriver.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_GMSHTOEXOCONVERSIONDRIVER_H_
30 #define NEMOSYS_GMSHTOEXOCONVERSIONDRIVER_H_
31 
32 #include "nemosys_export.h"
34 
35 namespace NEM {
36 namespace DRV {
37 
38 class NEMOSYS_EXPORT GmshToExoConversionDriver : public ConversionDriver {
39  public:
41 
42  struct NEMOSYS_EXPORT PostProcTask {
43  public:
44  explicit PostProcTask(std::string taskFile);
45  std::string taskFile{};
46  JSONCONS_TYPE_TRAITS_FRIEND
47  private:
48  PostProcTask() = default;
49  };
50 
51  struct NEMOSYS_EXPORT MeshData {
52  public:
53  explicit MeshData(std::string meshFile);
54  std::string meshFileName{};
55  std::string meshName{"default"};
56  bool usePhys{false};
57  bool makeFreeSurfSS{false};
58  bool splitTopBotSS{false};
59  std::vector<std::string> sideSetNames{};
60  std::map<std::string, std::string> elmBlkNames{};
61  jsoncons::optional<std::string> addGlobalNodeSet{};
62  JSONCONS_TYPE_TRAITS_FRIEND
63  private:
64  MeshData() = default;
65  };
66 
67  struct NEMOSYS_EXPORT Opts {
68  public:
69  Opts(int numMeshes, std::vector<MeshData> meshData, bool needsPostProc);
70  int numMeshes{};
71  std::vector<MeshData> meshData{};
72  bool needsPostProc{};
73  int numTasks{0};
74  std::vector<PostProcTask> tasks{};
75  JSONCONS_TYPE_TRAITS_FRIEND
76  private:
77  Opts() = default;
78  static constexpr const char *methodName = "GMSH->EXO";
79  };
80 
82 
83  const Files &getFiles() const;
84  void setFiles(Files file);
85  const Opts &getOpts() const;
86  void setOpts(Opts opts);
87  void execute() const override;
88 
89  JSONCONS_TYPE_TRAITS_FRIEND
90 
91  private:
93 
96 };
97 
98 } // namespace DRV
99 } // namespace NEM
100 
101 #endif // NEMOSYS_GMSHTOEXOCONVERSIONDRIVER_H_