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.
BlockMeshMeshGenDriver.C
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 *******************************************************************************/
30 
31 #include "AuxiliaryFunctions.H"
33 #include "Mesh/meshBase.H"
34 
35 namespace NEM {
36 namespace DRV {
37 
39  : params(std::move(params)) {}
40 
43  : file_(std::move(file)), opts_(std::move(params)) {}
44 
46  : BlockMeshMeshGenDriver(Files{{}}, {}) {}
47 
49  return file_;
50 }
51 
53  this->file_ = std::move(file);
54 }
55 
57  return getOpts().params;
58 }
59 
61  setOpts(Opts{std::move(params)});
62 }
63 
65  return opts_;
66 }
67 
69  this->opts_ = std::move(opts);
70 }
71 
73  auto paramsCopy = this->opts_.params;
74  blockMeshGen generator{&paramsCopy};
75  // TODO: Make sure blockMeshGen::createMeshFromSTL sets return value and check
76  // it here
77  // Parameter not used
78  generator.createMeshFromSTL(nullptr);
80  meshBase::Create(generator.getDataSet(), this->file_.outputFile));
81  mesh->report();
82  mesh->write();
83 }
84 
85 } // namespace DRV
86 } // namespace NEM
blockMeshGen <– meshGen <– meshBase This class incorporates mesh generating method of blockMesh uti...
Definition: blockMeshGen.H:54
std::string outputFile
Definition: NemDriver.H:78
STL namespace.
blockMeshParams contains the parameters important for automatic meshing using blockMeshGen class...
static meshBase * Create(const std::string &fname)
Construct vtkMesh from filename.
Definition: meshBase.C:78
void setParams(blockMeshParams params)
const blockMeshParams & getParams() const
std::shared_ptr< meshBase > mesh
static std::shared_ptr< meshBase > CreateShared(const std::string &fname)
Create shared ptr from fname.
Definition: meshBase.C:171
int createMeshFromSTL(const char *fname)
Generates mesh and returns VTK database.
Definition: blockMeshGen.C:98
void execute() const override
Run the workflow represented by the driver.