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

24
    creator = NEW CGSolver::Creator;
25
26
    addCreator("cg", creator);

27
28
    creator = NEW BiCGSolver::Creator;
    addCreator("bicg", creator);
29

30
    creator = NEW BiCGStab::Creator;
31
32
    addCreator("bicgstab", creator);

33
    creator = NEW BiCGStab2::Creator;
34
35
    addCreator("bicgstab2", creator);

36
37
    creator = NEW BiCGStabEll::Creator;
    addCreator("bicgstab_ell", creator);
38

39
40
41
#ifdef HAVE_UMFPACK
    creator = NEW UmfPackSolver::Creator;
    addCreator("umfpack", creator);
42
#endif
43
44
45
  }

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

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

53
54
55
    creator =  NEW IdentityPreconditioner::Creator;
    addCreator("no", creator);

56
57
58
    creator = NEW ILUPreconditioner::Creator;
    addCreator("ilu", creator);

59
60
    creator = NEW ICPreconditioner::Creator;
    addCreator("ic", creator);
61
62
  }

63

64
65
66


#if 0
67
68
69
70
71
72
73
74
75
76
77
  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);
  }
78
#endif
79

80

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

95
96
97
98
99
100
101
102
103
104
105
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
  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);
  }
133

134
}