CreatorMap.cc 3.22 KB
Newer Older
1
2
#include "CreatorMap.h"
#include "OEMSolver.h"
3
4
#include "ITL_Solver.h"
#include "ITL_Preconditioner.h"
5
6
7
8
9
#include "NonLinSolver.h"
#include "MatrixVector.h"
#include "SystemVector.h"
#include "Estimator.h"
#include "RecoveryEstimator.h"
10
#include "ResidualEstimator.h"
11
12
13
#include "LeafData.h"
#include "SurfaceRegion_ED.h"
#include "ElementRegion_ED.h"
14
#include "DOFMatrix.h"
15
#include "UmfPackSolver.h"
16
#include "time/RosenbrockMethod.h"
17
18
19
20

namespace AMDiS {

  template<>
21
  void CreatorMap<OEMSolver>::addDefaultCreators()
22
  {
23
    OEMSolverCreator *creator;
24

Thomas Witkowski's avatar
Thomas Witkowski committed
25
    creator = new CGSolver::Creator;
26
27
    addCreator("cg", creator);

28
29
30
    creator = new CGSSolver::Creator;
    addCreator("cgs", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
31
    creator = new BiCGSolver::Creator;
32
    addCreator("bicg", creator);
33

34
    creator = new BiCGStabSolver::Creator;
35
36
    addCreator("bicgstab", creator);

37
    creator = new BiCGStab2Solver::Creator;
38
39
    addCreator("bicgstab2", creator);

40
    creator = new BiCGStabEllSolver::Creator;
41
    addCreator("bicgstab_ell", creator);
42

43
44
45
46
47
48
49
50
51
52
53
54
    creator = new QMRSolver::Creator;
    addCreator("qmr", creator);

    creator = new TFQMRSolver::Creator;
    addCreator("tfqmr", creator);

    creator = new GMResSolver::Creator;
    addCreator("gmres", creator);

    creator = new IDRsSolver::Creator;
    addCreator("idr_s", creator);

55
56
57
    creator = new MinResSolver::Creator;
    addCreator("minres", creator);

58
#ifdef HAVE_UMFPACK
Thomas Witkowski's avatar
Thomas Witkowski committed
59
    creator = new UmfPackSolver::Creator;
60
    addCreator("umfpack", creator);
61
#endif
62
63
  }

64

65
  template<>
66
  void CreatorMap<ITL_BasePreconditioner>::addDefaultCreators()
67
  {
68
    CreatorInterface<ITL_BasePreconditioner> *creator;
69

Thomas Witkowski's avatar
Thomas Witkowski committed
70
    creator =  new DiagonalPreconditioner::Creator;
71
72
    addCreator("diag", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
73
    creator = new ILUPreconditioner::Creator;
74
75
    addCreator("ilu", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
76
    creator = new ICPreconditioner::Creator;
77
78
    addCreator("ic", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
79
    creator =  new IdentityPreconditioner::Creator;
Thomas Witkowski's avatar
Thomas Witkowski committed
80
81
    addCreator("no", creator);
  }
82

83

84
85
86
87
88
  template<>
  void CreatorMap<Estimator>::addDefaultCreators()
  {
    EstimatorCreator *creator;

Thomas Witkowski's avatar
Thomas Witkowski committed
89
    creator = new ResidualEstimator::Creator;
90
91
    addCreator("residual", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
92
    creator = new RecoveryEstimator::Creator;
93
94
95
    addCreator("recovery", creator);
  }

96

97
98
99
100
101
  template<>
  void CreatorMap<ElementData>::addDefaultCreators()
  {
    CreatorInterface<ElementData> *creator;

Thomas Witkowski's avatar
Thomas Witkowski committed
102
    creator = new LeafDataEstimatable::Creator;
103
104
    addCreator("LeafDataEstimatable", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
105
    creator = new LeafDataEstimatableVec::Creator;
106
107
    addCreator("LeafDataEstimatableVec", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
108
    creator = new LeafDataCoarsenable::Creator;
109
110
    addCreator("LeafDataCoarsenable", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
111
    creator = new LeafDataCoarsenableVec::Creator;
112
113
    addCreator("LeafDataCoarsenableVec", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
114
    creator = new LeafDataPeriodic::Creator;
115
116
    addCreator("LeafDataPeriodic", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
117
    creator = new SurfaceRegion_ED::Creator;
118
119
    addCreator("SurfaceRegion_ED", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
120
    creator = new ElementRegion_ED::Creator;
121
122
    addCreator("ElementRegion_ED", creator);
  }
123

124
125
126
127
128
129
130
131
132

  template<>
  void CreatorMap<RosenbrockMethod>::addDefaultCreators()
  {
    addCreator("ros2", new Ros2::Creator);
    addCreator("rowda3", new Rowda3::Creator);
    addCreator("ros3p", new Ros3p::Creator);
    addCreator("rodasp", new Rodasp::Creator);
  }
133
}