AMDiS 2.10
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
9namespace AMDiS
10{
11 template <class Precon>
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:13