Amesos2 - Direct Sparse Solver Interfaces  Version of the Day
Amesos2_MUMPS_FunctionMap.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Amesos2: Templated Direct Sparse Solver Package
4 //
5 // Copyright 2011 NTESS and the Amesos2 contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
18 #ifndef AMESOS2_MUMPS_FUNCTIONMAP_HPP
19 #define AMESOS2_MUMPS_FUNCTIONMAP_HPP
20 
21 #ifdef HAVE_TEUCHOS_COMPLEX
22 #include <complex>
23 #endif
24 
25 #include "Amesos2_FunctionMap.hpp"
27 
28 
29 namespace Amesos2
30 {
31  /*Specializtions*/
32 
33  template <>
34  struct FunctionMap<MUMPS, float>
35  {
36  typedef TypeMap<MUMPS, float> typemap;
37 
38  static void mumps_c(typemap::MUMPS_STRUC_C *mumps_par)
39  {
40  MUMPST::smumps_c(mumps_par);
41  }
42  };
43  template <>
44  struct FunctionMap<MUMPS,double>
45  {
46  typedef TypeMap<MUMPS, double> typemap;
47 
48  static void mumps_c(typemap::MUMPS_STRUC_C *mumps_par)
49  {
50  MUMPST::dmumps_c(mumps_par);
51  }
52  };
53 
54 #ifdef HAVE_TEUCHOS_COMPLEX
55 
56  template <>
57  struct FunctionMap<MUMPS,MUMPST::CMUMPS_COMPLEX>
58  {
59  typedef TypeMap<MUMPS,MUMPST::CMUMPS_COMPLEX> typemap;
60 
61  static void mumps_c(typemap::MUMPS_STRUC_C *mumps_par)
62  {
63  MUMPST::cmumps_c(mumps_par);
64  }
65  };
66 
67 
68  template <>
69  struct FunctionMap<MUMPS, std::complex<float> >
70  {
71  typedef TypeMap<MUMPS, std::complex<float> > typemap;
72 
73  static void mumps_c(typemap::MUMPS_STRUC_C *mumps_par)
74  {
75  MUMPST::cmumps_c(mumps_par);
76  }
77  };
78 
79  template <>
80  struct FunctionMap<MUMPS, std::complex<double> >
81  {
82  typedef TypeMap<MUMPS, std::complex<double> > typemap;
83 
84  static void mumps_c(typemap::MUMPS_STRUC_C *mumps_par)
85  {
86  MUMPST::zmumps_c(mumps_par);
87  }
88  };
89 
90 #endif //complex
91 } //end namespace Amesos2
92 
93 #endif // AMESOS2_MUMPS_FUNCTIONMAP_HPP
Declaration of Function mapping class for Amesos2.
Provides definition of MUMPS types as well as conversions and type traits.