From 2ff41ff1f3255272303f4189c0b80c3c7e746b85 Mon Sep 17 00:00:00 2001 From: tomc271 Date: Fri, 7 Jun 2024 12:07:57 +0100 Subject: [PATCH 01/13] Add missing argument in call to writeDefaultOutputFile(). --- examples/conduction-snb/conduction-snb.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/conduction-snb/conduction-snb.cxx b/examples/conduction-snb/conduction-snb.cxx index a5ff7fd804..bc036dede2 100644 --- a/examples/conduction-snb/conduction-snb.cxx +++ b/examples/conduction-snb/conduction-snb.cxx @@ -27,7 +27,7 @@ int main(int argc, char** argv) { Options::root()["Div_Q"] = Div_Q; Options::root()["Div_Q_SH"] = Div_Q_SH; - bout::writeDefaultOutputFile(); + bout::writeDefaultOutputFile(opt); BoutFinalise(); return 0; From e86a7cb09468514cd5fc8df64083505c4504c050 Mon Sep 17 00:00:00 2001 From: tomc271 Date: Fri, 7 Jun 2024 13:07:43 +0100 Subject: [PATCH 02/13] fci-wave example needs to include "bout/parallel_boundary_region.hxx". --- examples/fci-wave/fci-wave.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/fci-wave/fci-wave.cxx b/examples/fci-wave/fci-wave.cxx index 2fd383ed3f..028fe35e8f 100644 --- a/examples/fci-wave/fci-wave.cxx +++ b/examples/fci-wave/fci-wave.cxx @@ -1,4 +1,5 @@ +#include "bout/parallel_boundary_region.hxx" #include "bout/physicsmodel.hxx" class FCIwave : public PhysicsModel { From e4faaa8ffb6ee700330e23fcfeb2584af728e566 Mon Sep 17 00:00:00 2001 From: tomc271 Date: Fri, 7 Jun 2024 13:46:33 +0100 Subject: [PATCH 03/13] Add missing argument in call to writeDefaultOutputFile(). --- examples/laplacexy/laplace_perp/test.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/laplacexy/laplace_perp/test.cxx b/examples/laplacexy/laplace_perp/test.cxx index 7881f4ab82..1312b005da 100644 --- a/examples/laplacexy/laplace_perp/test.cxx +++ b/examples/laplacexy/laplace_perp/test.cxx @@ -65,7 +65,7 @@ int main(int argc, char** argv) { Options::root()["input"] = input; Options::root()["solved"] = solved; - bout::writeDefaultOutputFile(); + bout::writeDefaultOutputFile(Options::root()); BoutFinalise(); return 0; From 55d887c4a648808cd61c6ed5e58144266c679ef8 Mon Sep 17 00:00:00 2001 From: tomc271 Date: Fri, 7 Jun 2024 15:30:49 +0100 Subject: [PATCH 04/13] Remove 'shim' header file - options_netcdf.hxx no longer exists. --- include/options_netcdf.hxx | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 include/options_netcdf.hxx diff --git a/include/options_netcdf.hxx b/include/options_netcdf.hxx deleted file mode 100644 index c0d14c536a..0000000000 --- a/include/options_netcdf.hxx +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once -// BOUT++ header shim -#warning Header "options_netcdf.hxx" has moved to "bout/options_netcdf.hxx". Run `bin/bout-v5-header-upgrader.py` to fix -#include "bout/options_netcdf.hxx" From 926b9b090a6b3714518031f148c22fa5f565224b Mon Sep 17 00:00:00 2001 From: tomc271 Date: Mon, 10 Jun 2024 11:47:44 +0100 Subject: [PATCH 05/13] Use OptionsIOFactory instead of OptionsNetCDF for output_file. --- examples/subsampling/monitor.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/examples/subsampling/monitor.cxx b/examples/subsampling/monitor.cxx index 981ff8b235..6f6d9a0109 100644 --- a/examples/subsampling/monitor.cxx +++ b/examples/subsampling/monitor.cxx @@ -16,10 +16,7 @@ class Monitor1dDump : public Monitor { public: Monitor1dDump(BoutReal timestep, std::string section_name) : Monitor(timestep), - output_file(getCustomOutputName(Options::root()[section_name]), - Options::root()[section_name]["append"].withDefault(false) - ? bout::OptionsNetCDF::FileMode::append - : bout::OptionsNetCDF::FileMode::replace) {} + output_file(bout::OptionsIOFactory::getInstance().createOutput()) {} int call(Solver*, BoutReal _time, int, int) override { // This method writes all the diagnostics to a unique file @@ -31,7 +28,7 @@ class Monitor1dDump : public Monitor { output[item.name].attributes["time_dimension"] = "t"; } } - output_file.write(output); +// output_file.write(output); return 0; } @@ -48,7 +45,7 @@ class Monitor1dDump : public Monitor { private: bout::DataFileFacade dump; - bout::OptionsNetCDF output_file; + std::unique_ptr output_file; }; /// An example of using multiple monitors on different timescales From 9b401b51a7665f6cfd3c08aeae412da74e12074f Mon Sep 17 00:00:00 2001 From: tomc271 Date: Thu, 22 Aug 2024 17:14:02 +0100 Subject: [PATCH 06/13] Fix "Use OptionsIOFactory instead of OptionsNetCDF for output_file". --- examples/subsampling/monitor.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/subsampling/monitor.cxx b/examples/subsampling/monitor.cxx index 6f6d9a0109..917159eb5c 100644 --- a/examples/subsampling/monitor.cxx +++ b/examples/subsampling/monitor.cxx @@ -16,7 +16,9 @@ class Monitor1dDump : public Monitor { public: Monitor1dDump(BoutReal timestep, std::string section_name) : Monitor(timestep), - output_file(bout::OptionsIOFactory::getInstance().createOutput()) {} + output_file(bout::OptionsIO::create( + {{"file", getCustomOutputName(Options::root()[section_name])}, + {"append", Options::root()[section_name]["append"].withDefault(false)}})) {} int call(Solver*, BoutReal _time, int, int) override { // This method writes all the diagnostics to a unique file From 1c5387cee213101f3adaa756bf2c276c2698c2a0 Mon Sep 17 00:00:00 2001 From: tomc271 Date: Mon, 10 Jun 2024 11:47:44 +0100 Subject: [PATCH 07/13] Use reference to Options (not a copy). Required since changes in branch next-options-nocopy. --- examples/dalf3/dalf3.cxx | 4 ++-- examples/laplacexy/alfven-wave/alfven.cxx | 2 +- examples/performance/bracket/bracket.cxx | 2 +- examples/performance/ddx/ddx.cxx | 2 +- examples/performance/ddy/ddy.cxx | 2 +- examples/performance/ddz/ddz.cxx | 2 +- examples/performance/iterator-offsets/iterator-offsets.cxx | 2 +- examples/performance/iterator/iterator.cxx | 2 +- examples/performance/laplace/laplace.cxx | 2 +- .../tuning_regionblocksize/tuning_regionblocksize.cxx | 2 +- manual/sphinx/user_docs/physics_models.rst | 6 +++--- src/bout++.cxx | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/examples/dalf3/dalf3.cxx b/examples/dalf3/dalf3.cxx index acc40aca9b..56df163165 100644 --- a/examples/dalf3/dalf3.cxx +++ b/examples/dalf3/dalf3.cxx @@ -118,8 +118,8 @@ class DALF3 : public PhysicsModel { ////////////////////////////////////////////////////////////// // Options - auto globalOptions = Options::root(); - auto options = globalOptions["dalf3"]; + auto& globalOptions = Options::root(); + auto& options = globalOptions["dalf3"]; split_n0 = options["split_n0"].withDefault(false); estatic = options["estatic"].withDefault(false); diff --git a/examples/laplacexy/alfven-wave/alfven.cxx b/examples/laplacexy/alfven-wave/alfven.cxx index e7a945b3f4..a4248afcf7 100644 --- a/examples/laplacexy/alfven-wave/alfven.cxx +++ b/examples/laplacexy/alfven-wave/alfven.cxx @@ -41,7 +41,7 @@ class Alfven : public PhysicsModel { int init(bool UNUSED(restarting)) { // Normalisation - auto opt = Options::root()["alfven"]; + auto& opt = Options::root()["alfven"]; Tnorm = opt["Tnorm"].withDefault(100); // Reference temperature [eV] Nnorm = opt["Nnorm"].withDefault(1e19); // Reference density [m^-3] Bnorm = opt["Bnorm"].withDefault(1.0); // Reference magnetic field [T] diff --git a/examples/performance/bracket/bracket.cxx b/examples/performance/bracket/bracket.cxx index 1b4efa49aa..53ee66f4e2 100644 --- a/examples/performance/bracket/bracket.cxx +++ b/examples/performance/bracket/bracket.cxx @@ -40,7 +40,7 @@ int main(int argc, char** argv) { std::vector times; // Get options root - auto globalOptions = Options::root(); + auto& globalOptions = Options::root(); auto modelOpts = globalOptions["performance"]; int NUM_LOOPS; NUM_LOOPS = modelOpts["NUM_LOOPS"].withDefault(100); diff --git a/examples/performance/ddx/ddx.cxx b/examples/performance/ddx/ddx.cxx index 3e4a7803f6..8c21aefed9 100644 --- a/examples/performance/ddx/ddx.cxx +++ b/examples/performance/ddx/ddx.cxx @@ -43,7 +43,7 @@ int main(int argc, char** argv) { std::vector times; //Get options root - auto globalOptions = Options::root(); + auto& globalOptions = Options::root(); auto modelOpts = globalOptions["performanceIterator"]; int NUM_LOOPS; NUM_LOOPS = modelOpts["NUM_LOOPS"].withDefault(100); diff --git a/examples/performance/ddy/ddy.cxx b/examples/performance/ddy/ddy.cxx index a11e1d52bc..e3a61ad6e2 100644 --- a/examples/performance/ddy/ddy.cxx +++ b/examples/performance/ddy/ddy.cxx @@ -43,7 +43,7 @@ int main(int argc, char** argv) { std::vector times; //Get options root - auto globalOptions = Options::root(); + auto& globalOptions = Options::root(); auto modelOpts = globalOptions["performanceIterator"]; int NUM_LOOPS; NUM_LOOPS = modelOpts["NUM_LOOPS"].withDefault(100); diff --git a/examples/performance/ddz/ddz.cxx b/examples/performance/ddz/ddz.cxx index 8a7262b1cb..b68690822b 100644 --- a/examples/performance/ddz/ddz.cxx +++ b/examples/performance/ddz/ddz.cxx @@ -43,7 +43,7 @@ int main(int argc, char** argv) { std::vector times; //Get options root - auto globalOptions = Options::root(); + auto& globalOptions = Options::root(); auto modelOpts = globalOptions["performanceIterator"]; int NUM_LOOPS; NUM_LOOPS = modelOpts["NUM_LOOPS"].withDefault(100); diff --git a/examples/performance/iterator-offsets/iterator-offsets.cxx b/examples/performance/iterator-offsets/iterator-offsets.cxx index 2376b63578..4e12b10187 100644 --- a/examples/performance/iterator-offsets/iterator-offsets.cxx +++ b/examples/performance/iterator-offsets/iterator-offsets.cxx @@ -42,7 +42,7 @@ int main(int argc, char** argv) { std::vector times; //Get options root - auto globalOptions = Options::root(); + auto& globalOptions = Options::root(); auto modelOpts = globalOptions["performanceIterator"]; int NUM_LOOPS; NUM_LOOPS = modelOpts["NUM_LOOPS"].withDefault(100); diff --git a/examples/performance/iterator/iterator.cxx b/examples/performance/iterator/iterator.cxx index af1163d927..227c691f45 100644 --- a/examples/performance/iterator/iterator.cxx +++ b/examples/performance/iterator/iterator.cxx @@ -37,7 +37,7 @@ int main(int argc, char** argv) { std::vector times; //Get options root - auto globalOptions = Options::root(); + auto& globalOptions = Options::root(); auto modelOpts = globalOptions["performanceIterator"]; int NUM_LOOPS; NUM_LOOPS = modelOpts["NUM_LOOPS"].withDefault(100); diff --git a/examples/performance/laplace/laplace.cxx b/examples/performance/laplace/laplace.cxx index 1ebbfb7583..01c4d2564e 100644 --- a/examples/performance/laplace/laplace.cxx +++ b/examples/performance/laplace/laplace.cxx @@ -39,7 +39,7 @@ int main(int argc, char** argv) { std::vector times; // Get options root - auto globalOptions = Options::root(); + auto& globalOptions = Options::root(); auto modelOpts = globalOptions["LaplaceTest"]; int NUM_LOOPS = modelOpts["NUM_LOOPS"].withDefault(1000); diff --git a/examples/performance/tuning_regionblocksize/tuning_regionblocksize.cxx b/examples/performance/tuning_regionblocksize/tuning_regionblocksize.cxx index 521ffede74..d47b3737d1 100644 --- a/examples/performance/tuning_regionblocksize/tuning_regionblocksize.cxx +++ b/examples/performance/tuning_regionblocksize/tuning_regionblocksize.cxx @@ -39,7 +39,7 @@ int main(int argc, char** argv) { std::vector times; // Get options root - auto globalOptions = Options::root(); + auto& globalOptions = Options::root(); auto modelOpts = globalOptions["tuningRegionBlockSize"]; const int NUM_LOOPS = modelOpts["NUM_LOOPS"].withDefault(100); const int numSteps = modelOpts["numSteps"].withDefault(16); diff --git a/manual/sphinx/user_docs/physics_models.rst b/manual/sphinx/user_docs/physics_models.rst index 7c8735f636..aae4edbb3d 100644 --- a/manual/sphinx/user_docs/physics_models.rst +++ b/manual/sphinx/user_docs/physics_models.rst @@ -161,7 +161,7 @@ During initialisation (the ``init`` function), the conduction example first reads an option (lines 21 and 24) from the input settings file (``data/BOUT.inp`` by default):: - auto options = Options::root()["conduction"]; + auto& options = Options::root()["conduction"]; OPTION(options, chi, 1.0); @@ -500,8 +500,8 @@ object in the initialisation function:: BoutReal gamma; int init(bool restarting) override { - auto globalOptions = Options::root(); - auto options = globalOptions["mhd"]; + auto& globalOptions = Options::root(); + auto& options = globalOptions["mhd"]; OPTION(options, g, 5.0 / 3.0); ... diff --git a/src/bout++.cxx b/src/bout++.cxx index ff25b1163e..e77592c0c1 100644 --- a/src/bout++.cxx +++ b/src/bout++.cxx @@ -189,7 +189,7 @@ int BoutInitialise(int& argc, char**& argv) { // when checking for unused options. They normally _do_ get used, // but it's possible that only happens in BoutFinalise, which is // too late for that check. - const auto datadir = Options::root()["datadir"].withDefault(DEFAULT_DIR); + const auto& datadir = Options::root()["datadir"].withDefault(DEFAULT_DIR); [[maybe_unused]] const auto optionfile = Options::root()["optionfile"].withDefault(args.opt_file); const auto settingsfile = From eecc8135cf9e4086a3ef5143341aa4410ef51924 Mon Sep 17 00:00:00 2001 From: tomc271 Date: Fri, 23 Aug 2024 15:29:30 +0000 Subject: [PATCH 08/13] Apply clang-format changes --- src/bout++.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bout++.cxx b/src/bout++.cxx index e77592c0c1..489e54faaa 100644 --- a/src/bout++.cxx +++ b/src/bout++.cxx @@ -189,7 +189,8 @@ int BoutInitialise(int& argc, char**& argv) { // when checking for unused options. They normally _do_ get used, // but it's possible that only happens in BoutFinalise, which is // too late for that check. - const auto& datadir = Options::root()["datadir"].withDefault(DEFAULT_DIR); + const auto& datadir = + Options::root()["datadir"].withDefault(DEFAULT_DIR); [[maybe_unused]] const auto optionfile = Options::root()["optionfile"].withDefault(args.opt_file); const auto settingsfile = From d72d11c0bead0ef1e776b3a86894cd09dee4c36d Mon Sep 17 00:00:00 2001 From: tomc271 Date: Mon, 16 Sep 2024 12:16:23 +0100 Subject: [PATCH 09/13] Fix examples/fci-wave (BoundaryRegionPar no longer has public fields x, y, z). --- examples/fci-wave/fci-wave.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/fci-wave/fci-wave.cxx b/examples/fci-wave/fci-wave.cxx index 028fe35e8f..794be1c96f 100644 --- a/examples/fci-wave/fci-wave.cxx +++ b/examples/fci-wave/fci-wave.cxx @@ -32,9 +32,9 @@ class FCIwave : public PhysicsModel { const Field3D& B_next = Bxyz.ynext(reg->dir); for (reg->first(); !reg->isDone(); reg->next()) { - f_B_next(reg->x, reg->y + reg->dir, reg->z) = - f_next(reg->x, reg->y + reg->dir, reg->z) - / B_next(reg->x, reg->y + reg->dir, reg->z); + f_B_next(reg->ind().x(), reg->ind().y() + reg->dir, reg->ind().z()) = + f_next(reg->ind().x(), reg->ind().y() + reg->dir, reg->ind().z()) + / B_next(reg->ind().x(), reg->ind().y() + reg->dir, reg->ind().z()); } } @@ -132,16 +132,16 @@ class FCIwave : public PhysicsModel { // Note: If evolving density, this should interpolate logn // but neumann boundaries are used here anyway. BoutReal n_b = - 0.5 * (n_next(reg->x, reg->y + reg->dir, reg->z) + n(reg->x, reg->y, reg->z)); + 0.5 * (n_next(reg->ind().x(), reg->ind().y() + reg->dir, reg->ind().z()) + n(reg->ind().x(), reg->ind().y(), reg->ind().z())); // Velocity at the boundary BoutReal v_b = - 0.5 * (v_next(reg->x, reg->y + reg->dir, reg->z) + v(reg->x, reg->y, reg->z)); + 0.5 * (v_next(reg->ind().x(), reg->ind().y() + reg->dir, reg->ind().z()) + v(reg->ind().x(), reg->ind().y(), reg->ind().z())); - nv_next(reg->x, reg->y + reg->dir, reg->z) = - 2. * n_b * v_b - nv(reg->x, reg->y, reg->z); + nv_next(reg->ind().x(), reg->ind().y() + reg->dir, reg->ind().z()) = + 2. * n_b * v_b - nv(reg->ind().x(), reg->ind().y(), reg->ind().z()); - momflux_next(reg->x, reg->y + reg->dir, reg->z) = - 2. * n_b * v_b * v_b - momflux(reg->x, reg->y, reg->z); + momflux_next(reg->ind().x(), reg->ind().y() + reg->dir, reg->ind().z()) = + 2. * n_b * v_b * v_b - momflux(reg->ind().x(), reg->ind().y(), reg->ind().z()); } } From bfee7aec453c2998d3976378adf3f5ddba5f59a0 Mon Sep 17 00:00:00 2001 From: tomc271 Date: Mon, 16 Sep 2024 12:23:10 +0100 Subject: [PATCH 10/13] Uncomment output_file->write(output) in examples/subsampling/monitor.cxx --- examples/subsampling/monitor.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/subsampling/monitor.cxx b/examples/subsampling/monitor.cxx index 917159eb5c..788853a595 100644 --- a/examples/subsampling/monitor.cxx +++ b/examples/subsampling/monitor.cxx @@ -30,7 +30,7 @@ class Monitor1dDump : public Monitor { output[item.name].attributes["time_dimension"] = "t"; } } -// output_file.write(output); + output_file->write(output); return 0; } From 8e0d6e6c03c1e92d42dc5908860e1a8b6864d10a Mon Sep 17 00:00:00 2001 From: tomc271 Date: Mon, 16 Sep 2024 12:23:58 +0100 Subject: [PATCH 11/13] Revert change to reference for 'datadir'. --- src/bout++.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bout++.cxx b/src/bout++.cxx index 489e54faaa..ef06f4d3d3 100644 --- a/src/bout++.cxx +++ b/src/bout++.cxx @@ -189,7 +189,7 @@ int BoutInitialise(int& argc, char**& argv) { // when checking for unused options. They normally _do_ get used, // but it's possible that only happens in BoutFinalise, which is // too late for that check. - const auto& datadir = + const auto datadir = Options::root()["datadir"].withDefault(DEFAULT_DIR); [[maybe_unused]] const auto optionfile = Options::root()["optionfile"].withDefault(args.opt_file); From 6120ef28ff27959f361d05e0c589e45d0a78633f Mon Sep 17 00:00:00 2001 From: tomc271 Date: Mon, 16 Sep 2024 12:45:29 +0100 Subject: [PATCH 12/13] Apply clang-format changes --- examples/fci-wave/fci-wave.cxx | 11 ++++++++--- src/bout++.cxx | 3 +-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/examples/fci-wave/fci-wave.cxx b/examples/fci-wave/fci-wave.cxx index 794be1c96f..9f8bb18b8f 100644 --- a/examples/fci-wave/fci-wave.cxx +++ b/examples/fci-wave/fci-wave.cxx @@ -132,16 +132,21 @@ class FCIwave : public PhysicsModel { // Note: If evolving density, this should interpolate logn // but neumann boundaries are used here anyway. BoutReal n_b = - 0.5 * (n_next(reg->ind().x(), reg->ind().y() + reg->dir, reg->ind().z()) + n(reg->ind().x(), reg->ind().y(), reg->ind().z())); + 0.5 + * (n_next(reg->ind().x(), reg->ind().y() + reg->dir, reg->ind().z()) + + n(reg->ind().x(), reg->ind().y(), reg->ind().z())); // Velocity at the boundary BoutReal v_b = - 0.5 * (v_next(reg->ind().x(), reg->ind().y() + reg->dir, reg->ind().z()) + v(reg->ind().x(), reg->ind().y(), reg->ind().z())); + 0.5 + * (v_next(reg->ind().x(), reg->ind().y() + reg->dir, reg->ind().z()) + + v(reg->ind().x(), reg->ind().y(), reg->ind().z())); nv_next(reg->ind().x(), reg->ind().y() + reg->dir, reg->ind().z()) = 2. * n_b * v_b - nv(reg->ind().x(), reg->ind().y(), reg->ind().z()); momflux_next(reg->ind().x(), reg->ind().y() + reg->dir, reg->ind().z()) = - 2. * n_b * v_b * v_b - momflux(reg->ind().x(), reg->ind().y(), reg->ind().z()); + 2. * n_b * v_b * v_b + - momflux(reg->ind().x(), reg->ind().y(), reg->ind().z()); } } diff --git a/src/bout++.cxx b/src/bout++.cxx index ef06f4d3d3..ff25b1163e 100644 --- a/src/bout++.cxx +++ b/src/bout++.cxx @@ -189,8 +189,7 @@ int BoutInitialise(int& argc, char**& argv) { // when checking for unused options. They normally _do_ get used, // but it's possible that only happens in BoutFinalise, which is // too late for that check. - const auto datadir = - Options::root()["datadir"].withDefault(DEFAULT_DIR); + const auto datadir = Options::root()["datadir"].withDefault(DEFAULT_DIR); [[maybe_unused]] const auto optionfile = Options::root()["optionfile"].withDefault(args.opt_file); const auto settingsfile = From e78374bd20199cccdf3b96f71889f99c0b5ce045 Mon Sep 17 00:00:00 2001 From: tomc271 Date: Mon, 16 Sep 2024 14:13:07 +0100 Subject: [PATCH 13/13] Fix "call to deleted constructor of 'Options' [clang-diagnostic-error]" Use reference to Options (not a copy). Required since changes in branch next-options-nocopy. --- examples/performance/bracket/bracket.cxx | 2 +- examples/performance/ddx/ddx.cxx | 2 +- examples/performance/ddy/ddy.cxx | 2 +- examples/performance/ddz/ddz.cxx | 2 +- examples/performance/iterator-offsets/iterator-offsets.cxx | 2 +- examples/performance/iterator/iterator.cxx | 2 +- examples/performance/laplace/laplace.cxx | 2 +- .../tuning_regionblocksize/tuning_regionblocksize.cxx | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/performance/bracket/bracket.cxx b/examples/performance/bracket/bracket.cxx index 53ee66f4e2..50012510ff 100644 --- a/examples/performance/bracket/bracket.cxx +++ b/examples/performance/bracket/bracket.cxx @@ -41,7 +41,7 @@ int main(int argc, char** argv) { // Get options root auto& globalOptions = Options::root(); - auto modelOpts = globalOptions["performance"]; + auto& modelOpts = globalOptions["performance"]; int NUM_LOOPS; NUM_LOOPS = modelOpts["NUM_LOOPS"].withDefault(100); bool profileMode, includeHeader, do2D3D, do3D3D; diff --git a/examples/performance/ddx/ddx.cxx b/examples/performance/ddx/ddx.cxx index 8c21aefed9..b0bad711e6 100644 --- a/examples/performance/ddx/ddx.cxx +++ b/examples/performance/ddx/ddx.cxx @@ -44,7 +44,7 @@ int main(int argc, char** argv) { //Get options root auto& globalOptions = Options::root(); - auto modelOpts = globalOptions["performanceIterator"]; + auto& modelOpts = globalOptions["performanceIterator"]; int NUM_LOOPS; NUM_LOOPS = modelOpts["NUM_LOOPS"].withDefault(100); bool profileMode, includeHeader; diff --git a/examples/performance/ddy/ddy.cxx b/examples/performance/ddy/ddy.cxx index e3a61ad6e2..4c9a336c8c 100644 --- a/examples/performance/ddy/ddy.cxx +++ b/examples/performance/ddy/ddy.cxx @@ -44,7 +44,7 @@ int main(int argc, char** argv) { //Get options root auto& globalOptions = Options::root(); - auto modelOpts = globalOptions["performanceIterator"]; + auto& modelOpts = globalOptions["performanceIterator"]; int NUM_LOOPS; NUM_LOOPS = modelOpts["NUM_LOOPS"].withDefault(100); bool profileMode, includeHeader; diff --git a/examples/performance/ddz/ddz.cxx b/examples/performance/ddz/ddz.cxx index b68690822b..5d3bf2c961 100644 --- a/examples/performance/ddz/ddz.cxx +++ b/examples/performance/ddz/ddz.cxx @@ -44,7 +44,7 @@ int main(int argc, char** argv) { //Get options root auto& globalOptions = Options::root(); - auto modelOpts = globalOptions["performanceIterator"]; + auto& modelOpts = globalOptions["performanceIterator"]; int NUM_LOOPS; NUM_LOOPS = modelOpts["NUM_LOOPS"].withDefault(100); bool profileMode, includeHeader; diff --git a/examples/performance/iterator-offsets/iterator-offsets.cxx b/examples/performance/iterator-offsets/iterator-offsets.cxx index 4e12b10187..455df38ea5 100644 --- a/examples/performance/iterator-offsets/iterator-offsets.cxx +++ b/examples/performance/iterator-offsets/iterator-offsets.cxx @@ -43,7 +43,7 @@ int main(int argc, char** argv) { //Get options root auto& globalOptions = Options::root(); - auto modelOpts = globalOptions["performanceIterator"]; + auto& modelOpts = globalOptions["performanceIterator"]; int NUM_LOOPS; NUM_LOOPS = modelOpts["NUM_LOOPS"].withDefault(100); bool profileMode, includeHeader; diff --git a/examples/performance/iterator/iterator.cxx b/examples/performance/iterator/iterator.cxx index 227c691f45..7a29b00298 100644 --- a/examples/performance/iterator/iterator.cxx +++ b/examples/performance/iterator/iterator.cxx @@ -38,7 +38,7 @@ int main(int argc, char** argv) { //Get options root auto& globalOptions = Options::root(); - auto modelOpts = globalOptions["performanceIterator"]; + auto& modelOpts = globalOptions["performanceIterator"]; int NUM_LOOPS; NUM_LOOPS = modelOpts["NUM_LOOPS"].withDefault(100); bool profileMode, includeHeader; diff --git a/examples/performance/laplace/laplace.cxx b/examples/performance/laplace/laplace.cxx index 01c4d2564e..20da9311ad 100644 --- a/examples/performance/laplace/laplace.cxx +++ b/examples/performance/laplace/laplace.cxx @@ -40,7 +40,7 @@ int main(int argc, char** argv) { // Get options root auto& globalOptions = Options::root(); - auto modelOpts = globalOptions["LaplaceTest"]; + auto& modelOpts = globalOptions["LaplaceTest"]; int NUM_LOOPS = modelOpts["NUM_LOOPS"].withDefault(1000); ConditionalOutput time_output(Output::getInstance()); diff --git a/examples/performance/tuning_regionblocksize/tuning_regionblocksize.cxx b/examples/performance/tuning_regionblocksize/tuning_regionblocksize.cxx index d47b3737d1..cfa7617e64 100644 --- a/examples/performance/tuning_regionblocksize/tuning_regionblocksize.cxx +++ b/examples/performance/tuning_regionblocksize/tuning_regionblocksize.cxx @@ -40,7 +40,7 @@ int main(int argc, char** argv) { // Get options root auto& globalOptions = Options::root(); - auto modelOpts = globalOptions["tuningRegionBlockSize"]; + auto& modelOpts = globalOptions["tuningRegionBlockSize"]; const int NUM_LOOPS = modelOpts["NUM_LOOPS"].withDefault(100); const int numSteps = modelOpts["numSteps"].withDefault(16);