CreatorMap.cc 3.64 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
#include "LeafData.h"
#include "SurfaceRegion_ED.h"
#include "ElementRegion_ED.h"
14
15
#include "PartitionElementData.h"
#include "DOFMatrix.h"
16
17
18
19
20
#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);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

93

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    creator = new PartitionElementData::Creator;
    addCreator("PartitionElementData", creator);
148
  }
149

150
}