diff --git a/test/freeflow/navierstokes/angeli/main.cc b/test/freeflow/navierstokes/angeli/main.cc index 1911467ee65194bfaafc25d33a8063bfec24b1f9..6fc2168be6f4aa68245b569d1808ac5e0c28051c 100644 --- a/test/freeflow/navierstokes/angeli/main.cc +++ b/test/freeflow/navierstokes/angeli/main.cc @@ -32,6 +32,8 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> + +#include <dumux/common/initialize.hh> #include <dumux/common/dumuxmessage.hh> #include <dumux/common/parameters.hh> #include <dumux/common/properties.hh> @@ -59,9 +61,9 @@ int main(int argc, char** argv) using MomentumTypeTag = Properties::TTag::AngeliTestMomentum; using MassTypeTag = Properties::TTag::AngeliTestMass; - - // initialize MPI, finalize is done automatically on exit - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // maybe initialize MPI and/or multithreading backend + initialize(argc, argv); + const auto& mpiHelper = Dune::MPIHelper::instance(); // print dumux start message if (mpiHelper.rank() == 0) diff --git a/test/freeflow/navierstokes/channel/1d/main.cc b/test/freeflow/navierstokes/channel/1d/main.cc index a6c9d6bd917cad99948a6d4cab0c3249a70a4619..3846f431363496c1b8af658eef803897c1567101 100644 --- a/test/freeflow/navierstokes/channel/1d/main.cc +++ b/test/freeflow/navierstokes/channel/1d/main.cc @@ -29,6 +29,7 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> +#include <dumux/common/initialize.hh> #include <dumux/common/dumuxmessage.hh> #include <dumux/common/parameters.hh> #include <dumux/common/properties.hh> @@ -56,8 +57,9 @@ int main(int argc, char** argv) using MomentumTypeTag = Properties::TTag::NavierStokesAnalyticMomentum; using MassTypeTag = Properties::TTag::NavierStokesAnalyticMass; - // initialize MPI, finalize is done automatically on exit - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // maybe initialize MPI and/or multithreading backend + initialize(argc, argv); + const auto& mpiHelper = Dune::MPIHelper::instance(); // print dumux start message if (mpiHelper.rank() == 0) diff --git a/test/freeflow/navierstokes/channel/2d/main.cc b/test/freeflow/navierstokes/channel/2d/main.cc index bf11543f8f4b896f17b05138f950ceaaaafa44ec..990ff82dfc58453b85ef01123ab9d0512a8eb9a6 100644 --- a/test/freeflow/navierstokes/channel/2d/main.cc +++ b/test/freeflow/navierstokes/channel/2d/main.cc @@ -34,6 +34,7 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> +#include <dumux/common/initialize.hh> #include <dumux/common/dumuxmessage.hh> #include <dumux/common/parameters.hh> #include <dumux/common/properties.hh> @@ -60,8 +61,9 @@ int main(int argc, char** argv) using MomentumTypeTag = Properties::TTag::ChannelTestMomentum; using MassTypeTag = Properties::TTag::ChannelTestMass; - // initialize MPI, finalize is done automatically on exit - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // maybe initialize MPI and/or multithreading backend + initialize(argc, argv); + const auto& mpiHelper = Dune::MPIHelper::instance(); // print dumux start message if (mpiHelper.rank() == 0) diff --git a/test/freeflow/navierstokes/channel/3d/main.cc b/test/freeflow/navierstokes/channel/3d/main.cc index 4a3e6912a1fe19f6a4b254071bd1710b24645301..a01eb6b32212d62dd6580ab1a4811ca29bf75e1c 100644 --- a/test/freeflow/navierstokes/channel/3d/main.cc +++ b/test/freeflow/navierstokes/channel/3d/main.cc @@ -30,6 +30,7 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> +#include <dumux/common/initialize.hh> #include <dumux/common/dumuxmessage.hh> #include <dumux/common/parameters.hh> #include <dumux/common/properties.hh> @@ -56,8 +57,9 @@ int main(int argc, char** argv) using MomentumTypeTag = Properties::TTag::ThreeDChannelTestMomentum; using MassTypeTag = Properties::TTag::ThreeDChannelTestMass; - // initialize MPI, finalize is done automatically on exit - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // maybe initialize MPI and/or multithreading backend + initialize(argc, argv); + const auto& mpiHelper = Dune::MPIHelper::instance(); // print dumux start message if (mpiHelper.rank() == 0) diff --git a/test/freeflow/navierstokes/channel/pipe/main.cc b/test/freeflow/navierstokes/channel/pipe/main.cc index ca190e39c3e552c8492e7eb2fedd6037f5b0e879..5931fd3068b6b4df9a26fd08465784aeb8329c4a 100644 --- a/test/freeflow/navierstokes/channel/pipe/main.cc +++ b/test/freeflow/navierstokes/channel/pipe/main.cc @@ -24,6 +24,7 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/float_cmp.hh> +#include <dumux/common/initialize.hh> #include <dumux/common/properties.hh> #include <dumux/common/parameters.hh> #include <dumux/common/partial.hh> @@ -57,8 +58,9 @@ int main(int argc, char** argv) using MomentumTypeTag = Properties::TTag::PipeFlowMomentum; using MassTypeTag = Properties::TTag::PipeFlowMass; - // initialize MPI, finalize is done automatically on exit - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // maybe initialize MPI and/or multithreading backend + initialize(argc, argv); + const auto& mpiHelper = Dune::MPIHelper::instance(); // parse command line arguments and input file Parameters::init(argc, argv); diff --git a/test/freeflow/navierstokes/donea/main.cc b/test/freeflow/navierstokes/donea/main.cc index 7986ac5af9fe636e2ba6b1690114c82d4b3eb8b7..b73053a1f059c8d0a21d40dda37ccd85c29b384b 100644 --- a/test/freeflow/navierstokes/donea/main.cc +++ b/test/freeflow/navierstokes/donea/main.cc @@ -30,6 +30,7 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> +#include <dumux/common/initialize.hh> #include <dumux/common/dumuxmessage.hh> #include <dumux/common/parameters.hh> #include <dumux/common/properties.hh> @@ -56,8 +57,9 @@ int main(int argc, char** argv) using MomentumTypeTag = Properties::TTag::DoneaTestMomentum; using MassTypeTag = Properties::TTag::DoneaTestMass; - // initialize MPI, finalize is done automatically on exit - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // maybe initialize MPI and/or multithreading backend + initialize(argc, argv); + const auto& mpiHelper = Dune::MPIHelper::instance(); // print dumux start message if (mpiHelper.rank() == 0) diff --git a/test/freeflow/navierstokes/donea/main_momentum.cc b/test/freeflow/navierstokes/donea/main_momentum.cc index c9248abf197f8e894692255268ae49bf1ef5f173..531a4d77b7c7240812ad5743488566d0ffd564e1 100644 --- a/test/freeflow/navierstokes/donea/main_momentum.cc +++ b/test/freeflow/navierstokes/donea/main_momentum.cc @@ -27,6 +27,7 @@ #include <iostream> #include <dune/common/parallel/mpihelper.hh> +#include <dumux/common/initialize.hh> #include <dumux/common/dumuxmessage.hh> #include <dumux/common/parameters.hh> #include <dumux/common/properties.hh> @@ -88,7 +89,9 @@ int main(int argc, char** argv) using TypeTag = Properties::TTag::DoneaTestMomentum; - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // maybe initialize MPI and/or multithreading backend + initialize(argc, argv); + const auto& mpiHelper = Dune::MPIHelper::instance(); if (mpiHelper.rank() == 0) DumuxMessage::print(/*firstCall=*/true); diff --git a/test/freeflow/navierstokes/kovasznay/main.cc b/test/freeflow/navierstokes/kovasznay/main.cc index c8b054a9b24f5eb71dd9053ce6e84d5a46b0e545..bd183065ab9ba5e4c5371a5ec1f6025da5ff21e6 100644 --- a/test/freeflow/navierstokes/kovasznay/main.cc +++ b/test/freeflow/navierstokes/kovasznay/main.cc @@ -34,6 +34,7 @@ #include <dumux/assembly/staggeredfvassembler.hh> #include <dumux/assembly/diffmethod.hh> +#include <dumux/common/initialize.hh> #include <dumux/common/dumuxmessage.hh> #include <dumux/common/parameters.hh> #include <dumux/common/properties.hh> @@ -56,8 +57,9 @@ int main(int argc, char** argv) // define the type tag for this problem using TypeTag = Properties::TTag::KovasznayTest; - // initialize MPI, finalize is done automatically on exit - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // maybe initialize MPI and/or multithreading backend + initialize(argc, argv); + const auto& mpiHelper = Dune::MPIHelper::instance(); // print dumux start message if (mpiHelper.rank() == 0) diff --git a/test/freeflow/navierstokes/periodic/main.cc b/test/freeflow/navierstokes/periodic/main.cc index aa562e9e9bebc63de1f9361dc5994f63c6cab1b3..5d16b04fb694fcbd1f0b3ce55357ad2cb9882159 100644 --- a/test/freeflow/navierstokes/periodic/main.cc +++ b/test/freeflow/navierstokes/periodic/main.cc @@ -30,6 +30,7 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> +#include <dumux/common/initialize.hh> #include <dumux/common/dumuxmessage.hh> #include <dumux/common/parameters.hh> #include <dumux/common/properties.hh> @@ -55,8 +56,9 @@ int main(int argc, char** argv) using MomentumTypeTag = Properties::TTag::PeriodicTestMomentum; using MassTypeTag = Properties::TTag::PeriodicTestMass; - // initialize MPI, finalize is done automatically on exit - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // maybe initialize MPI and/or multithreading backend + initialize(argc, argv); + const auto& mpiHelper = Dune::MPIHelper::instance(); // print dumux start message if (mpiHelper.rank() == 0) diff --git a/test/freeflow/navierstokes/sincos/main.cc b/test/freeflow/navierstokes/sincos/main.cc index 563a6536b7d709506c0d7303d6a91ddec1773b70..199d984b1fc813598868c73e4fd2b40cac2063ec 100644 --- a/test/freeflow/navierstokes/sincos/main.cc +++ b/test/freeflow/navierstokes/sincos/main.cc @@ -33,6 +33,7 @@ #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> +#include <dumux/common/initialize.hh> #include <dumux/common/dumuxmessage.hh> #include <dumux/common/parameters.hh> #include <dumux/common/properties.hh> @@ -86,8 +87,9 @@ int main(int argc, char** argv) using MomentumTypeTag = Properties::TTag::SincosTestMomentum; using MassTypeTag = Properties::TTag::SincosTestMass; - // initialize MPI, finalize is done automatically on exit - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // maybe initialize MPI and/or multithreading backend + initialize(argc, argv); + const auto& mpiHelper = Dune::MPIHelper::instance(); // print dumux start message if (mpiHelper.rank() == 0) diff --git a/test/freeflow/navierstokesnc/channel/main.cc b/test/freeflow/navierstokesnc/channel/main.cc index c09c219c9b800fb8e04ce8f6cee73add9514ef7c..c60a13c491c7030e1c9df3d8883bb432f582dbb6 100644 --- a/test/freeflow/navierstokesnc/channel/main.cc +++ b/test/freeflow/navierstokesnc/channel/main.cc @@ -34,6 +34,7 @@ #include <dumux/assembly/staggeredfvassembler.hh> #include <dumux/assembly/diffmethod.hh> +#include <dumux/common/initialize.hh> #include <dumux/common/dumuxmessage.hh> #include <dumux/common/parameters.hh> #include <dumux/common/properties.hh> @@ -51,8 +52,9 @@ int main(int argc, char** argv) // define the type tag for this problem using TypeTag = Properties::TTag::ChannelNCTest; - // initialize MPI, finalize is done automatically on exit - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // maybe initialize MPI and/or multithreading backend + initialize(argc, argv); + const auto& mpiHelper = Dune::MPIHelper::instance(); // print dumux start message if (mpiHelper.rank() == 0) diff --git a/test/freeflow/navierstokesnc/densitydrivenflow/main.cc b/test/freeflow/navierstokesnc/densitydrivenflow/main.cc index b67b928577ad5de1431fe344a7bbe3a06f083363..73b5156314c48ccc574f5cfbac541b63a6940148 100644 --- a/test/freeflow/navierstokesnc/densitydrivenflow/main.cc +++ b/test/freeflow/navierstokesnc/densitydrivenflow/main.cc @@ -34,6 +34,7 @@ #include <dumux/assembly/staggeredfvassembler.hh> #include <dumux/assembly/diffmethod.hh> +#include <dumux/common/initialize.hh> #include <dumux/common/dumuxmessage.hh> #include <dumux/common/parameters.hh> #include <dumux/common/properties.hh> @@ -51,8 +52,9 @@ int main(int argc, char** argv) // define the type tag for this problem using TypeTag = Properties::TTag::DensityDrivenFlow; - // initialize MPI, finalize is done automatically on exit - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // maybe initialize MPI and/or multithreading backend + initialize(argc, argv); + const auto& mpiHelper = Dune::MPIHelper::instance(); // print dumux start message if (mpiHelper.rank() == 0) diff --git a/test/freeflow/navierstokesnc/maxwellstefan/main.cc b/test/freeflow/navierstokesnc/maxwellstefan/main.cc index 85c094f25abe4981e8db61e560b8eaf0fa255957..ab4d6a53f9cc35a214109de96ad65f19df3ccdf9 100644 --- a/test/freeflow/navierstokesnc/maxwellstefan/main.cc +++ b/test/freeflow/navierstokesnc/maxwellstefan/main.cc @@ -34,6 +34,7 @@ #include <dumux/assembly/staggeredfvassembler.hh> #include <dumux/assembly/diffmethod.hh> +#include <dumux/common/initialize.hh> #include <dumux/common/dumuxmessage.hh> #include <dumux/common/parameters.hh> #include <dumux/common/properties.hh> @@ -51,8 +52,9 @@ int main(int argc, char** argv) // define the type tag for this problem using TypeTag = Properties::TTag::MaxwellStefanNCTest; - // initialize MPI, finalize is done automatically on exit - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // maybe initialize MPI and/or multithreading backend + initialize(argc, argv); + const auto& mpiHelper = Dune::MPIHelper::instance(); // print dumux start message if (mpiHelper.rank() == 0) diff --git a/test/freeflow/rans/main.cc b/test/freeflow/rans/main.cc index 39e2a52fa781efcef1cfd9b0185e21f19dbf5803..9db95a1dbc64d5825a078d704268a02851851be0 100644 --- a/test/freeflow/rans/main.cc +++ b/test/freeflow/rans/main.cc @@ -36,6 +36,7 @@ #include <dumux/assembly/staggeredfvassembler.hh> #include <dumux/assembly/diffmethod.hh> +#include <dumux/common/initialize.hh> #include <dumux/common/dumuxmessage.hh> #include <dumux/common/parameters.hh> #include <dumux/common/properties.hh> @@ -75,8 +76,9 @@ int main(int argc, char** argv) // define the type tag for this problem using TypeTag = Properties::TTag::TYPETAG; - // initialize MPI, finalize is done automatically on exit - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // maybe initialize MPI and/or multithreading backend + initialize(argc, argv); + const auto& mpiHelper = Dune::MPIHelper::instance(); // print dumux start message if (mpiHelper.rank() == 0) diff --git a/test/freeflow/ransnc/main.cc b/test/freeflow/ransnc/main.cc index 518732f24bd3e25bcf2f224e9e7b563fc2dd0b7f..130f2b7db37acaf9ecd3c43bd3e9467137d54a5b 100644 --- a/test/freeflow/ransnc/main.cc +++ b/test/freeflow/ransnc/main.cc @@ -34,6 +34,7 @@ #include <dumux/assembly/staggeredfvassembler.hh> #include <dumux/assembly/diffmethod.hh> +#include <dumux/common/initialize.hh> #include <dumux/common/dumuxmessage.hh> #include <dumux/common/parameters.hh> #include <dumux/common/properties.hh> @@ -73,8 +74,9 @@ int main(int argc, char** argv) // define the type tag for this problem using TypeTag = Properties::TTag::TYPETAG; - // initialize MPI, finalize is done automatically on exit - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // maybe initialize MPI and/or multithreading backend + initialize(argc, argv); + const auto& mpiHelper = Dune::MPIHelper::instance(); // print dumux start message if (mpiHelper.rank() == 0) diff --git a/test/freeflow/shallowwater/bowl/main.cc b/test/freeflow/shallowwater/bowl/main.cc index 205b955904654e16c091caaec4b75d5df69c0639..8e86b6819048f2cb6125e3643afe54d87b7762e1 100644 --- a/test/freeflow/shallowwater/bowl/main.cc +++ b/test/freeflow/shallowwater/bowl/main.cc @@ -31,6 +31,7 @@ #include <dune/grid/io/file/vtk.hh> #include <dumux/io/vtkoutputmodule.hh> +#include <dumux/common/initialize.hh> #include <dumux/common/properties.hh> #include <dumux/common/parameters.hh> #include <dumux/common/dumuxmessage.hh> @@ -130,8 +131,9 @@ int main(int argc, char** argv) // define the type tag for this problem using TypeTag = Properties::TTag::Bowl; - // initialize MPI, finalize is done automatically on exit - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // maybe initialize MPI and/or multithreading backend + initialize(argc, argv); + const auto& mpiHelper = Dune::MPIHelper::instance(); // print dumux start message if (mpiHelper.rank() == 0) diff --git a/test/freeflow/shallowwater/dambreak/main.cc b/test/freeflow/shallowwater/dambreak/main.cc index 3d9aa15439d37bf62db4a2c30c0b6e9e345c40ba..e875a5ccb8133062bbb20ca8c76827b8b50b9137 100644 --- a/test/freeflow/shallowwater/dambreak/main.cc +++ b/test/freeflow/shallowwater/dambreak/main.cc @@ -30,10 +30,9 @@ #include <dune/common/version.hh> #include <dune/common/parallel/mpihelper.hh> #include <dune/common/timer.hh> -#include <dune/grid/io/file/vtk.hh> #include <dumux/io/vtkoutputmodule.hh> -#include <dune/istl/io.hh> +#include <dumux/common/initialize.hh> #include <dumux/common/properties.hh> #include <dumux/common/parameters.hh> #include <dumux/common/dumuxmessage.hh> @@ -64,8 +63,9 @@ int main(int argc, char** argv) // define the type tag for this problem using TypeTag = Properties::TTag::DamBreakWet; - // initialize MPI, finalize is done automatically on exit - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // maybe initialize MPI and/or multithreading backend + initialize(argc, argv); + const auto& mpiHelper = Dune::MPIHelper::instance(); // print dumux start message if (mpiHelper.rank() == 0) diff --git a/test/freeflow/shallowwater/poiseuilleflow/main.cc b/test/freeflow/shallowwater/poiseuilleflow/main.cc index 8d31944398240cff2e6c1c99ec6356c3a46262db..33c3d9154e400a645f8e87984f4eab76ae0eef9d 100644 --- a/test/freeflow/shallowwater/poiseuilleflow/main.cc +++ b/test/freeflow/shallowwater/poiseuilleflow/main.cc @@ -22,6 +22,7 @@ #include <dune/common/parallel/mpihelper.hh> +#include <dumux/common/initialize.hh> #include <dumux/common/properties.hh> #include <dumux/common/parameters.hh> #include <dumux/common/dumuxmessage.hh> @@ -42,7 +43,9 @@ int main(int argc, char** argv) { using namespace Dumux; - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // maybe initialize MPI and/or multithreading backend + initialize(argc, argv); + const auto& mpiHelper = Dune::MPIHelper::instance(); // parse command line arguments and input file Parameters::init(argc, argv); diff --git a/test/freeflow/shallowwater/roughchannel/main.cc b/test/freeflow/shallowwater/roughchannel/main.cc index a1c1201043ce336e3c33acf644b6967570a7d80c..37259eddcdc67a196c61de379dab6703bf317b12 100644 --- a/test/freeflow/shallowwater/roughchannel/main.cc +++ b/test/freeflow/shallowwater/roughchannel/main.cc @@ -31,6 +31,7 @@ #include <dune/grid/io/file/vtk.hh> #include <dumux/io/vtkoutputmodule.hh> +#include <dumux/common/initialize.hh> #include <dumux/common/properties.hh> #include <dumux/common/parameters.hh> #include <dumux/common/dumuxmessage.hh> @@ -54,8 +55,9 @@ int main(int argc, char** argv) // define the type tag for this problem using TypeTag = Properties::TTag::RoughChannel; - // initialize MPI, finalize is done automatically on exit - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // maybe initialize MPI and/or multithreading backend + initialize(argc, argv); + const auto& mpiHelper = Dune::MPIHelper::instance(); // print dumux start message if (mpiHelper.rank() == 0)