LinearSolverInterface.inc.hpp 1002 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once

#include <dune/amdis/Initfile.hpp>

namespace AMDiS {

template <class M, class VX, class VB>
LinearSolverInterface<M, VX, VB>::LinearSolverInterface(std::string prefix)
  : prefix(prefix)
{
  // get creator string for solver
  Parameters::get(prefix + "->name", solverName);
  
  // get creator string for preconditioner
  Parameters::get(prefix + "->left precon", preconName);
  if (preconName.empty() || preconName == "no")
    Parameters::get(prefix + "->right precon", preconName);
  if (preconName.empty() || preconName == "no")
    Parameters::get(prefix + "->precon->name", preconName);
      
  Parameters::get(prefix + "->absolute tolerance", aTol);
  Parameters::get(prefix + "->relative tolerance", rTol);
  Parameters::get(prefix + "->max iteration", maxIter);
  Parameters::get(prefix + "->print cycle", printCycle);
  Parameters::get(prefix + "->break if tolerance not reached", breakTolNotReached);
  Parameters::get(prefix + "->info", info);
}


} // end namespace AMDiS