CreatorMap.cc 3.6 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
//
// Software License for AMDiS
//
// Copyright (c) 2010 Dresden University of Technology 
// All rights reserved.
// Authors: Simon Vey, Thomas Witkowski et al.
//
// This file is part of AMDiS
//
// See also license.opensource.txt in the distribution.


13
#include "CreatorMap.h"
14
#include "MTL4Types.h"
15
#include "OEMSolver.h"
16
17
#include "ITL_Solver.h"
#include "ITL_Preconditioner.h"
18
19
20
21
#include "MatrixVector.h"
#include "SystemVector.h"
#include "Estimator.h"
#include "RecoveryEstimator.h"
22
#include "ResidualEstimator.h"
23
24
25
#include "LeafData.h"
#include "SurfaceRegion_ED.h"
#include "ElementRegion_ED.h"
26
#include "DOFMatrix.h"
27
#include "UmfPackSolver.h"
28
#include "time/RosenbrockMethod.h"
29
#include "nonlin/NonLinSolver.h"
30
31
32
33

namespace AMDiS {

  template<>
34
  void CreatorMap<OEMSolver>::addDefaultCreators()
35
  {
36
    OEMSolverCreator *creator;
37

Thomas Witkowski's avatar
Thomas Witkowski committed
38
    creator = new CGSolver::Creator;
39
40
    addCreator("cg", creator);

41
42
43
    creator = new CGSSolver::Creator;
    addCreator("cgs", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
44
    creator = new BiCGSolver::Creator;
45
    addCreator("bicg", creator);
46

47
    creator = new BiCGStabSolver::Creator;
48
49
    addCreator("bicgstab", creator);

50
    creator = new BiCGStab2Solver::Creator;
51
52
    addCreator("bicgstab2", creator);

53
    creator = new BiCGStabEllSolver::Creator;
54
    addCreator("bicgstab_ell", creator);
55

56
57
58
59
60
61
62
63
64
65
66
67
    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);

68
69
70
    creator = new MinResSolver::Creator;
    addCreator("minres", creator);

71
#ifdef HAVE_UMFPACK
Thomas Witkowski's avatar
Thomas Witkowski committed
72
    creator = new UmfPackSolver::Creator;
73
    addCreator("umfpack", creator);
74
#endif
75
76
  }

77

78
  template<>
79
  void CreatorMap<BasePreconditioner>::addDefaultCreators()
80
  {
81
    PreconditionCreator *creator;
82

Thomas Witkowski's avatar
Thomas Witkowski committed
83
    creator =  new DiagonalPreconditioner::Creator;
84
85
    addCreator("diag", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
86
    creator = new ILUPreconditioner::Creator;
87
88
    addCreator("ilu", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
89
    creator = new ICPreconditioner::Creator;
90
91
    addCreator("ic", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
92
    creator =  new IdentityPreconditioner::Creator;
Thomas Witkowski's avatar
Thomas Witkowski committed
93
94
    addCreator("no", creator);
  }
95

96

97
98
99
100
101
  template<>
  void CreatorMap<Estimator>::addDefaultCreators()
  {
    EstimatorCreator *creator;

Thomas Witkowski's avatar
Thomas Witkowski committed
102
    creator = new ResidualEstimator::Creator;
103
104
    addCreator("residual", creator);

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

109

110
111
112
113
114
  template<>
  void CreatorMap<ElementData>::addDefaultCreators()
  {
    CreatorInterface<ElementData> *creator;

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

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

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

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

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

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

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

137
138
139
140
141
142
143
144
145

  template<>
  void CreatorMap<RosenbrockMethod>::addDefaultCreators()
  {
    addCreator("ros2", new Ros2::Creator);
    addCreator("rowda3", new Rowda3::Creator);
    addCreator("ros3p", new Ros3p::Creator);
    addCreator("rodasp", new Rodasp::Creator);
  }
146
147
148
149
150
151
152


  template<>
  void CreatorMap<NonLinSolver>::addDefaultCreators()
  {
    addCreator("newton", new Newton::Creator);
  }
153
}