Loading [MathJax]/extensions/tex2jax.js

dune-composites (unstable)

solver_info.hh
1#ifndef SOLVER_INFO_HH
2#define SOLVER_INFO_HH
3
4namespace Dune{
5 namespace Composites{
6
7 class SolverInfo{
8
9 public:
10 int verb;
11 bool UG;
12 int MaxIt;
13 double KrylovTol;
14 double eigenvalue_threshold;
15 bool widlund_part_unity;
16 int nev;
17 int nev_arpack;
18 double eigen_shift;
19 std::vector<double> times;
20 Dune::InverseOperatorResult results;
21 std::string solver, preconditioner, subdomainSolver, coarseSolver;
22 int overlap;
23 bool coarseSpaceActive;
24
25 SolverInfo(int verb_ = 0): verb(verb_){
26
27 solver = "CG";
28 preconditioner = "GenEO";
29 subdomainSolver = "UMFPack";
30 coarseSolver = "UMFPack";
31 UG = false;
32
33 // Default Solver Options for Domain Decomposition Solver
34 overlap = 2;
35
36 // Default Krylov Solver Options
37 MaxIt = 1000;
38 KrylovTol = 1e-5;
39
40 // Default GenEO Preconditioner Options
41 verb = 10;
42 eigenvalue_threshold = 0.2;
43 widlund_part_unity = true;
44 nev = 10; // Number of eigenvalues used
45 nev_arpack = 10; // Use ArPack's inbuilt error estimator
46 eigen_shift = 0.001;
47
48 }
49
50 void inline setTimes(std::vector<double>& t){
51 times.resize(t.size());
52 t = times;
53 }
54
55 void inline recordResult(Dune::InverseOperatorResult& res){
56 results.clear();
57 results.iterations = res.iterations;
58 results.reduction = res.reduction;
59 results.converged = res.converged;
60 results.conv_rate = res.conv_rate;
61 results.elapsed = res.elapsed;
62 }
63
64 bool inline converged(){return results.converged;}
65 };
66 }
67}
68
69#endif
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Apr 3, 22:46, 2025)