CreatorMap.cc 3.8 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
#include "MatrixVector.h"
#include "SystemVector.h"
20
#include "est/Estimator.h"
21 22 23
#include "LeafData.h"
#include "SurfaceRegion_ED.h"
#include "ElementRegion_ED.h"
24
#include "DOFMatrix.h"
25
#include "UmfPackSolver.h"
26 27 28
#include "est/RecoveryEstimator.h"
#include "est/ResidualEstimator.h"
#include "est/SimpleResidualEstimator.h"
29
#include "time/RosenbrockMethod.h"
30
#include "nonlin/NonLinSolver.h"
31 32 33 34

namespace AMDiS {

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

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

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

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

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

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

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

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

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

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

78

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

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

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

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

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

97

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

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

106 107 108
    creator = new SimpleResidualEstimator::Creator;
    addCreator("simple-residual", creator);

Thomas Witkowski's avatar
Thomas Witkowski committed
109
    creator = new RecoveryEstimator::Creator;
110 111 112
    addCreator("recovery", creator);
  }

113

114 115 116 117 118
  template<>
  void CreatorMap<ElementData>::addDefaultCreators()
  {
    CreatorInterface<ElementData> *creator;

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

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

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

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

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

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

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

141 142 143 144 145 146 147 148 149

  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);
  }
150 151 152 153 154 155


  template<>
  void CreatorMap<NonLinSolver>::addDefaultCreators()
  {
    addCreator("newton", new Newton::Creator);
156
    addCreator("newtonArmijo", new NewtonArmijo::Creator);
157
  }
158
}