52 #ifndef AMESOS2_MUMPS_DECL_HPP 53 #define AMESOS2_MUMPS_DECL_HPP 56 #include "Amesos2_SolverCore.hpp" 77 template <
class Matrix,
class Vector>
92 typedef typename super_type::scalar_type scalar_type;
93 typedef typename super_type::local_ordinal_type local_ordinal_type;
94 typedef typename super_type::global_ordinal_type global_ordinal_type;
95 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;
101 typedef typename type_map::MUMPS_STRUC_C MUMPS_STRUC_C;
105 MUMPS(Teuchos::RCP<const Matrix> A,
106 Teuchos::RCP<Vector> X,
107 Teuchos::RCP<const Vector> B);
121 int symbolicFactorization_impl();
143 int
solve_impl(const Teuchos::Ptr<MultiVecAdapter<Vector> > X,
144 const Teuchos::Ptr<const MultiVecAdapter<Vector> > B) const;
168 const Teuchos::RCP<Teuchos::ParameterList> & parameterList );
191 int ConvertToTriplet();
193 void MUMPS_ERROR() const;
200 bool MUMPS_MATRIX_LOAD;
212 mutable Teuchos::Array<slu_type>
xvals_; local_ordinal_type ldx_;
214 mutable Teuchos::Array<slu_type>
bvals_; local_ordinal_type ldb_;
216 mutable MUMPS_STRUC_C mumps_par;
221 template <class Matrix,class Vector>
222 class MUMPSNS :
public SolverCore<Amesos2::MUMPS, Matrix, Vector>
230 MUMPSNS(Teuchos::RCP<const Matrix> A,
231 Teuchos::RCP<Vector> X,
232 Teuchos::RCP<const Vector> B);
250 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
251 "This solver is not support for these types.");
255 int symbolicFactorization_impl()
258 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
259 "This solver is not support for these types.");
266 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
267 "This solver is not support for these types.");
275 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
276 "This solver is not support for these types.");
283 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
284 "This solver is not support for these types.");
289 const Teuchos::RCP<Teuchos::ParameterList> & parameterList )
292 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
293 "This solver is not support for these types.");
300 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
301 "This solver is not support for these types.");
309 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
310 "This solver is not support for these types.");
315 int ConvertToTriplet()
318 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
319 "This solver is not support for these types.");
324 void MUMPS_ERROR()
const 327 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
328 "This solver is not support for these types.");
346 #ifdef HAVE_TEUCHOS_COMPLEX 347 typedef Meta::make_list4<float,
350 std::complex<double> > supported_scalars;
352 typedef Meta::make_list2<float, double> supported_scalars;
358 #endif // AMESOS2_MUMPS_DECL_HPP Provides a mechanism to map function calls to the correct Solver function based on the scalar type of...
Amesos2::SolverCore: A templated interface for interaction with third-party direct sparse solvers...
Definition: Amesos2_SolverCore_decl.hpp:105
int numericFactorization_impl()
Basker specific numeric factorization.
Definition: Amesos2_MUMPS_def.hpp:195
EPhase
Used to indicate a phase in the direct solution.
Definition: Amesos2_TypeDecl.hpp:65
Map types to solver-specific data-types and enums.
Definition: Amesos2_TypeMap.hpp:82
Teuchos::Array< local_ordinal_type > rowind_
Stores the location in Ai_ and Aval_ that starts row j.
Definition: Amesos2_MUMPS_decl.hpp:207
std::string name() const
Return the name of this solver.
int preOrdering_impl()
Performs pre-ordering on the matrix to increase efficiency.
Definition: Amesos2_MUMPS_def.hpp:166
Provides traits about solvers.
Definition: Amesos2_SolverTraits.hpp:70
Definition: Amesos2_AbstractConcreteMatrixAdapter.hpp:48
int solve_impl(const Teuchos::Ptr< MultiVecAdapter< Vector > > X, const Teuchos::Ptr< const MultiVecAdapter< Vector > > B) const
MUMPS specific solve.
Definition: Amesos2_MUMPS_def.hpp:225
bool matrixShapeOK_impl() const
Determines whether the shape of the matrix is OK for this solver.
Definition: Amesos2_MUMPS_def.hpp:284
bool loadA_impl(EPhase current_phase)
Reads matrix data into internal structures.
Definition: Amesos2_MUMPS_def.hpp:368
Amesos2 interface to the MUMPS package.
Definition: Amesos2_MUMPS_decl.hpp:78
Teuchos::Array< slu_type > xvals_
Persisting 1D store for X.
Definition: Amesos2_MUMPS_decl.hpp:212
Teuchos::Array< slu_type > bvals_
Persisting 1D store for B.
Definition: Amesos2_MUMPS_decl.hpp:214
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters_impl() const
Definition: Amesos2_MUMPS_def.hpp:342
void setParameters_impl(const Teuchos::RCP< Teuchos::ParameterList > ¶meterList)
Definition: Amesos2_MUMPS_def.hpp:293
Passes functions to TPL functions based on type.
Definition: Amesos2_FunctionMap.hpp:76
Provides access to interesting solver traits.
Teuchos::Array< slu_type > nzvals_
Stores the values of the nonzero entries for MUMPS.
Definition: Amesos2_MUMPS_decl.hpp:205
Teuchos::Array< local_ordinal_type > colptr_
Stores the row indices of the nonzero entries.
Definition: Amesos2_MUMPS_decl.hpp:209
A templated MultiVector class adapter for Amesos2.
Definition: Amesos2_MultiVecAdapter_decl.hpp:175