43 std::string finerMesh)
44 : coarseMeshFile(
std::move(coarseMesh)),
45 fineMeshFile(
std::move(fineMesh)),
46 finerMeshFile(
std::move(finerMesh)) {}
49 : arrayIds(
std::move(arrayIds)) {}
62 this->
files_ = std::move(files);
70 this->
opts_ = std::move(opts);
83 omp_set_num_threads(threads);
84 std::cout <<
"Number of threads set to : " << threads << std::endl;
87 std::cerr <<
"OpenMP is not enabled. Verification will continue in serial." 91 std::cout <<
"Running verification." << std::endl;
92 auto oac = std::make_shared<OrderOfAccuracy>(
93 coarseMesh.get(), fineMesh.get(), finerMesh.get(), this->
opts_.
arrayIds,
95 std::cout <<
"Checking if in asymptotic range." << std::endl;
96 std::cout <<
"Target GCI is set to : " << oac->getTargetGCI() << std::endl;
97 auto asymp = oac->checkAsymptoticRange();
99 for (
int i = 0; i < asymp.size(); ++i) {
100 for (
int j = 0; j < asymp[0].size(); ++j) {
101 double gci = asymp[i][j];
102 if (gci > oac->getTargetGCI()) {
103 std::cout <<
"GCI of " << gci;
104 std::cout <<
" exceeds target GCI of " << oac->getTargetGCI()
106 std::cout <<
"at array " << i <<
", component " << j << std::endl;
112 std::cout <<
"Grid is in target asymptotic range." << std::endl;
114 std::cout <<
"Grid is not in target asymptotic range." << std::endl;
void execute() const override
Run the workflow represented by the driver.
jsoncons::string_view getProgramType() const override
const Files & getFiles() const
std::vector< int > arrayIds
field ids for which we will evaluate the grid convergence index (GCI)
void setFiles(Files files)
static constexpr const char * programType
std::string transferType
default is 'Consistent Interpolation', alternatives include 'Conservative Surface Transfer' (if enabl...
This class drives the automatic verification (AV) in Nemosys.
std::string coarseMeshFile
jsoncons::optional< int > numThreads
sets number of threads used in transfer (if OpenMP enabled); if unset and OpenMP enabled, omp_get_max_threads used
static std::shared_ptr< meshBase > CreateShared(const std::string &fname)
Create shared ptr from fname.
double targetGCI
the target GCI value, set to 1.1 by default
std::string finerMeshFile
const Opts & getOpts() const