Skip to content
Snippets Groups Projects
Commit 68a080bc authored by Jonathan Youett's avatar Jonathan Youett
Browse files

Instantiate MPI in case the build is parallel

parent 42c037ba
Branches
Tags
No related merge requests found
...@@ -45,6 +45,7 @@ using namespace Dune; ...@@ -45,6 +45,7 @@ using namespace Dune;
int main (int argc, char *argv[]) try int main (int argc, char *argv[]) try
{ {
Dune::MPIHelper::instance(argc, argv);
// Some types that I need // Some types that I need
typedef BCRSMatrix<FieldMatrix<double, dim, dim> > MatrixType; typedef BCRSMatrix<FieldMatrix<double, dim, dim> > MatrixType;
typedef BlockVector<FieldVector<double, dim> > VectorType; typedef BlockVector<FieldVector<double, dim> > VectorType;
......
...@@ -45,6 +45,7 @@ using namespace Dune; ...@@ -45,6 +45,7 @@ using namespace Dune;
int main (int argc, char *argv[]) try int main (int argc, char *argv[]) try
{ {
Dune::MPIHelper::instance(argc, argv);
// Some types that I need // Some types that I need
typedef BCRSMatrix<FieldMatrix<double, dim, dim> > OperatorType; typedef BCRSMatrix<FieldMatrix<double, dim, dim> > OperatorType;
typedef BlockVector<FieldVector<double, dim> > VectorType; typedef BlockVector<FieldVector<double, dim> > VectorType;
......
...@@ -36,6 +36,8 @@ const int dim = 3; ...@@ -36,6 +36,8 @@ const int dim = 3;
using namespace Dune; using namespace Dune;
int main (int argc, char *argv[]) try int main (int argc, char *argv[]) try
{ {
Dune::MPIHelper::instance(argc, argv);
using FVector = FieldVector<double, dim>; using FVector = FieldVector<double, dim>;
// Create the grid // Create the grid
......
...@@ -159,6 +159,8 @@ using namespace Dune; ...@@ -159,6 +159,8 @@ using namespace Dune;
int main(int argc, char* argv[]) try { int main(int argc, char* argv[]) try {
Dune::MPIHelper::instance(argc, argv);
// parse eps // parse eps
double eps = 1e-6; double eps = 1e-6;
if (argc == 2) eps = atof(argv[1]); if (argc == 2) eps = atof(argv[1]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment