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::UniformRefineDriver Class Reference

Detailed Description

Definition at line 38 of file UniformRefineDriver.H.

Classes

struct  Opts
 

Public Types

using Files = DriverInOutFiles
 

Public Member Functions

 UniformRefineDriver (Files files, Opts opts)
 
const OptsgetOpts () const
 
void setOpts (Opts opts)
 
void execute () const override
 Run the workflow represented by the driver. More...
 
virtual const FilesgetFiles () const
 
virtual void setFiles (Files files)
 

Static Public Member Functions

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

Protected Attributes

Files files_
 

Private Member Functions

 UniformRefineDriver ()
 

Private Attributes

Opts opts_
 

Inherits NEM::DRV::RefineDriver.

Member Typedef Documentation

◆ Files

Definition at line 42 of file RefineDriver.H.

Constructor & Destructor Documentation

◆ UniformRefineDriver() [1/2]

NEM::DRV::UniformRefineDriver::UniformRefineDriver ( Files  files,
Opts  opts 
)

Definition at line 39 of file UniformRefineDriver.C.

40  : RefineDriver(std::move(files)), opts_(opts) {}
RefineDriver(Files files)
Definition: RefineDriver.C:34

◆ UniformRefineDriver() [2/2]

NEM::DRV::UniformRefineDriver::UniformRefineDriver ( )
private

Definition at line 42 of file UniformRefineDriver.C.

43  : UniformRefineDriver({{}, {}}, {{}, {}}) {}

Member Function Documentation

◆ execute()

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

Implements NEM::DRV::NemDriver.

Definition at line 51 of file UniformRefineDriver.C.

References meshBase::CreateShared(), NEM::DRV::UniformRefineDriver::Opts::edgeScale, NEM::DRV::RefineDriver::files_, NEM::DRV::DriverInOutFiles::inputMeshFile, mesh, NEM::DRV::UniformRefineDriver::Opts::method, and opts_.

51  {
52  std::shared_ptr<meshBase> mesh =
54  std::cout << "\n";
55  mesh->report();
56  std::cout << "\n";
57  mesh->refineMesh(Opts::method, this->opts_.edgeScale,
58  this->files_.outputMeshFile, this->opts_.transferData);
59 }
std::string inputMeshFile
Definition: NemDriver.H:90
std::shared_ptr< meshBase > mesh
static std::shared_ptr< meshBase > CreateShared(const std::string &fname)
Create shared ptr from fname.
Definition: meshBase.C:171
static constexpr const char * method

◆ getFiles()

const RefineDriver::Files & NEM::DRV::RefineDriver::getFiles ( ) const
virtualinherited

Definition at line 40 of file RefineDriver.C.

References NEM::DRV::RefineDriver::files_.

40  {
41  return files_;
42 }

◆ getOpts()

const UniformRefineDriver::Opts & NEM::DRV::UniformRefineDriver::getOpts ( ) const

Definition at line 45 of file UniformRefineDriver.C.

References opts_.

45  {
46  return opts_;
47 }

◆ 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::RefineDriver::setFiles ( Files  files)
virtualinherited

Definition at line 44 of file RefineDriver.C.

References NEM::DRV::RefineDriver::files_.

44  {
45  this->files_ = std::move(files);
46 }

◆ setOpts()

void NEM::DRV::UniformRefineDriver::setOpts ( Opts  opts)

Definition at line 49 of file UniformRefineDriver.C.

References opts_.

49 { this->opts_ = opts; }

Member Data Documentation

◆ files_

◆ opts_

Opts NEM::DRV::UniformRefineDriver::opts_
private

Definition at line 61 of file UniformRefineDriver.H.

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


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