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.
meshStitcher.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_MESHSTITCHER_H_
30 #define NEMOSYS_MESHSTITCHER_H_
31 
32 //std
33 #include <vector>
34 #include <string>
35 #include <memory>
36 
37 #include "nemosys_export.h"
38 
39 class cgnsAnalyzer;
40 class rocstarCgns;
41 class meshBase;
42 
43 /* This class stitches together cgns grids and solution data. It exports the
44  stitched mesh with data to VTK data structures. The 1st component of
45  the member partitions, partitions[0], contains the stitched cgns object
46  after instantiation of meshStitcher (when stitching vol/fluid files).
47  cgObj is the stitched mesh when stitching surf/ifluid files */
48 class NEMOSYS_EXPORT meshStitcher {
49  public:
50  // stitch fluid/ifluid files depending on surf flag
51  // surface stitching uses rocstarCgns, while vol uses cgnsAnalyzer
52  meshStitcher(std::vector<std::string> cgFileNames, bool surf);
53 
54  ~meshStitcher() = default;
55 
56  // disabling copy and copy-assignment operators
57  meshStitcher(const meshStitcher &that) = delete;
58  meshStitcher &operator=(const meshStitcher &that) = delete;
59 
60  std::shared_ptr<cgnsAnalyzer> getStitchedCGNS() const;
61  std::shared_ptr<meshBase> getStitchedMB() const;
62 
63  private:
64  // names of cgns files
65  const std::vector<std::string> cgFileNames;
66  // vector of loaded cgns files
67  std::vector<std::shared_ptr<cgnsAnalyzer>> partitions;
68  // stitched mesh in Nemosys format
69  std::shared_ptr<meshBase> stitchedMesh;
70  // stitched mesh in cgns fomrat
71  std::shared_ptr<rocstarCgns> cgObj;
72 
73  private:
74  // initialize series of cgns objects
75  void initSurfCgObj();
76  void initVolCgObj();
77 };
78 
79 #endif // NEMOSYS_MESHSTITCHER_H_
A brief description of meshBase.
Definition: meshBase.H:64
const std::vector< std::string > cgFileNames
Definition: meshStitcher.H:65
std::shared_ptr< rocstarCgns > cgObj
Definition: meshStitcher.H:71
std::shared_ptr< meshBase > stitchedMesh
Definition: meshStitcher.H:69
std::vector< std::shared_ptr< cgnsAnalyzer > > partitions
Definition: meshStitcher.H:67