CreatorMap.cc 3.4 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
20
21
22
23
24
25
#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 "BoxSmoother.h"
#include "MultiGridPreconWrapper.h"
#include "UmfPackSolver.h"

namespace AMDiS {

  template<>
26
  void CreatorMap<OEMSolver>::addDefaultCreators()
27
  {
28
    OEMSolverCreator *creator;
29

30
    creator = NEW CGSolver::Creator;
31
32
    addCreator("cg", creator);

33
34
    creator = NEW BiCGSolver::Creator;
    addCreator("bicg", creator);
35

36
    creator = NEW BiCGStab::Creator;
37
38
    addCreator("bicgstab", creator);

39
    creator = NEW BiCGStab2::Creator;
40
41
    addCreator("bicgstab2", creator);

42
43
    creator = NEW BiCGStabEll::Creator;
    addCreator("bicgstab_ell", creator);
44

45
46
47
#ifdef HAVE_UMFPACK
    creator = NEW UmfPackSolver::Creator;
    addCreator("umfpack", creator);
48
#endif
49
50
51
  }

  template<>
52
  void CreatorMap<ITL_BasePreconditioner>::addDefaultCreators()
53
  {
54
    CreatorInterface<ITL_BasePreconditioner> *creator;
55
56
57
58

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

59
60
61
    creator =  NEW IdentityPreconditioner::Creator;
    addCreator("no", creator);

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

65
66
    creator = NEW ICPreconditioner::Creator;
    addCreator("ic", creator);
67

68

69
#if 0
70
71
    creator =  NEW MGPreconWrapperScal::Creator;
    addCreator("mg", creator);
72
#endif
73
74
  }

75

76
77
78


#if 0
79
80
81
82
83
84
85
86
87
88
89
  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);
  }
90
#endif
91

92

93
#if 0
94
95
96
97
98
99
100
101
102
103
104
  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);
  }
105
#endif
106

107
108
109
110
111
112
113
114
115
116
117
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
  template<>
  void CreatorMap<Estimator>::addDefaultCreators()
  {
    EstimatorCreator *creator;

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

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

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

146
}