CreatorMap.cc 3.14 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);

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

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

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

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

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

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

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

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

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

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

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

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

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

77

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

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

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

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

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

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

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

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

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

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

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

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

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

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

131
}