CreatorMap.cc 3.45 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
14
#include "CreatorMap.h"
#include "OEMSolver.h"
15
16
#include "ITL_Solver.h"
#include "ITL_Preconditioner.h"
17
18
19
20
#include "MatrixVector.h"
#include "SystemVector.h"
#include "Estimator.h"
#include "RecoveryEstimator.h"
21
#include "ResidualEstimator.h"
22
23
24
#include "LeafData.h"
#include "SurfaceRegion_ED.h"
#include "ElementRegion_ED.h"
25
#include "DOFMatrix.h"
26
#include "UmfPackSolver.h"
27
#include "time/RosenbrockMethod.h"
28
29
30
31

namespace AMDiS {

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

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

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

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

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

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

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

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

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

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

75

76
  template<>
77
  void CreatorMap<ITL_BasePreconditioner>::addDefaultCreators()
78
  {
79
    CreatorInterface<ITL_BasePreconditioner> *creator;
80

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

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

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

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

94

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

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

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

107

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

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

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

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

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

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

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

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

135
136
137
138
139
140
141
142
143

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