CreatorMap.cc 3.44 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
30
31
32

namespace AMDiS {

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

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

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

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

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

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

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

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

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

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

76

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

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

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

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

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

95

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

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

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

108

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

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

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

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

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

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

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

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

136
137
138
139
140
141
142
143
144

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