10 #ifndef AMESOS2_UMFPACK_FUNCTIONMAP_HPP
11 #define AMESOS2_UMFPACK_FUNCTIONMAP_HPP
13 #ifdef HAVE_TEUCHOS_COMPLEX
18 #include "Amesos2_Umfpack_TypeMap.hpp"
33 struct FunctionMap<Umfpack,double>
35 typedef TypeMap<Umfpack,double> type_map;
41 static int umfpack_solve(
49 const double Control [UMFPACK_CONTROL],
50 double Info [UMFPACK_INFO])
52 return ::umfpack_di_solve(sys, Ap, Ai, Ax, X, B, Numeric, Control, Info);
55 static int umfpack_numeric(
61 const double Control [UMFPACK_CONTROL],
62 double Info [UMFPACK_INFO])
64 return ::umfpack_di_numeric(Ap, Ai, Ax, Symbolic, Numeric, Control, Info);
67 static int umfpack_symbolic(
74 const double Control [UMFPACK_CONTROL],
75 double Info [UMFPACK_INFO])
77 return ::umfpack_di_symbolic(n_row, n_col, Ap, Ai, Ax, Symbolic, Control, Info);
80 static void umfpack_defaults(
81 double Control [UMFPACK_CONTROL])
83 ::umfpack_di_defaults(Control);
86 static void umfpack_free_numeric(
void **Numeric)
88 return ::umfpack_di_free_numeric(Numeric);
91 static void umfpack_free_symbolic(
void **Symbolic)
93 return ::umfpack_di_free_symbolic(Symbolic);
98 #ifdef HAVE_TEUCHOS_COMPLEX
101 struct FunctionMap<Umfpack,Kokkos::complex<double>>
103 typedef TypeMap<Umfpack,Kokkos::complex<double>> type_map;
109 static double * stdComplexToUmfpackDoubleConversion(
110 const Kokkos::complex<double> v [ ])
112 return (
double*)(&v[0]);
115 static int umfpack_solve(
119 const Kokkos::complex<double> Ax [ ],
120 Kokkos::complex<double> X [ ],
121 const Kokkos::complex<double> B [ ],
123 const double Control [UMFPACK_CONTROL],
124 double Info [UMFPACK_INFO])
126 return ::umfpack_zi_solve(sys, Ap, Ai,
127 stdComplexToUmfpackDoubleConversion(Ax), NULL,
128 stdComplexToUmfpackDoubleConversion(X), NULL,
129 stdComplexToUmfpackDoubleConversion(B), NULL,
130 Numeric, Control, Info);
133 static int umfpack_numeric(
136 const Kokkos::complex<double> Ax [ ],
139 const double Control[UMFPACK_CONTROL],
140 double Info[UMFPACK_INFO])
142 return ::umfpack_zi_numeric(Ap, Ai, stdComplexToUmfpackDoubleConversion(Ax), NULL, Symbolic, Numeric, Control, Info);
145 static int umfpack_symbolic(
150 const Kokkos::complex<double> Ax [ ],
152 const double Control [UMFPACK_CONTROL],
153 double Info [UMFPACK_INFO])
155 return ::umfpack_zi_symbolic(n_row, n_col, Ap, Ai, stdComplexToUmfpackDoubleConversion(Ax), NULL, Symbolic, Control, Info);
158 static void umfpack_defaults(
double Control [UMFPACK_CONTROL])
160 ::umfpack_zi_defaults(Control);
163 static void umfpack_free_numeric(
void **Numeric)
165 ::umfpack_zi_free_numeric(Numeric);
168 static void umfpack_free_symbolic(
void **Symbolic)
170 ::umfpack_zi_free_symbolic(Symbolic);
174 #endif // HAVE_TEUCHOS_COMPLEX
181 #endif // AMESOS2_UMFPACK_FUNCTIONMAP_HPP
int Ap[]
Column offsets.
Definition: klu2_simple.cpp:52
Declaration of Function mapping class for Amesos2.
int Ai[]
Row values.
Definition: klu2_simple.cpp:54