AMDiS.cpp 675 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 const& initFileName)
10
11
  {
    // Maybe initialize MPI
12
    static Dune::MPIHelper& mpiHelper = Dune::MPIHelper::instance(argc, argv);
13

14
15
    Parameters::clearData();

16
    if (initFileName.empty() && argc > 1) {
17
      Parameters::init(argv[1]);
18
    } else if (!initFileName.empty()) {
19
      Parameters::init(initFileName);
20
21
    } else {
      warning("No initfile specified. Using default values for all parameters.");
22
23
    }

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


  void finalize()
  {}

} // end namespace AMDiS