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

Detailed Description

Definition at line 86 of file MeshQualityDriver.H.

Classes

struct  Opts
 

Public Member Functions

 OptimizeMeshQualDriver (std::vector< cfmeshQualityParams > params)
 
const std::vector< cfmeshQualityParams > & getParams () const
 
void setParams (std::vector< cfmeshQualityParams > params)
 
void addParams (cfmeshQualityParams 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

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

Private Attributes

Opts opts_
 

Inherits NEM::DRV::MeshQualityDriver.

Constructor & Destructor Documentation

◆ OptimizeMeshQualDriver() [1/2]

NEM::DRV::OptimizeMeshQualDriver::OptimizeMeshQualDriver ( std::vector< cfmeshQualityParams params)
explicit

Definition at line 69 of file MeshQualityDriver.C.

71  : opts_(std::move(params)) {}

◆ OptimizeMeshQualDriver() [2/2]

NEM::DRV::OptimizeMeshQualDriver::OptimizeMeshQualDriver ( )
private

Definition at line 73 of file MeshQualityDriver.C.

74  : OptimizeMeshQualDriver(std::vector<cfmeshQualityParams>{}) {}

Member Function Documentation

◆ addParams()

void NEM::DRV::OptimizeMeshQualDriver::addParams ( cfmeshQualityParams  params)

Definition at line 85 of file MeshQualityDriver.C.

References opts_, and NEM::DRV::OptimizeMeshQualDriver::Opts::params.

85  {
86  this->opts_.params.emplace_back(std::move(params));
87 }
std::vector< cfmeshQualityParams > params

◆ execute()

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

Implements NEM::DRV::NemDriver.

Definition at line 97 of file MeshQualityDriver.C.

References MeshQuality::cfmOptimize(), opts_, and NEM::DRV::OptimizeMeshQualDriver::Opts::params.

97  {
98  for (const auto &param : this->opts_.params) {
99  MeshQuality mq{&param};
100  mq.cfmOptimize();
101  }
102 }
std::vector< cfmeshQualityParams > params
void cfmOptimize()
Definition: MeshQuality.C:179

◆ getOpts()

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

Definition at line 89 of file MeshQualityDriver.C.

References opts_.

Referenced by getParams().

89  {
90  return opts_;
91 }

◆ getParams()

const std::vector< cfmeshQualityParams > & NEM::DRV::OptimizeMeshQualDriver::getParams ( ) const

Definition at line 76 of file MeshQualityDriver.C.

References getOpts(), and NEM::DRV::OptimizeMeshQualDriver::Opts::params.

77  {
78  return getOpts().params;
79 }
std::vector< cfmeshQualityParams > params

◆ 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 }

◆ setOpts()

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

Definition at line 93 of file MeshQualityDriver.C.

References opts_.

Referenced by setParams().

93  {
94  this->opts_ = std::move(opts);
95 }

◆ setParams()

void NEM::DRV::OptimizeMeshQualDriver::setParams ( std::vector< cfmeshQualityParams params)

Definition at line 81 of file MeshQualityDriver.C.

References setOpts().

81  {
82  setOpts(Opts{std::move(params)});
83 }

Member Data Documentation

◆ opts_

Opts NEM::DRV::OptimizeMeshQualDriver::opts_
private

Definition at line 114 of file MeshQualityDriver.H.

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


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