53 #ifndef AMESOS2_SUPERLU_DECL_HPP
54 #define AMESOS2_SUPERLU_DECL_HPP
57 #include "Amesos2_SolverCore.hpp"
71 template <
class Matrix,
87 typedef typename super_type::scalar_type scalar_type;
88 typedef typename super_type::local_ordinal_type local_ordinal_type;
89 typedef typename super_type::global_ordinal_type global_ordinal_type;
90 typedef typename super_type::global_size_type global_size_type;
99 typedef typename type_map::type slu_type;
100 typedef typename type_map::magnitude_type magnitude_type;
113 Superlu(Teuchos::RCP<const Matrix> A,
114 Teuchos::RCP<Vector> X,
115 Teuchos::RCP<const Vector> B);
162 int
solve_impl(const Teuchos::Ptr<MultiVecAdapter<Vector> > X,
163 const Teuchos::Ptr<const MultiVecAdapter<Vector> > B) const;
200 const Teuchos::RCP<Teuchos::ParameterList> & parameterList );
224 mutable struct SLUData {
225 SLU::SuperMatrix A, B, X, L, U;
228 SLU::superlu_options_t options;
229 SLU::mem_usage_t mem_usage;
230 SLU::SuperLUStat_t stat;
232 Teuchos::Array<magnitude_type> berr;
233 Teuchos::Array<magnitude_type> ferr;
234 Teuchos::Array<int> perm_r;
235 Teuchos::Array<int> perm_c;
236 Teuchos::Array<int> etree;
237 Teuchos::Array<magnitude_type> R;
238 Teuchos::Array<magnitude_type> C;
257 Teuchos::Array<slu_type>
xvals_;
int ldx_;
259 Teuchos::Array<slu_type>
bvals_;
int ldb_;
296 #ifdef HAVE_TEUCHOS_COMPLEX
297 typedef Meta::make_list6<float,
300 std::complex<double>,
302 SLU::Z::doublecomplex> supported_scalars;
304 typedef Meta::make_list2<float, double> supported_scalars;
310 #endif // AMESOS2_SUPERLU_DECL_HPP
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 SuperLU.
Definition: Amesos2_Superlu_decl.hpp:250
bool loadA_impl(EPhase current_phase)
Reads matrix data into internal structures.
Definition: Amesos2_Superlu_def.hpp:500
Teuchos::Array< int > colptr_
Stores the row indices of the nonzero entries.
Definition: Amesos2_Superlu_decl.hpp:254
int numericFactorization_impl()
Superlu specific numeric factorization.
Definition: Amesos2_Superlu_def.hpp:171
Map types to solver-specific data-types and enums.
Definition: Amesos2_TypeMap.hpp:82
Teuchos::Array< int > rowind_
Stores the location in Ai_ and Aval_ that starts row j.
Definition: Amesos2_Superlu_decl.hpp:252
bool matrixShapeOK_impl() const
Determines whether the shape of the matrix is OK for this solver.
Definition: Amesos2_Superlu_def.hpp:372
std::string name() const
Return the name of this solver.
Definition: Amesos2_SolverCore_def.hpp:496
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
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters_impl() const
Definition: Amesos2_Superlu_def.hpp:426
int solve_impl(const Teuchos::Ptr< MultiVecAdapter< Vector > > X, const Teuchos::Ptr< const MultiVecAdapter< Vector > > B) const
Superlu specific solve.
Definition: Amesos2_Superlu_def.hpp:271
Teuchos::Array< slu_type > bvals_
Persisting 1D store for B.
Definition: Amesos2_Superlu_decl.hpp:259
Teuchos::Array< slu_type > xvals_
Persisting 1D store for X.
Definition: Amesos2_Superlu_decl.hpp:257
Interface to Amesos2 solver objects.
Definition: Amesos2_Solver_decl.hpp:78
Passes functions to TPL functions based on type.
Definition: Amesos2_FunctionMap.hpp:76
Provides access to interesting solver traits.
void setParameters_impl(const Teuchos::RCP< Teuchos::ParameterList > ¶meterList)
Definition: Amesos2_Superlu_def.hpp:383
int preOrdering_impl()
Performs pre-ordering on the matrix to increase efficiency.
Definition: Amesos2_Superlu_def.hpp:124
int symbolicFactorization_impl()
Perform symbolic factorization of the matrix using Superlu.
Definition: Amesos2_Superlu_def.hpp:149
Amesos2 interface to the SuperLU package.
Definition: Amesos2_Superlu_decl.hpp:73