CreatorMap.cc 6.47 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "CreatorMap.h"
#include "OEMSolver.h"
#include "Preconditioner.h"
#include "DiagonalPreconditioner.h"
#include "ILUPreconditioner.h"
#include "ILUTPreconditioner.h"
#include "NonLinSolver.h"
#include "MatrixVector.h"
#include "SystemVector.h"
#include "Estimator.h"
#include "RecoveryEstimator.h"
#include "LeafData.h"
#include "SurfaceRegion_ED.h"
#include "MultiGridWrapper.h"
#include "DOFMatrix.h"
#include "SparseVector.h"
#include "GSSmoother.h"
#include "JacobiSmoother.h"
#include "ElementRegion_ED.h"
#include "BiCGStab.h"
#include "BiCGStab2.h"
22
#include "BFGS_Precond.h"
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include "BoxSmoother.h"
#include "MultiGridPreconWrapper.h"
#include "GMResSolver2.h"
#include "TFQMR.h"
#include "VecSymSolver.h"
#include "UmfPackSolver.h"

namespace AMDiS {

  template<>
  void CreatorMap<OEMSolver<DOFVector<double> > >::addDefaultCreators()
  {
    OEMSolverCreator<DOFVector<double> > *creator;

    creator = NEW BiCGSolver<DOFVector<double> >::Creator;
    addCreator("bicgstab_albert", creator);

    creator = NEW CGSolver<DOFVector<double> >::Creator;
    addCreator("cg", creator);

    creator = NEW GMResSolver<DOFVector<double> >::Creator;
    addCreator("gmres", creator);

    creator = NEW ODirSolver<DOFVector<double> >::Creator;
    addCreator("odir", creator);

    creator = NEW OResSolver<DOFVector<double> >::Creator;
    addCreator("ores", creator);  

    creator = NEW BiCGStab<DOFVector<double> >::Creator;
    addCreator("bicgstab", creator);

    creator = NEW MultiGridWrapperScal::Creator;
    addCreator("mg", creator);

    creator = NEW BiCGStab2<DOFVector<double> >::Creator;
    addCreator("bicgstab2", creator);

    //        creator = NEW GMResSolver2<DOFVector<double> >::Creator;
62
    //        addCreator("gmres2", creator);
63
64
65
66
67

    creator = NEW TFQMR<DOFVector<double> >::Creator;
    addCreator("tfqmr", creator);
  }

68

69
70
71
72
73
74
75
76
77
78
79
80
81
82
  template<>
  void CreatorMap<SmootherBase<DOFMatrix, 
			       SparseVector<double>,
			       ::std::set<DegreeOfFreedom> > >::addDefaultCreators()
  {
    SmootherCreator<DOFMatrix, SparseVector<double>, ::std::set<DegreeOfFreedom> > *creator;

    creator = NEW GSSmoother<DOFMatrix, SparseVector<double>, ::std::set<DegreeOfFreedom> >::Creator;
    addCreator("gs", creator);

    creator = NEW JacobiSmoother<DOFMatrix, SparseVector<double>, ::std::set<DegreeOfFreedom> >::Creator;
    addCreator("j", creator);
  }

83

84
85
86
87
88
89
90
91
92
93
94
95
96
  template<>
  void CreatorMap<PreconditionerScal>::addDefaultCreators()
  {
    CreatorInterface<PreconditionerScal> *creator;

    creator =  NEW DiagonalPreconditioner::Creator;
    addCreator("diag", creator);

    creator = NEW ILUPreconditioner::Creator;
    addCreator("ilu", creator);

    creator = NEW ILUTPreconditioner::Creator;
    addCreator("ilut", creator);
97
98
99

    creator = NEW BFGS_Precond::Creator;
    addCreator("bfgs", creator);
100
101
102
103
104

    creator =  NEW MGPreconWrapperScal::Creator;
    addCreator("mg", creator);
  }

105

106
107
108
109
110
111
112
113
114
115
116
117
  template<>
  void CreatorMap<NonLinSolver<DOFVector<double> > >::addDefaultCreators()
  {
    NonLinSolverCreator<DOFVector<double> > *creator;

    creator = NEW Newton<DOFVector<double> >::Creator;
    addCreator("newton", creator);

    creator = NEW NewtonS<DOFVector<double> >::Creator;
    addCreator("newton_fs", creator);
  }

118

119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
  template<>
  void CreatorMap<OEMSolver<SystemVector> >::addDefaultCreators()
  {
    OEMSolverCreator<SystemVector> *creator;

    creator = NEW BiCGSolver<SystemVector>::Creator;
    addCreator("bicgstab_albert", creator);

    creator = NEW CGSolver<SystemVector>::Creator;
    addCreator("cg", creator);

    creator = NEW GMResSolver<SystemVector>::Creator;
    addCreator("gmres", creator);

    creator = NEW ODirSolver<SystemVector>::Creator;
    addCreator("odir", creator);

    creator = NEW OResSolver<SystemVector>::Creator;
    addCreator("ores", creator);  

    creator = NEW BiCGStab<SystemVector>::Creator;
    addCreator("bicgstab", creator);

    creator = NEW BiCGStab2<SystemVector>::Creator;
    addCreator("bicgstab2", creator);

    creator = NEW MultiGridWrapperVec::Creator;
    addCreator("mg", creator);

    creator = NEW GMResSolver2<SystemVector>::Creator;
    addCreator("gmres2", creator);

    creator = NEW TFQMR<SystemVector>::Creator;
    addCreator("tfqmr", creator);

    creator = NEW VecSymSolver<SystemVector>::Creator;
    addCreator("vecsym", creator);

#ifdef HAVE_UMFPACK
    creator = NEW UmfPackSolver<SystemVector>::Creator;
    addCreator("umfpack", creator);
#endif
  }

163

164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
  template<>
  void CreatorMap<SmootherBase<Matrix<DOFMatrix*>, 
			       Vector<SparseVector<double>*>,
			       Vector<  ::std::set<DegreeOfFreedom>*> > >::addDefaultCreators()
  {
    SmootherCreator<Matrix<DOFMatrix*>, 
      Vector<SparseVector<double>*>,
      Vector<  ::std::set<DegreeOfFreedom>*> > *creator;

    creator = NEW GSSmoother<Matrix<DOFMatrix*>, 
      Vector<SparseVector<double>*>,
      Vector<  ::std::set<DegreeOfFreedom>*> >::Creator;
    addCreator("gs", creator);

    creator = NEW JacobiSmoother<Matrix<DOFMatrix*>, 
      Vector<SparseVector<double>*>,
      Vector<  ::std::set<DegreeOfFreedom>*> >::Creator;
    addCreator("j", creator);

    creator = NEW BoxSmoother::Creator;
    addCreator("box", creator);
  }

187

188
189
190
191
192
193
194
195
196
197
198
199
  template<>
  void CreatorMap<NonLinSolver<SystemVector> >::addDefaultCreators()
  {
    NonLinSolverCreator<SystemVector> *creator;

    creator = NEW Newton<SystemVector>::Creator;
    addCreator("newton", creator);

    creator = NEW NewtonS<SystemVector>::Creator;
    addCreator("newton_fs", creator);
  }

200

201
202
203
204
205
206
207
208
209
210
211
212
  template<>
  void CreatorMap<Estimator>::addDefaultCreators()
  {
    EstimatorCreator *creator;

    creator = NEW ResidualEstimator::Creator;
    addCreator("residual", creator);

    creator = NEW RecoveryEstimator::Creator;
    addCreator("recovery", creator);
  }

213

214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
  template<>
  void CreatorMap<ElementData>::addDefaultCreators()
  {
    CreatorInterface<ElementData> *creator;

    creator = NEW LeafDataEstimatable::Creator;
    addCreator("LeafDataEstimatable", creator);

    creator = NEW LeafDataEstimatableVec::Creator;
    addCreator("LeafDataEstimatableVec", creator);

    creator = NEW LeafDataCoarsenable::Creator;
    addCreator("LeafDataCoarsenable", creator);

    creator = NEW LeafDataCoarsenableVec::Creator;
    addCreator("LeafDataCoarsenableVec", creator);

    creator = NEW LeafDataPeriodic::Creator;
    addCreator("LeafDataPeriodic", creator);

    creator = NEW SurfaceRegion_ED::Creator;
    addCreator("SurfaceRegion_ED", creator);

    creator = NEW ElementRegion_ED::Creator;
    addCreator("ElementRegion_ED", creator);
  }

}