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);
165 int
solve_impl(const Teuchos::Ptr<MultiVecAdapter<Vector> > X,
166 const Teuchos::Ptr<const MultiVecAdapter<Vector> > B) const;
209 const Teuchos::RCP<Teuchos::ParameterList> & parameterList );
233 mutable struct SLUData {
234 SLU::SuperMatrix A, B, X, L, U;
237 SLU::superlu_options_t options;
238 SLU::mem_usage_t mem_usage;
239 SLU::SuperLUStat_t stat;
241 Teuchos::Array<magnitude_type> berr;
242 Teuchos::Array<magnitude_type> ferr;
243 Teuchos::Array<int> perm_r;
244 Teuchos::Array<int> perm_c;
245 Teuchos::Array<int> etree;
246 Teuchos::Array<magnitude_type> R;
247 Teuchos::Array<magnitude_type> C;
266 Teuchos::Array<slu_type>
xvals_;
int ldx_;
268 Teuchos::Array<slu_type>
bvals_;
int ldb_;
306 #ifdef HAVE_TEUCHOS_COMPLEX 307 typedef Meta::make_list6<float,
310 std::complex<double>,
312 SLU::Z::doublecomplex> supported_scalars;
314 typedef Meta::make_list2<float, double> supported_scalars;
320 #endif // AMESOS2_SUPERLU_DECL_HPP Amesos2::SolverCore: A templated interface for interaction with third-party direct sparse solvers...
Definition: Amesos2_SolverCore_decl.hpp:105
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:365
Teuchos::Array< slu_type > nzvals_
Stores the values of the nonzero entries for SuperLU.
Definition: Amesos2_Superlu_decl.hpp:259
bool loadA_impl(EPhase current_phase)
Reads matrix data into internal structures.
Definition: Amesos2_Superlu_def.hpp:693
Teuchos::Array< int > colptr_
Stores the row indices of the nonzero entries.
Definition: Amesos2_Superlu_decl.hpp:263
int numericFactorization_impl()
Superlu specific numeric factorization.
Definition: Amesos2_Superlu_def.hpp:232
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:261
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters_impl() const
Definition: Amesos2_Superlu_def.hpp:569
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
Teuchos::Array< slu_type > bvals_
Persisting 1D store for B.
Definition: Amesos2_Superlu_decl.hpp:268
Teuchos::Array< slu_type > xvals_
Persisting 1D store for X.
Definition: Amesos2_Superlu_decl.hpp:266
Interface to Amesos2 solver objects.
Definition: Amesos2_Solver_decl.hpp:78
std::string description() const
Returns a short description of this Solver.
Definition: Amesos2_Superlu_def.hpp:131
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.
bool matrixShapeOK_impl() const
Determines whether the shape of the matrix is OK for this solver.
Definition: Amesos2_Superlu_def.hpp:476
void setParameters_impl(const Teuchos::RCP< Teuchos::ParameterList > ¶meterList)
Definition: Amesos2_Superlu_def.hpp:487
int preOrdering_impl()
Performs pre-ordering on the matrix to increase efficiency.
Definition: Amesos2_Superlu_def.hpp:185
int symbolicFactorization_impl()
Perform symbolic factorization of the matrix using Superlu.
Definition: Amesos2_Superlu_def.hpp:210
Amesos2 interface to the SuperLU package.
Definition: Amesos2_Superlu_decl.hpp:73