52 #ifndef AMESOS2_KLU2_DECL_HPP 53 #define AMESOS2_KLU2_DECL_HPP 56 #include "Amesos2_SolverCore.hpp" 70 template <
class Matrix,
86 typedef typename super_type::scalar_type scalar_type;
87 typedef typename super_type::local_ordinal_type local_ordinal_type;
88 typedef typename super_type::global_ordinal_type global_ordinal_type;
89 typedef typename super_type::global_size_type global_size_type;
98 typedef typename type_map::type slu_type;
99 typedef typename type_map::magnitude_type magnitude_type;
112 KLU2(Teuchos::RCP<const Matrix> A,
113 Teuchos::RCP<Vector> X,
114 Teuchos::RCP<const Vector> B);
161 int
solve_impl(const Teuchos::Ptr<MultiVecAdapter<Vector> > X,
162 const Teuchos::Ptr<const MultiVecAdapter<Vector> > B) const;
199 const Teuchos::RCP<Teuchos::ParameterList> & parameterList );
222 mutable struct KLU2Data {
223 ::KLU2::klu_symbolic<slu_type, local_ordinal_type> *symbolic_;
224 ::KLU2::klu_numeric<slu_type, local_ordinal_type> *numeric_;
225 ::KLU2::klu_common<slu_type, local_ordinal_type> common_;
237 Teuchos::Array<slu_type>
xvals_; local_ordinal_type ldx_;
239 Teuchos::Array<slu_type>
bvals_; local_ordinal_type ldb_;
251 #ifdef HAVE_TEUCHOS_COMPLEX 252 typedef Meta::make_list4<float,
255 std::complex<double> > supported_scalars;
257 typedef Meta::make_list2<float, double> supported_scalars;
263 #endif // AMESOS2_KLU2_DECL_HPP Teuchos::Array< slu_type > bvals_
Persisting 1D store for B.
Definition: Amesos2_KLU2_decl.hpp:239
Amesos2::SolverCore: A templated interface for interaction with third-party direct sparse solvers...
Definition: Amesos2_SolverCore_decl.hpp:105
Teuchos::Array< slu_type > nzvals_
Stores the values of the nonzero entries for KLU2.
Definition: Amesos2_KLU2_decl.hpp:230
Teuchos::Array< slu_type > xvals_
Persisting 1D store for X.
Definition: Amesos2_KLU2_decl.hpp:237
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters_impl() const
Definition: Amesos2_KLU2_def.hpp:320
bool loadA_impl(EPhase current_phase)
Reads matrix data into internal structures.
Definition: Amesos2_KLU2_def.hpp:352
Map types to solver-specific data-types and enums.
Definition: Amesos2_TypeMap.hpp:82
Provides a mechanism to map function calls to the correct Solver function based on the scalar type of...
Provides traits about solvers.
Definition: Amesos2_SolverTraits.hpp:70
Definition: Amesos2_AbstractConcreteMatrixAdapter.hpp:48
void setParameters_impl(const Teuchos::RCP< Teuchos::ParameterList > ¶meterList)
Definition: Amesos2_KLU2_def.hpp:299
int symbolicFactorization_impl()
Perform symbolic factorization of the matrix using KLU2.
Definition: Amesos2_KLU2_def.hpp:127
Definition: Amesos2_KLU2_FunctionMap.hpp:67
int preOrdering_impl()
Performs pre-ordering on the matrix to increase efficiency.
Definition: Amesos2_KLU2_def.hpp:113
Teuchos::Array< local_ordinal_type > rowind_
Stores the location in Ai_ and Aval_ that starts row j.
Definition: Amesos2_KLU2_decl.hpp:232
int solve_impl(const Teuchos::Ptr< MultiVecAdapter< Vector > > X, const Teuchos::Ptr< const MultiVecAdapter< Vector > > B) const
KLU2 specific solve.
Definition: Amesos2_KLU2_def.hpp:198
bool matrixShapeOK_impl() const
Determines whether the shape of the matrix is OK for this solver.
Definition: Amesos2_KLU2_def.hpp:288
int numericFactorization_impl()
KLU2 specific numeric factorization.
Definition: Amesos2_KLU2_def.hpp:142
Teuchos::Array< local_ordinal_type > colptr_
Stores the row indices of the nonzero entries.
Definition: Amesos2_KLU2_decl.hpp:234
Amesos2 interface to the KLU2 package.
Definition: Amesos2_KLU2_decl.hpp:72
std::string name() const
Return the name of this solver.
Definition: Amesos2_SolverCore_def.hpp:505
Passes functions to TPL functions based on type.
Definition: Amesos2_FunctionMap.hpp:76
Provides access to interesting solver traits.
int transFlag_
Definition: Amesos2_KLU2_decl.hpp:243