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

Detailed Description

Definition at line 38 of file Z2RefineDriver.H.

Classes

struct  Opts
 

Public Types

using Files = DriverInOutFiles
 

Public Member Functions

 Z2RefineDriver (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

 Z2RefineDriver ()
 

Private Attributes

Opts opts_
 

Inherits NEM::DRV::RefineDriver.

Member Typedef Documentation

◆ Files

Definition at line 42 of file RefineDriver.H.

Constructor & Destructor Documentation

◆ Z2RefineDriver() [1/2]

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

Definition at line 41 of file Z2RefineDriver.C.

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

◆ Z2RefineDriver() [2/2]

NEM::DRV::Z2RefineDriver::Z2RefineDriver ( )
private

Definition at line 44 of file Z2RefineDriver.C.

44 : Z2RefineDriver({{}, {}}, {{}, {}, {}}) {}

Member Function Documentation

◆ execute()

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

Implements NEM::DRV::NemDriver.

Definition at line 54 of file Z2RefineDriver.C.

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

54  {
55  std::shared_ptr<meshBase> mesh =
57  std::cout << "\n";
58  mesh->report();
59  std::cout << "\n";
60  mesh->refineMesh(Opts::method, this->opts_.arrayName, this->opts_.order,
61  this->files_.outputMeshFile, this->opts_.transferData);
62 }
static constexpr const char * method
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

◆ 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 Z2RefineDriver::Opts & NEM::DRV::Z2RefineDriver::getOpts ( ) const

Definition at line 46 of file Z2RefineDriver.C.

References opts_.

46  {
47  return opts_;
48 }

◆ 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::Z2RefineDriver::setOpts ( Opts  opts)

Definition at line 50 of file Z2RefineDriver.C.

References opts_.

50  {
51  this->opts_ = std::move(opts);
52 }

Member Data Documentation

◆ files_

◆ opts_

Opts NEM::DRV::Z2RefineDriver::opts_
private

Definition at line 62 of file Z2RefineDriver.H.

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


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