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

Detailed Description

Definition at line 38 of file SizeFieldRefineDriver.H.

Classes

struct  Opts
 

Public Types

using Files = DriverInOutFiles
 

Public Member Functions

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

 SizeFieldRefineDriver ()
 

Private Attributes

Opts opts_
 

Inherits NEM::DRV::RefineDriver.

Member Typedef Documentation

◆ Files

Definition at line 42 of file RefineDriver.H.

Constructor & Destructor Documentation

◆ SizeFieldRefineDriver() [1/2]

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

Definition at line 53 of file SizeFieldRefineDriver.C.

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

◆ SizeFieldRefineDriver() [2/2]

NEM::DRV::SizeFieldRefineDriver::SizeFieldRefineDriver ( )
private

Definition at line 56 of file SizeFieldRefineDriver.C.

57  : SizeFieldRefineDriver({{}, {}}, {{}, {}, {}, {}, {}}) {}

Member Function Documentation

◆ execute()

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

Implements NEM::DRV::NemDriver.

Definition at line 67 of file SizeFieldRefineDriver.C.

References NEM::DRV::SizeFieldRefineDriver::Opts::arrayName, meshBase::CreateShared(), NEM::DRV::RefineDriver::files_, NEM::DRV::SizeFieldRefineDriver::Opts::getMethodStr(), NEM::DRV::DriverInOutFiles::inputMeshFile, NEM::DRV::SizeFieldRefineDriver::Opts::maxIsMin, mesh, opts_, NEM::DRV::DriverInOutFiles::outputMeshFile, NEM::DRV::SizeFieldRefineDriver::Opts::sizeFactor, NEM::DRV::SizeFieldRefineDriver::Opts::stdDevMult, and NEM::DRV::SizeFieldRefineDriver::Opts::transferData.

67  {
68  std::cout << "Size Factor = " << this->opts_.sizeFactor << std::endl;
69  std::shared_ptr<meshBase> mesh =
71  std::cout << "\n";
72  mesh->report();
73  std::cout << "\n";
74  // Edge scale is unused
75  mesh->refineMesh(this->opts_.getMethodStr(), this->opts_.arrayName,
76  this->opts_.stdDevMult, this->opts_.maxIsMin, {},
78  this->opts_.sizeFactor);
79 }
std::string outputMeshFile
Definition: NemDriver.H:91
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 SizeFieldRefineDriver::Opts & NEM::DRV::SizeFieldRefineDriver::getOpts ( ) const

Definition at line 59 of file SizeFieldRefineDriver.C.

References opts_.

59  {
60  return opts_;
61 }

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

Definition at line 63 of file SizeFieldRefineDriver.C.

References opts_.

63  {
64  this->opts_ = std::move(opts);
65 }

Member Data Documentation

◆ files_

◆ opts_

Opts NEM::DRV::SizeFieldRefineDriver::opts_
private

Definition at line 70 of file SizeFieldRefineDriver.H.

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


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