AMDiS  0.3
The Adaptive Multi-Dimensional Simulation Toolbox
PreconConfig.hpp
1 #pragma once
2 
3 #include <string>
4 
5 #include <Eigen/IterativeLinearSolvers>
6 
7 #include <amdis/Initfile.hpp>
8 
9 namespace AMDiS
10 {
11  template <class Precon>
12  struct PreconConfig
13  {
14  static void init(std::string const& prefix, Precon& solver) {}
15  };
16 
17  template <class T, class I>
18  struct PreconConfig<Eigen::IncompleteLUT<T,I>>
19  {
20  static void init(std::string const& prefix, Eigen::IncompleteLUT<T,I>& solver)
21  {
22  auto dropTol = Parameters::get<double>(prefix + "->drop tolerance");
23  if (dropTol)
24  solver.setDroptol(dropTol.value());
25 
26  auto fillFactor = Parameters::get<int>(prefix + "->fill factor");
27  if (fillFactor)
28  solver.setFillfactor(fillFactor.value());
29  }
30  };
31 
32 } // end namespace AMDiS
Definition: PreconConfig.hpp:12
Contains all classes needed for solving linear and non linear equation systems.
Definition: AdaptBase.hpp:6
void init(int &argc, char **&argv, std::string const &initFileName="")
Initialized the Environment for MPI.
Definition: AMDiS.hpp:29