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.
NEM::DRV::BlockMeshMeshGenDriver Class Reference

Detailed Description

Definition at line 39 of file BlockMeshMeshGenDriver.H.

Classes

struct  Opts
 

Public Types

using Files = DriverOutFile
 

Public Member Functions

 BlockMeshMeshGenDriver (Files file, blockMeshParams params)
 
const FilesgetFiles () const
 
void setFiles (Files file)
 
const blockMeshParamsgetParams () const
 
void setParams (blockMeshParams params)
 
void execute () const override
 Run the workflow represented by the driver. More...
 

Static Public Member Functions

static std::unique_ptr< NemDriverreadJSON (const jsoncons::json &inputjson)
 Factory method for all drivers. More...
 

Private Member Functions

 BlockMeshMeshGenDriver ()
 
const OptsgetOpts () const
 
void setOpts (Opts opts)
 

Private Attributes

Files file_
 
Opts opts_
 

Inherits NEM::DRV::MeshGenDriver.

Member Typedef Documentation

◆ Files

Constructor & Destructor Documentation

◆ BlockMeshMeshGenDriver() [1/2]

NEM::DRV::BlockMeshMeshGenDriver::BlockMeshMeshGenDriver ( Files  file,
blockMeshParams  params 
)

Definition at line 41 of file BlockMeshMeshGenDriver.C.

43  : file_(std::move(file)), opts_(std::move(params)) {}

◆ BlockMeshMeshGenDriver() [2/2]

NEM::DRV::BlockMeshMeshGenDriver::BlockMeshMeshGenDriver ( )
private

Member Function Documentation

◆ execute()

void NEM::DRV::BlockMeshMeshGenDriver::execute ( ) const
overridevirtual

Implements NEM::DRV::NemDriver.

Definition at line 72 of file BlockMeshMeshGenDriver.C.

References meshBase::Create(), blockMeshGen::createMeshFromSTL(), meshBase::CreateShared(), file_, mesh, opts_, NEM::DRV::DriverOutFile::outputFile, and NEM::DRV::BlockMeshMeshGenDriver::Opts::params.

72  {
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 }
blockMeshGen <– meshGen <– meshBase This class incorporates mesh generating method of blockMesh uti...
Definition: blockMeshGen.H:54
std::string outputFile
Definition: NemDriver.H:78
static meshBase * Create(const std::string &fname)
Construct vtkMesh from filename.
Definition: meshBase.C:78
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

◆ getFiles()

const BlockMeshMeshGenDriver::Files & NEM::DRV::BlockMeshMeshGenDriver::getFiles ( ) const

Definition at line 48 of file BlockMeshMeshGenDriver.C.

References file_.

48  {
49  return file_;
50 }

◆ getOpts()

const BlockMeshMeshGenDriver::Opts & NEM::DRV::BlockMeshMeshGenDriver::getOpts ( ) const
private

Definition at line 64 of file BlockMeshMeshGenDriver.C.

References opts_.

Referenced by getParams().

64  {
65  return opts_;
66 }

◆ getParams()

const blockMeshParams & NEM::DRV::BlockMeshMeshGenDriver::getParams ( ) const

◆ readJSON()

std::unique_ptr< NemDriver > NEM::DRV::NemDriver::readJSON ( const jsoncons::json &  inputjson)
staticinherited
Parameters
inputjsonjson input with "Program Type" key
Returns
pointer to base NemDriver class

Definition at line 37 of file NemDriver.C.

Referenced by NEM::DRV::MeshGenDriver::MeshGenDriver().

37  {
38  return inputjson.as<std::unique_ptr<NemDriver>>();
39 }

◆ setFiles()

void NEM::DRV::BlockMeshMeshGenDriver::setFiles ( Files  file)

Definition at line 52 of file BlockMeshMeshGenDriver.C.

References file_.

52  {
53  this->file_ = std::move(file);
54 }

◆ setOpts()

void NEM::DRV::BlockMeshMeshGenDriver::setOpts ( Opts  opts)
private

Definition at line 68 of file BlockMeshMeshGenDriver.C.

References opts_.

Referenced by setParams().

68  {
69  this->opts_ = std::move(opts);
70 }

◆ setParams()

void NEM::DRV::BlockMeshMeshGenDriver::setParams ( blockMeshParams  params)

Definition at line 60 of file BlockMeshMeshGenDriver.C.

References setOpts().

60  {
61  setOpts(Opts{std::move(params)});
62 }

Member Data Documentation

◆ file_

Files NEM::DRV::BlockMeshMeshGenDriver::file_
private

Definition at line 66 of file BlockMeshMeshGenDriver.H.

Referenced by execute(), getFiles(), and setFiles().

◆ opts_

Opts NEM::DRV::BlockMeshMeshGenDriver::opts_
private

Definition at line 67 of file BlockMeshMeshGenDriver.H.

Referenced by execute(), getOpts(), and setOpts().


The documentation for this class was generated from the following files: