CreatorMap.cc 3.35 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
15
#include "PartitionElementData.h"
#include "DOFMatrix.h"
16
#include "UmfPackSolver.h"
17
#include "time/RosenbrockMethod.h"
18
19
20
21

namespace AMDiS {

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

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

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

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

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

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

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

44
45
46
47
48
49
50
51
52
53
54
55
    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);

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

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

65

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

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

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

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

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

84

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

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

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

97

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

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

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

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

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

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

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

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

    creator = new PartitionElementData::Creator;
    addCreator("PartitionElementData", creator);
126
  }
127

128
129
130
131
132
133
134
135
136

  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);
  }
137
}