AMDiS.cpp 607 Bytes
Newer Older
1
2
3
#include "AMDiS.hpp"

// AMDiS includes
4
5
#include <amdis/Initfile.hpp>
#include <amdis/Output.hpp>
6
7
8

namespace AMDiS
{
9
  Dune::MPIHelper& init(int& argc, char**& argv, std::string initFileName)
10
11
  {
    // Maybe initialize MPI
12
    Dune::MPIHelper& mpiHelper = Dune::MPIHelper::instance(argc, argv);
13

14
15
    Parameters::clearData();

16
17
18
    if (initFileName == "") {
      if (argc > 1)
        Parameters::init(argv[1]);
19
      else
20
        error_exit("No init file specified!\n");
21
    } else {
22
23
24
      Parameters::init(initFileName);
    }

25
    return mpiHelper;
26
27
28
29
30
31
32
  }


  void finalize()
  {}

} // end namespace AMDiS