53 #ifndef AMESOS2_CHOLMOD_DECL_HPP
54 #define AMESOS2_CHOLMOD_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;
91 typedef typename super_type::node_type node_type;
100 typedef typename type_map::type chol_type;
101 typedef typename type_map::magnitude_type magnitude_type;
114 Cholmod(Teuchos::RCP<const Matrix> A,
115 Teuchos::RCP<Vector> X,
116 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 );
223 mutable struct CholData {
224 CHOL::cholmod_sparse A;
225 CHOL::cholmod_dense x, b;
226 CHOL::cholmod_dense *Y, *E;
227 CHOL::cholmod_factor *L;
228 CHOL::cholmod_common c;
240 Teuchos::Array<chol_type>
xvals_;
int ldx_;
242 Teuchos::Array<chol_type>
bvals_;
int ldb_;
249 Teuchos::RCP<const Tpetra::Map<local_ordinal_type,global_ordinal_type,node_type> > map;
265 #ifdef HAVE_TEUCHOS_COMPLEX
266 typedef Meta::make_list4<float,
268 std::complex<double>,
269 CHOL::complex> supported_scalars;
271 typedef Meta::make_list2<float, double> supported_scalars;
277 #endif // AMESOS2_CHOLMOD_DECL_HPP
int preOrdering_impl()
Performs pre-ordering on the matrix to increase efficiency.
Definition: Amesos2_Cholmod_def.hpp:104
Amesos2::SolverCore: A templated interface for interaction with third-party direct sparse solvers...
Definition: Amesos2_SolverCore_decl.hpp:105
Teuchos::Array< chol_type > xvals_
Persisting 1D store for X.
Definition: Amesos2_Cholmod_decl.hpp:240
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters_impl() const
Definition: Amesos2_Cholmod_def.hpp:346
Template for providing a mechanism to map function calls to the correct Solver function based on the ...
Map types to solver-specific data-types and enums.
Definition: Amesos2_TypeMap.hpp:82
Teuchos::Array< chol_type > nzvals_
Stores the values of the nonzero entries for CHOLMOD.
Definition: Amesos2_Cholmod_decl.hpp:233
bool matrixShapeOK_impl() const
Determines whether the shape of the matrix is OK for this solver.
Definition: Amesos2_Cholmod_def.hpp:291
Teuchos::Array< chol_type > bvals_
Persisting 1D store for B.
Definition: Amesos2_Cholmod_decl.hpp:242
std::string name() const
Return the name of this solver.
Definition: Amesos2_SolverCore_def.hpp:509
Teuchos::Array< int > colptr_
Stores the row indices of the nonzero entries.
Definition: Amesos2_Cholmod_decl.hpp:237
Provides traits about solvers.
Definition: Amesos2_SolverTraits.hpp:70
int solve_impl(const Teuchos::Ptr< MultiVecAdapter< Vector > > X, const Teuchos::Ptr< const MultiVecAdapter< Vector > > B) const
CHOLMOD specific solve.
Definition: Amesos2_Cholmod_def.hpp:191
void setParameters_impl(const Teuchos::RCP< Teuchos::ParameterList > ¶meterList)
Definition: Amesos2_Cholmod_def.hpp:299
Teuchos::Array< int > rowind_
Stores the location in Ai_ and Aval_ that starts row j.
Definition: Amesos2_Cholmod_decl.hpp:235
Passes functions to TPL functions based on type.
Definition: Amesos2_FunctionMap.hpp:76
Provides access to interesting solver traits.
bool loadA_impl(EPhase current_phase)
Reads matrix data into internal structures.
Definition: Amesos2_Cholmod_def.hpp:392
int symbolicFactorization_impl()
Perform symbolic factorization of the matrix using CHOLMOD.
Definition: Amesos2_Cholmod_def.hpp:121
Amesos2 interface to the SuperLU package.
Definition: Amesos2_Cholmod_decl.hpp:73
int numericFactorization_impl()
CHOLMOD specific numeric factorization.
Definition: Amesos2_Cholmod_def.hpp:143