CreatorMap.cc 3.51 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
14
15
16
17
18
19
#include "LeafData.h"
#include "SurfaceRegion_ED.h"
#include "DOFMatrix.h"
#include "ElementRegion_ED.h"
#include "UmfPackSolver.h"

namespace AMDiS {

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

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

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

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

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

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

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

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

54
#ifdef HAVE_UMFPACK
Thomas Witkowski's avatar
Thomas Witkowski committed
55
    creator = new UmfPackSolver::Creator;
56
    addCreator("umfpack", creator);
57
#endif
58
59
60
  }

  template<>
61
  void CreatorMap<ITL_BasePreconditioner>::addDefaultCreators()
62
  {
63
    CreatorInterface<ITL_BasePreconditioner> *creator;
64

Thomas Witkowski's avatar
Thomas Witkowski committed
65
    creator =  new DiagonalPreconditioner::Creator;
66
67
    addCreator("diag", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
68
    creator = new ILUPreconditioner::Creator;
69
70
    addCreator("ilu", creator);

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

Thomas Witkowski's avatar
Thomas Witkowski committed
74
    creator =  new IdentityPreconditioner::Creator;
Thomas Witkowski's avatar
Thomas Witkowski committed
75
76
    addCreator("no", creator);
  }
77
78

#if 0
79
80
81
82
83
  template<>
  void CreatorMap<NonLinSolver<DOFVector<double> > >::addDefaultCreators()
  {
    NonLinSolverCreator<DOFVector<double> > *creator;

Thomas Witkowski's avatar
Thomas Witkowski committed
84
    creator = new Newton<DOFVector<double> >::Creator;
85
86
    addCreator("newton", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
87
    creator = new NewtonS<DOFVector<double> >::Creator;
88
89
    addCreator("newton_fs", creator);
  }
90
#endif
91

92

93
#if 0
94
95
96
97
98
  template<>
  void CreatorMap<NonLinSolver<SystemVector> >::addDefaultCreators()
  {
    NonLinSolverCreator<SystemVector> *creator;

Thomas Witkowski's avatar
Thomas Witkowski committed
99
    creator = new Newton<SystemVector>::Creator;
100
101
    addCreator("newton", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
102
    creator = new NewtonS<SystemVector>::Creator;
103
104
    addCreator("newton_fs", creator);
  }
105
#endif
106

107
108
109
110
111
  template<>
  void CreatorMap<Estimator>::addDefaultCreators()
  {
    EstimatorCreator *creator;

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

Thomas Witkowski's avatar
Thomas Witkowski committed
115
    creator = new RecoveryEstimator::Creator;
116
117
118
119
120
121
122
123
    addCreator("recovery", creator);
  }

  template<>
  void CreatorMap<ElementData>::addDefaultCreators()
  {
    CreatorInterface<ElementData> *creator;

Thomas Witkowski's avatar
Thomas Witkowski committed
124
    creator = new LeafDataEstimatable::Creator;
125
126
    addCreator("LeafDataEstimatable", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
127
    creator = new LeafDataEstimatableVec::Creator;
128
129
    addCreator("LeafDataEstimatableVec", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
130
    creator = new LeafDataCoarsenable::Creator;
131
132
    addCreator("LeafDataCoarsenable", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
133
    creator = new LeafDataCoarsenableVec::Creator;
134
135
    addCreator("LeafDataCoarsenableVec", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
136
    creator = new LeafDataPeriodic::Creator;
137
138
    addCreator("LeafDataPeriodic", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
139
    creator = new SurfaceRegion_ED::Creator;
140
141
    addCreator("SurfaceRegion_ED", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
142
    creator = new ElementRegion_ED::Creator;
143
144
    addCreator("ElementRegion_ED", creator);
  }
145

146
}