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.
NucMeshDriver.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_NUCMESHDRIVER_H_
30
#define NEMOSYS_NUCMESHDRIVER_H_
31
32
#include "nemosys_export.h"
33
#include "
Drivers/NemDriver.H
"
34
35
#include <memory>
36
#include <type_traits>
37
#include <utility>
38
#include <vector>
39
40
#include <vtkSmartPointer.h>
41
42
#include "
Services/NucMeshSrv.H
"
43
44
namespace
NEM
{
45
namespace
DRV {
46
47
/**
48
* @brief Class to create 2d geometry from polygons and circles and mesh it.
49
*/
50
class
NEMOSYS_EXPORT
NucMeshDriver
:
public
NemDriver
{
51
public
:
52
using
Files
=
DriverOutFile
;
53
54
using
Opts
=
NEM::SRV::NucMeshConf
;
55
56
/**
57
* NucMeshDriver ctor
58
* @param file Output file. Should end in ".vtu"
59
* @param opts Specify shapes and extrusion.
60
*/
61
explicit
NucMeshDriver
(
Files
file,
Opts
opts);
62
63
/**
64
* Get the output file name
65
* @return output file object containing file name
66
*/
67
const
Files
&getFiles()
const
;
68
/**
69
* Set the output file for the driver
70
* @param files NEM::DRV::NucMeshDriver::Files object containing output file
71
*/
72
void
setFiles(
Files
files);
73
74
/**
75
* Get the options set on a driver object
76
* @return geometry, meshing options, and extrusion steps
77
*/
78
const
Opts
&getOpts()
const
;
79
/**
80
* Set the geometry/mesh and extrusion to execute
81
* @param opts geometry/mesh options
82
*/
83
void
setOpts(
Opts
opts);
84
85
/**
86
* Construct the mesh
87
* @return geoMeshBase with 1d and 2d cells (and 3d if any extrusion)
88
*/
89
vtkSmartPointer<NEM::MSH::geoMeshBase> draw()
const
;
90
91
/**
92
* Construct the mesh and write to file.
93
*/
94
void
execute()
const override
;
95
96
JSONCONS_TYPE_TRAITS_FRIEND
97
98
private
:
99
NucMeshDriver
();
100
Files
file_
;
101
Opts
opts_
;
102
103
static
constexpr
const
char
*
programType
=
"NucMesh Generation"
;
104
jsoncons::string_view getProgramType()
const override
;
105
};
106
107
}
// namespace DRV
108
}
// namespace NEM
109
110
#endif // NEMOSYS_NUCMESHDRIVER_H_
NEM::DRV::NemDriver
base class for drivers
Definition:
NemDriver.H:46
NEM::DRV::DriverOutFile
Definition:
NemDriver.H:74
NEM::DRV::NucMeshDriver::opts_
Opts opts_
Definition:
NucMeshDriver.H:101
NEM
Definition:
AutoVerificationDriver.C:38
NemDriver.H
NEM::SRV::NucMeshConf
Definition:
NucMeshSrv.H:47
NucMeshSrv.H
NEM::DRV::NucMeshDriver::file_
Files file_
Definition:
NucMeshDriver.H:100
NEM::DRV::JSON::programType
static constexpr auto programType
Definition:
DriverJsonTypeTraits.H:84
NEM::DRV::NucMeshDriver
Class to create 2d geometry from polygons and circles and mesh it.
Definition:
NucMeshDriver.H:50
include
Drivers
NucMeshDriver.H
Generated on Wed Jan 26 2022 16:40:01 for NEMoSys by
1.8.13