53 #ifndef AMESOS2_SUPERLUDIST_DECL_HPP
54 #define AMESOS2_SUPERLUDIST_DECL_HPP
57 #include "Amesos2_SolverCore.hpp"
88 template <
class Matrix,
103 typedef Matrix matrix_type;
104 typedef Vector vector_type;
107 typedef typename super_type::scalar_type scalar_type;
108 typedef typename super_type::local_ordinal_type local_ordinal_type;
109 typedef typename super_type::global_ordinal_type global_ordinal_type;
110 typedef typename super_type::global_size_type global_size_type;
111 typedef typename super_type::node_type node_type;
115 typedef typename type_map::type slu_type;
116 typedef typename type_map::magnitude_type magnitude_type;
120 typedef Kokkos::DefaultHostExecutionSpace HostExecSpaceType;
121 typedef Kokkos::View<SLUD::int_t*, HostExecSpaceType> host_size_type_array;
122 typedef Kokkos::View<SLUD::int_t*, HostExecSpaceType> host_ordinal_type_array;
123 typedef Kokkos::View<slu_type*, HostExecSpaceType> host_value_type_array;
135 Teuchos::RCP<Vector> X,
136 Teuchos::RCP<const Vector> B);
196 int
solve_impl(const Teuchos::Ptr<MultiVecAdapter<Vector> > X,
197 const Teuchos::Ptr<const MultiVecAdapter<Vector> > B) const;
239 const Teuchos::RCP<Teuchos::ParameterList> & parameterList );
284 mutable struct SLUData {
286 SLUD::SuperMatrix AC;
287 typename type_map::LUstruct_t LU;
288 SLUD::Glu_freeable_t glu_freeable;
295 SLUD::int_t *sizes, *fstVtxSep;
296 SLUD::Pslu_freeable_t pslu_freeable;
298 SLUD::amesos2_superlu_dist_options_t options;
299 SLUD::amesos2_superlu_dist_mem_usage_t mem_usage;
300 SLUD::gridinfo_t grid;
302 typename type_map::LUstruct_t lu;
303 SLUD::SuperLUStat_t stat;
304 typename type_map::SOLVEstruct_t solve_struct;
306 Teuchos::Array<magnitude_type> berr;
307 Teuchos::Array<magnitude_type> ferr;
310 typename type_map::ScalePermstruct_t scale_perm;
312 Teuchos::Array<magnitude_type> R, C;
313 Teuchos::Array<magnitude_type> R1, C1;
314 Teuchos::Array<SLUD::int_t> perm_r, perm_c;
316 SLUD::DiagScale_t equed;
318 magnitude_type rowcnd, colcnd, amax;
319 int largediag_mc64_job;
337 bool force_symbfact_;
338 mutable bool same_solve_struct_;
341 Teuchos::RCP<
const Tpetra::Map<local_ordinal_type,
353 #if defined(HAVE_TEUCHOS_COMPLEX) && !defined(__clang__)
354 typedef Meta::make_list3<double, std::complex<double>, SLUD::Z::doublecomplex> supported_scalars;
356 typedef Meta::make_list1<double> supported_scalars;
362 #endif // AMESOS2_SUPERLUDIST_DECL_HPP
Amesos2::SolverCore: A templated interface for interaction with third-party direct sparse solvers...
Definition: Amesos2_SolverCore_decl.hpp:105
void computeRowPermutationLargeDiagMC64(SLUD::SuperMatrix &GA)
Compute the row permutation for option LargeDiag-MC64.
Definition: Amesos2_Superludist_def.hpp:337
Amesos2 interface to the distributed memory version of SuperLU.
Definition: Amesos2_Superludist_decl.hpp:90
Map types to solver-specific data-types and enums.
Definition: Amesos2_TypeMap.hpp:82
void setParameters_impl(const Teuchos::RCP< Teuchos::ParameterList > ¶meterList)
Definition: Amesos2_Superludist_def.hpp:823
host_value_type_array nzvals_view_
Stores the values of the nonzero entries for SuperLU_DIST.
Definition: Amesos2_Superludist_decl.hpp:324
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters_impl() const
Definition: Amesos2_Superludist_def.hpp:900
Provides traits about solvers.
Definition: Amesos2_SolverTraits.hpp:71
int preOrdering_impl()
Performs pre-ordering on the matrix to increase efficiency.
Definition: Amesos2_Superludist_def.hpp:392
host_size_type_array rowptr_view_
Stores the location in Ai_ and Aval_ that starts row j.
Definition: Amesos2_Superludist_decl.hpp:328
Provides a mechanism to map function calls to the correct Solver function based on the scalar type of...
std::string name() const override
Return the name of this solver.
Definition: Amesos2_SolverCore_def.hpp:759
Teuchos::Array< slu_type > bvals_
1D store for B values
Definition: Amesos2_Superludist_decl.hpp:330
Interface to Amesos2 solver objects.
Definition: Amesos2_Solver_decl.hpp:78
bool matrixShapeOK_impl() const
Determines whether the shape of the matrix is OK for this solver.
Definition: Amesos2_Superludist_def.hpp:814
Passes functions to TPL functions based on type.
Definition: Amesos2_FunctionMap.hpp:76
Teuchos::RCP< const Tpetra::Map< local_ordinal_type, global_ordinal_type, node_type > > superlu_rowmap_
Maps rows of the matrix to processors in the SuperLU_DIST processor grid.
Definition: Amesos2_Superludist_decl.hpp:343
int symbolicFactorization_impl()
Perform symbolic factorization of the matrix using SuperLU_DIST.
Definition: Amesos2_Superludist_def.hpp:448
Provides access to interesting solver traits.
void get_default_grid_size(int nprocs, SLUD::int_t &nprow, SLUD::int_t &npcol) const
Definition: Amesos2_Superludist_def.hpp:986
bool in_grid_
true if this processor is in SuperLU_DISTS's 2D process grid
Definition: Amesos2_Superludist_decl.hpp:335
int solve_impl(const Teuchos::Ptr< MultiVecAdapter< Vector > > X, const Teuchos::Ptr< const MultiVecAdapter< Vector > > B) const
SuperLU_DIST specific solve.
Definition: Amesos2_Superludist_def.hpp:648
bool loadA_impl(EPhase current_phase)
Reads matrix data into internal solver structures.
Definition: Amesos2_Superludist_def.hpp:1011
host_ordinal_type_array colind_view_
Stores the row indices of the nonzero entries.
Definition: Amesos2_Superludist_decl.hpp:326
Teuchos::Array< slu_type > xvals_
1D store for X values
Definition: Amesos2_Superludist_decl.hpp:332
int numericFactorization_impl()
SuperLU_DIST specific numeric factorization.
Definition: Amesos2_Superludist_def.hpp:497