Skip to content
Snippets Groups Projects
Commit 5a2fbdc7 authored by Timo Koch's avatar Timo Koch
Browse files

[test][common] Use Dumux::initialize

parent 735f6e42
No related branches found
No related tags found
1 merge request!2909Feature/multithreaded assembly using a coloring scheme
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <dune/functions/gridfunctions/discreteglobalbasisfunction.hh> #include <dune/functions/gridfunctions/discreteglobalbasisfunction.hh>
#include <dumux/common/parameters.hh> #include <dumux/common/parameters.hh>
#include <dumux/common/initialize.hh>
#include <dumux/common/integrate.hh> #include <dumux/common/integrate.hh>
#include <dumux/multidomain/glue.hh> #include <dumux/multidomain/glue.hh>
#include <dumux/discretization/projection/projector.hh> #include <dumux/discretization/projection/projector.hh>
...@@ -19,8 +20,8 @@ ...@@ -19,8 +20,8 @@
int main (int argc, char *argv[]) int main (int argc, char *argv[])
{ {
// maybe initialize mpi // maybe initialize MPI and/or multithreading backend
Dune::MPIHelper::instance(argc, argv); Dumux::initialize(argc, argv);
// initialize parameters // initialize parameters
Dumux::Parameters::init([](auto& p){ Dumux::Parameters::init([](auto& p){
......
#include <config.h> #include <config.h>
#include <iostream> #include <iostream>
#include <dune/common/parallel/mpihelper.hh>
#include <dune/common/exceptions.hh> #include <dune/common/exceptions.hh>
#include <dumux/common/initialize.hh>
#include <dumux/common/parameters.hh> #include <dumux/common/parameters.hh>
int main (int argc, char *argv[]) int main (int argc, char *argv[])
{ {
using namespace Dumux; using namespace Dumux;
// maybe initialize mpi // maybe initialize MPI and/or multithreading backend
Dune::MPIHelper::instance(argc, argv); initialize(argc, argv);
// initialize parameter tree // initialize parameter tree
Parameters::init(argc, argv, "params.input"); Parameters::init(argc, argv, "params.input");
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <functional> #include <functional>
#include <dune/common/exceptions.hh> #include <dune/common/exceptions.hh>
#include <dune/common/parallel/mpihelper.hh> #include <dumux/common/initialize.hh>
#include <dumux/common/math.hh> #include <dumux/common/math.hh>
#include <dumux/common/cubicspline.hh> #include <dumux/common/cubicspline.hh>
#include <dumux/io/gnuplotinterface.hh> #include <dumux/io/gnuplotinterface.hh>
...@@ -43,7 +43,8 @@ std::vector<double> eval(const Function& f, const std::vector<double>& x) ...@@ -43,7 +43,8 @@ std::vector<double> eval(const Function& f, const std::vector<double>& x)
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
Dune::MPIHelper::instance(argc, argv); // maybe initialize MPI and/or multithreading backend
Dumux::initialize(argc, argv);
// we test the spline interpolation against a sample function // we test the spline interpolation against a sample function
const auto f = [](double x){ return 1.0 / ( 1.0 + x*x ); }; const auto f = [](double x){ return 1.0 / ( 1.0 + x*x ); };
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <functional> #include <functional>
#include <dune/common/exceptions.hh> #include <dune/common/exceptions.hh>
#include <dune/common/parallel/mpihelper.hh> #include <dumux/common/initialize.hh>
#include <dumux/common/math.hh> #include <dumux/common/math.hh>
#include <dumux/common/monotonecubicspline.hh> #include <dumux/common/monotonecubicspline.hh>
#include <dumux/io/gnuplotinterface.hh> #include <dumux/io/gnuplotinterface.hh>
...@@ -43,7 +43,8 @@ std::vector<double> eval(const Function& f, const std::vector<double>& x) ...@@ -43,7 +43,8 @@ std::vector<double> eval(const Function& f, const std::vector<double>& x)
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
Dune::MPIHelper::instance(argc, argv); // maybe initialize MPI and/or multithreading backend
Dumux::initialize(argc, argv);
const auto test = [](auto f, auto df, const auto& testPoints, const auto& samplePoints, const std::string& prefix) const auto test = [](auto f, auto df, const auto& testPoints, const auto& samplePoints, const std::string& prefix)
{ {
......
...@@ -10,11 +10,14 @@ ...@@ -10,11 +10,14 @@
#include <dune/common/parallel/mpihelper.hh> #include <dune/common/parallel/mpihelper.hh>
#include <dune/common/exceptions.hh> #include <dune/common/exceptions.hh>
#include <dumux/common/initialize.hh>
#include <dumux/common/timeloop.hh> #include <dumux/common/timeloop.hh>
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); // maybe initialize MPI and/or multithreading backend
Dumux::initialize(argc, argv);
const auto& mpiHelper = Dune::MPIHelper::instance();
//! Standard time loop //! Standard time loop
double tStart = 0; double tEnd = 1; double dt = 0.1; double tStart = 0; double tEnd = 1; double dt = 0.1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment