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

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

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

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

Thomas Witkowski's avatar
Thomas Witkowski committed
34
    creator = new BiCGStab2::Creator;
35
36
    addCreator("bicgstab2", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
37
    creator = new BiCGStabEll::Creator;
38
    addCreator("bicgstab_ell", creator);
39

40
#ifdef HAVE_UMFPACK
Thomas Witkowski's avatar
Thomas Witkowski committed
41
    creator = new UmfPackSolver::Creator;
42
    addCreator("umfpack", creator);
43
#endif
44
45
46
  }

  template<>
47
  void CreatorMap<ITL_BasePreconditioner>::addDefaultCreators()
48
  {
49
    CreatorInterface<ITL_BasePreconditioner> *creator;
50

Thomas Witkowski's avatar
Thomas Witkowski committed
51
    creator =  new DiagonalPreconditioner::Creator;
52
53
    addCreator("diag", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
54
    creator = new ILUPreconditioner::Creator;
55
56
    addCreator("ilu", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
57
    creator = new ICPreconditioner::Creator;
58
59
    addCreator("ic", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
60
    creator =  new IdentityPreconditioner::Creator;
Thomas Witkowski's avatar
Thomas Witkowski committed
61
62
    addCreator("no", creator);
  }
63
64

#if 0
65
66
67
68
69
  template<>
  void CreatorMap<NonLinSolver<DOFVector<double> > >::addDefaultCreators()
  {
    NonLinSolverCreator<DOFVector<double> > *creator;

Thomas Witkowski's avatar
Thomas Witkowski committed
70
    creator = new Newton<DOFVector<double> >::Creator;
71
72
    addCreator("newton", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
73
    creator = new NewtonS<DOFVector<double> >::Creator;
74
75
    addCreator("newton_fs", creator);
  }
76
#endif
77

78

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

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

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

93
94
95
96
97
  template<>
  void CreatorMap<Estimator>::addDefaultCreators()
  {
    EstimatorCreator *creator;

Thomas Witkowski's avatar
Thomas Witkowski committed
98
    creator = new ResidualEstimator::Creator;
99
100
    addCreator("residual", creator);

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

    creator = new PollutionErrorKonvex::Creator;
    addCreator("pollution2d",creator);
106
107
108
109
110
111
112
  }

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

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

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

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

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

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

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

Thomas Witkowski's avatar
Thomas Witkowski committed
131
    creator = new ElementRegion_ED::Creator;
132
133
    addCreator("ElementRegion_ED", creator);
  }
134

135
}