54 #ifndef AMESOS2_SHYLUBASKER_DEF_HPP 55 #define AMESOS2_SHYLUBASKER_DEF_HPP 57 #include <Teuchos_Tuple.hpp> 58 #include <Teuchos_ParameterList.hpp> 59 #include <Teuchos_StandardParameterEntryValidators.hpp> 67 template <
class Matrix,
class Vector>
68 ShyLUBasker<Matrix,Vector>::ShyLUBasker(
69 Teuchos::RCP<const Matrix> A,
70 Teuchos::RCP<Vector> X,
71 Teuchos::RCP<const Vector> B )
72 : SolverCore<
Amesos2::ShyLUBasker,Matrix,Vector>(A, X, B)
76 , is_contiguous_(true)
83 #if defined(HAVE_AMESOS2_KOKKOS) && defined(KOKKOS_ENABLE_OPENMP) 88 typedef Kokkos::OpenMP Exe_Space;
90 ShyLUbasker = new ::BaskerNS::BaskerTrilinosInterface<local_ordinal_type, slu_type, Exe_Space>();
91 ShyLUbasker->Options.no_pivot = BASKER_FALSE;
92 ShyLUbasker->Options.static_delayed_pivot = 0;
93 ShyLUbasker->Options.symmetric = BASKER_FALSE;
94 ShyLUbasker->Options.realloc = BASKER_TRUE;
95 ShyLUbasker->Options.verbose = BASKER_FALSE;
96 ShyLUbasker->Options.prune = BASKER_TRUE;
97 ShyLUbasker->Options.btf_matching = 2;
98 ShyLUbasker->Options.blk_matching = 1;
99 ShyLUbasker->Options.min_block_size = 0;
100 ShyLUbasker->Options.amd_dom = BASKER_TRUE;
101 ShyLUbasker->Options.use_metis = BASKER_TRUE;
102 ShyLUbasker->Options.run_nd_on_leaves = BASKER_FALSE;
103 ShyLUbasker->Options.transpose = BASKER_FALSE;
104 ShyLUbasker->Options.replace_tiny_pivot = BASKER_TRUE;
105 ShyLUbasker->Options.verbose_matrix_out = BASKER_FALSE;
107 ShyLUbasker->Options.user_fill = (double)BASKER_FILL_USER;
108 ShyLUbasker->Options.use_sequential_diag_facto = BASKER_FALSE;
109 #ifdef KOKKOS_ENABLE_DEPRECATED_CODE 110 num_threads = Kokkos::OpenMP::max_hardware_threads();
112 num_threads = Kokkos::OpenMP::impl_max_hardware_threads();
115 ShyLUbaskerTr = new ::BaskerNS::BaskerTrilinosInterface<local_ordinal_type, slu_type, Exe_Space>();
116 ShyLUbaskerTr->Options.no_pivot = BASKER_FALSE;
117 ShyLUbaskerTr->Options.static_delayed_pivot = 0;
118 ShyLUbaskerTr->Options.symmetric = BASKER_FALSE;
119 ShyLUbaskerTr->Options.realloc = BASKER_TRUE;
120 ShyLUbaskerTr->Options.verbose = BASKER_FALSE;
121 ShyLUbaskerTr->Options.prune = BASKER_TRUE;
122 ShyLUbaskerTr->Options.btf_matching = 2;
123 ShyLUbaskerTr->Options.blk_matching = 1;
124 ShyLUbaskerTr->Options.min_block_size = 0;
125 ShyLUbaskerTr->Options.amd_dom = BASKER_TRUE;
126 ShyLUbaskerTr->Options.use_metis = BASKER_TRUE;
127 ShyLUbaskerTr->Options.run_nd_on_leaves = BASKER_FALSE;
128 ShyLUbaskerTr->Options.transpose = BASKER_TRUE;
129 ShyLUbaskerTr->Options.replace_tiny_pivot = BASKER_TRUE;
130 ShyLUbaskerTr->Options.verbose_matrix_out = BASKER_FALSE;
132 ShyLUbaskerTr->Options.user_fill = (double)BASKER_FILL_USER;
133 ShyLUbaskerTr->Options.use_sequential_diag_facto = BASKER_FALSE;
135 TEUCHOS_TEST_FOR_EXCEPTION(1 != 0,
137 "Amesos2_ShyLUBasker Exception: Do not have supported Kokkos node type (OpenMP) enabled for ShyLUBasker");
142 template <
class Matrix,
class Vector>
143 ShyLUBasker<Matrix,Vector>::~ShyLUBasker( )
146 #if defined(HAVE_AMESOS2_KOKKOS) && defined(KOKKOS_ENABLE_OPENMP) 147 ShyLUbasker->Finalize();
148 ShyLUbaskerTr->Finalize();
150 delete ShyLUbaskerTr;
154 template <
class Matrix,
class Vector>
157 return (this->root_ && (this->matrixA_->getComm()->getSize() == 1) && is_contiguous_);
160 template<
class Matrix,
class Vector>
166 #ifdef HAVE_AMESOS2_TIMERS 167 Teuchos::TimeMonitor preOrderTimer(this->timers_.preOrderTime_);
174 template <
class Matrix,
class Vector>
182 ShyLUbasker->SetThreads(num_threads);
183 ShyLUbaskerTr->SetThreads(num_threads);
185 #ifdef HAVE_AMESOS2_VERBOSE_DEBUG 186 std::cout <<
"ShyLUBasker:: Before symbolic factorization" << std::endl;
187 std::cout <<
"nzvals_ : " << nzvals_.toString() << std::endl;
188 std::cout <<
"rowind_ : " << rowind_.toString() << std::endl;
189 std::cout <<
"colptr_ : " << colptr_.toString() << std::endl;
197 if ( single_proc_optimization() ) {
200 auto sp_rowptr = this->matrixA_->returnRowPtr();
201 TEUCHOS_TEST_FOR_EXCEPTION(sp_rowptr ==
nullptr,
202 std::runtime_error,
"Amesos2 Runtime Error: sp_rowptr returned null ");
203 auto sp_colind = this->matrixA_->returnColInd();
204 TEUCHOS_TEST_FOR_EXCEPTION(sp_colind ==
nullptr,
205 std::runtime_error,
"Amesos2 Runtime Error: sp_colind returned null ");
206 #ifndef HAVE_TEUCHOS_COMPLEX 207 auto sp_values = this->matrixA_->returnValues();
211 using complex_type =
typename Util::getStdCplxType< magnitude_type, typename matrix_adapter_type::spmtx_vals_t >::type;
212 complex_type * sp_values =
nullptr;
213 sp_values =
reinterpret_cast< complex_type *
> ( this->matrixA_->returnValues() );
215 TEUCHOS_TEST_FOR_EXCEPTION(sp_values ==
nullptr,
216 std::runtime_error,
"Amesos2 Runtime Error: sp_values returned null ");
219 info = ShyLUbasker->Symbolic(this->globalNumRows_,
220 this->globalNumCols_,
221 this->globalNumNonZeros_,
227 TEUCHOS_TEST_FOR_EXCEPTION(info != 0,
228 std::runtime_error,
"Error in ShyLUBasker Symbolic");
230 if (info == BASKER_SUCCESS) {
231 info = ShyLUbaskerTr->Symbolic(this->globalNumRows_,
232 this->globalNumCols_,
233 this->globalNumNonZeros_,
239 TEUCHOS_TEST_FOR_EXCEPTION(info != 0,
240 std::runtime_error,
"Error in ShyLUBaskerTr Symbolic");
246 info = ShyLUbasker->Symbolic(this->globalNumRows_,
247 this->globalNumCols_,
248 this->globalNumNonZeros_,
251 nzvals_.getRawPtr());
253 TEUCHOS_TEST_FOR_EXCEPTION(info != 0,
254 std::runtime_error,
"Error in ShyLUBasker Symbolic");
256 if (info == BASKER_SUCCESS) {
257 info = ShyLUbaskerTr->Symbolic(this->globalNumRows_,
258 this->globalNumCols_,
259 this->globalNumNonZeros_,
265 TEUCHOS_TEST_FOR_EXCEPTION(info != 0,
266 std::runtime_error,
"Error in ShyLUBaskerTr Symbolic");
273 Teuchos::broadcast(*(this->matrixA_->getComm()), 0, &info);
278 template <
class Matrix,
class Vector>
287 #ifdef HAVE_AMESOS2_TIMERS 288 Teuchos::TimeMonitor numFactTimer(this->timers_.numFactTime_);
291 #ifdef HAVE_AMESOS2_VERBOSE_DEBUG 292 std::cout <<
"ShyLUBasker:: Before numeric factorization" << std::endl;
293 std::cout <<
"nzvals_ : " << nzvals_.toString() << std::endl;
294 std::cout <<
"rowind_ : " << rowind_.toString() << std::endl;
295 std::cout <<
"colptr_ : " << colptr_.toString() << std::endl;
303 if ( single_proc_optimization() ) {
305 auto sp_rowptr = this->matrixA_->returnRowPtr();
306 TEUCHOS_TEST_FOR_EXCEPTION(sp_rowptr ==
nullptr,
307 std::runtime_error,
"Amesos2 Runtime Error: sp_rowptr returned null ");
308 auto sp_colind = this->matrixA_->returnColInd();
309 TEUCHOS_TEST_FOR_EXCEPTION(sp_colind ==
nullptr,
310 std::runtime_error,
"Amesos2 Runtime Error: sp_colind returned null ");
311 #ifndef HAVE_TEUCHOS_COMPLEX 312 auto sp_values = this->matrixA_->returnValues();
316 using complex_type =
typename Util::getStdCplxType< magnitude_type, typename matrix_adapter_type::spmtx_vals_t >::type;
317 complex_type * sp_values =
nullptr;
318 sp_values =
reinterpret_cast< complex_type *
> ( this->matrixA_->returnValues() );
320 TEUCHOS_TEST_FOR_EXCEPTION(sp_values ==
nullptr,
321 std::runtime_error,
"Amesos2 Runtime Error: sp_values returned null ");
324 info = ShyLUbasker->Factor( this->globalNumRows_,
325 this->globalNumCols_,
326 this->globalNumNonZeros_,
331 TEUCHOS_TEST_FOR_EXCEPTION(info != 0,
332 std::runtime_error,
"Error ShyLUBasker Factor");
335 info = ShyLUbaskerTr->Factor( this->globalNumRows_,
336 this->globalNumCols_,
337 this->globalNumNonZeros_,
342 TEUCHOS_TEST_FOR_EXCEPTION(info != 0,
343 std::runtime_error,
"Error ShyLUBaskerTr Factor");
349 info = ShyLUbasker->Factor(this->globalNumRows_,
350 this->globalNumCols_,
351 this->globalNumNonZeros_,
354 nzvals_.getRawPtr());
356 TEUCHOS_TEST_FOR_EXCEPTION(info != 0,
357 std::runtime_error,
"Error ShyLUBasker Factor");
360 info = ShyLUbaskerTr->Factor(this->globalNumRows_,
361 this->globalNumCols_,
362 this->globalNumNonZeros_,
365 nzvals_.getRawPtr());
367 TEUCHOS_TEST_FOR_EXCEPTION(info != 0,
368 std::runtime_error,
"Error ShyLUBaskerTr Factor");
375 local_ordinal_type blnnz = local_ordinal_type(0);
376 local_ordinal_type bunnz = local_ordinal_type(0);
377 ShyLUbasker->GetLnnz(blnnz);
378 ShyLUbasker->GetUnnz(bunnz);
380 local_ordinal_type Trblnnz = local_ordinal_type(0);
381 local_ordinal_type Trbunnz = local_ordinal_type(0);
382 ShyLUbaskerTr->GetLnnz(Trblnnz);
383 ShyLUbaskerTr->GetUnnz(Trbunnz);
387 this->setNnzLU( as<size_t>( blnnz + bunnz ) );
393 Teuchos::broadcast(*(this->matrixA_->getComm()), 0, &info);
397 TEUCHOS_TEST_FOR_EXCEPTION(info == -1,
399 "ShyLUBasker: Could not alloc space for L and U");
400 TEUCHOS_TEST_FOR_EXCEPTION(info == -2,
402 "ShyLUBasker: Could not alloc needed work space");
403 TEUCHOS_TEST_FOR_EXCEPTION(info == -3,
405 "ShyLUBasker: Could not alloc additional memory needed for L and U");
406 TEUCHOS_TEST_FOR_EXCEPTION(info > 0,
408 "ShyLUBasker: Zero pivot found at: " << info );
414 template <
class Matrix,
class Vector>
424 const global_size_type ld_rhs = this->root_ ? X->getGlobalLength() : 0;
425 const size_t nrhs = X->getGlobalNumVectors();
427 bool ShyluBaskerTransposeRequest = this->control_.useTranspose_;
429 if ( single_proc_optimization() && nrhs == 1 ) {
431 #ifdef HAVE_AMESOS2_TIMERS 432 Teuchos::TimeMonitor solveTimer(this->timers_.solveTime_);
435 #ifndef HAVE_TEUCHOS_COMPLEX 441 using complex_type =
typename Util::getStdCplxType< magnitude_type, typename matrix_adapter_type::spmtx_vals_t >::type;
445 TEUCHOS_TEST_FOR_EXCEPTION(b_vector ==
nullptr,
446 std::runtime_error,
"Amesos2 Runtime Error: b_vector returned null ");
448 TEUCHOS_TEST_FOR_EXCEPTION(x_vector ==
nullptr,
449 std::runtime_error,
"Amesos2 Runtime Error: x_vector returned null ");
453 #ifdef HAVE_AMESOS2_TIMERS 454 Teuchos::TimeMonitor solveTimer(this->timers_.solveTime_);
456 if (!ShyluBaskerTransposeRequest)
457 ierr = ShyLUbasker->Solve(nrhs, b_vector, x_vector);
459 ierr = ShyLUbaskerTr->Solve(nrhs, b_vector, x_vector);
463 Teuchos::broadcast(*(this->getComm()), 0, &ierr);
465 TEUCHOS_TEST_FOR_EXCEPTION( ierr > 0,
467 "Encountered zero diag element at: " << ierr);
468 TEUCHOS_TEST_FOR_EXCEPTION( ierr == -1,
470 "Could not alloc needed working memory for solve" );
475 const size_t val_store_size = as<size_t>(ld_rhs * nrhs);
477 xvals_.resize(val_store_size);
478 bvals_.resize(val_store_size);
481 #ifdef HAVE_AMESOS2_TIMERS 482 Teuchos::TimeMonitor mvConvTimer(this->timers_.vecConvTime_);
483 Teuchos::TimeMonitor redistTimer( this->timers_.vecRedistTime_ );
486 if ( is_contiguous_ ==
true ) {
488 slu_type>::do_get(B, bvals_(), as<size_t>(ld_rhs),
ROOTED, this->rowIndexBase_);
498 #ifdef HAVE_AMESOS2_TIMERS 499 Teuchos::TimeMonitor solveTimer(this->timers_.solveTime_);
501 if (!ShyluBaskerTransposeRequest)
502 ierr = ShyLUbasker->Solve(nrhs, bvals_.getRawPtr(), xvals_.getRawPtr());
504 ierr = ShyLUbaskerTr->Solve(nrhs, bvals_.getRawPtr(), xvals_.getRawPtr());
509 Teuchos::broadcast(*(this->getComm()), 0, &ierr);
511 TEUCHOS_TEST_FOR_EXCEPTION( ierr > 0,
513 "Encountered zero diag element at: " << ierr);
514 TEUCHOS_TEST_FOR_EXCEPTION( ierr == -1,
516 "Could not alloc needed working memory for solve" );
519 #ifdef HAVE_AMESOS2_TIMERS 520 Teuchos::TimeMonitor redistTimer(this->timers_.vecRedistTime_);
523 if ( is_contiguous_ ==
true ) {
542 template <
class Matrix,
class Vector>
547 return( this->globalNumRows_ == this->globalNumCols_ );
551 template <
class Matrix,
class Vector>
556 using Teuchos::getIntegralValue;
557 using Teuchos::ParameterEntryValidator;
559 RCP<const Teuchos::ParameterList> valid_params = getValidParameters_impl();
561 if(parameterList->isParameter(
"IsContiguous"))
563 is_contiguous_ = parameterList->get<
bool>(
"IsContiguous");
566 if(parameterList->isParameter(
"num_threads"))
568 num_threads = parameterList->get<
int>(
"num_threads");
570 if(parameterList->isParameter(
"pivot"))
572 ShyLUbasker->Options.no_pivot = (!parameterList->get<
bool>(
"pivot"));
573 ShyLUbaskerTr->Options.no_pivot = (!parameterList->get<
bool>(
"pivot"));
575 if(parameterList->isParameter(
"delayed pivot"))
577 ShyLUbasker->Options.static_delayed_pivot = (parameterList->get<
int>(
"delayed pivot"));
578 ShyLUbaskerTr->Options.static_delayed_pivot = (parameterList->get<
int>(
"delayed pivot"));
580 if(parameterList->isParameter(
"pivot_tol"))
582 ShyLUbasker->Options.pivot_tol = parameterList->get<
double>(
"pivot_tol");
583 ShyLUbaskerTr->Options.pivot_tol = parameterList->get<
double>(
"pivot_tol");
585 if(parameterList->isParameter(
"symmetric"))
587 ShyLUbasker->Options.symmetric = parameterList->get<
bool>(
"symmetric");
588 ShyLUbaskerTr->Options.symmetric = parameterList->get<
bool>(
"symmetric");
590 if(parameterList->isParameter(
"realloc"))
592 ShyLUbasker->Options.realloc = parameterList->get<
bool>(
"realloc");
593 ShyLUbaskerTr->Options.realloc = parameterList->get<
bool>(
"realloc");
595 if(parameterList->isParameter(
"verbose"))
597 ShyLUbasker->Options.verbose = parameterList->get<
bool>(
"verbose");
598 ShyLUbaskerTr->Options.verbose = parameterList->get<
bool>(
"verbose");
600 if(parameterList->isParameter(
"verbose_matrix"))
602 ShyLUbasker->Options.verbose_matrix_out = parameterList->get<
bool>(
"verbose_matrix");
603 ShyLUbaskerTr->Options.verbose_matrix_out = parameterList->get<
bool>(
"verbose_matrix");
605 if(parameterList->isParameter(
"btf"))
607 ShyLUbasker->Options.btf = parameterList->get<
bool>(
"btf");
608 ShyLUbaskerTr->Options.btf = parameterList->get<
bool>(
"btf");
610 if(parameterList->isParameter(
"use_metis"))
612 ShyLUbasker->Options.use_metis = parameterList->get<
bool>(
"use_metis");
613 ShyLUbaskerTr->Options.use_metis = parameterList->get<
bool>(
"use_metis");
615 if(parameterList->isParameter(
"run_nd_on_leaves"))
617 ShyLUbasker->Options.run_nd_on_leaves = parameterList->get<
bool>(
"run_nd_on_leaves");
618 ShyLUbaskerTr->Options.run_nd_on_leaves = parameterList->get<
bool>(
"run_nd_on_leaves");
620 if(parameterList->isParameter(
"transpose"))
623 const auto transpose = parameterList->get<
bool>(
"transpose");
625 this->control_.useTranspose_ =
true;
629 if(parameterList->isParameter(
"use_sequential_diag_facto"))
631 ShyLUbasker->Options.use_sequential_diag_facto = parameterList->get<
bool>(
"use_sequential_diag_facto");
632 ShyLUbaskerTr->Options.use_sequential_diag_facto = parameterList->get<
bool>(
"use_sequential_diag_facto");
634 if(parameterList->isParameter(
"user_fill"))
636 ShyLUbasker->Options.user_fill = parameterList->get<
double>(
"user_fill");
637 ShyLUbaskerTr->Options.user_fill = parameterList->get<
double>(
"user_fill");
639 if(parameterList->isParameter(
"prune"))
641 ShyLUbasker->Options.prune = parameterList->get<
bool>(
"prune");
642 ShyLUbaskerTr->Options.prune = parameterList->get<
bool>(
"prune");
644 if(parameterList->isParameter(
"replace_tiny_pivot"))
646 ShyLUbasker->Options.prune = parameterList->get<
bool>(
"replace_tiny_pivot");
647 ShyLUbaskerTr->Options.prune = parameterList->get<
bool>(
"replace_tiny_pivot");
649 if(parameterList->isParameter(
"btf_matching"))
651 ShyLUbasker->Options.btf_matching = parameterList->get<
int>(
"btf_matching");
652 ShyLUbaskerTr->Options.btf_matching = parameterList->get<
int>(
"btf_matching");
653 if (ShyLUbasker->Options.btf_matching == 1 || ShyLUbasker->Options.btf_matching == 2) {
654 ShyLUbasker->Options.matching =
true;
655 ShyLUbaskerTr->Options.matching =
true;
657 ShyLUbasker->Options.matching =
false;
658 ShyLUbaskerTr->Options.matching =
false;
661 if(parameterList->isParameter(
"blk_matching"))
663 ShyLUbasker->Options.blk_matching = parameterList->get<
int>(
"blk_matching");
664 ShyLUbaskerTr->Options.blk_matching = parameterList->get<
int>(
"blk_matching");
666 if(parameterList->isParameter(
"min_block_size"))
668 ShyLUbasker->Options.min_block_size = parameterList->get<
int>(
"min_block_size");
669 ShyLUbaskerTr->Options.min_block_size = parameterList->get<
int>(
"min_block_size");
673 template <
class Matrix,
class Vector>
674 Teuchos::RCP<const Teuchos::ParameterList>
677 using Teuchos::ParameterList;
679 static Teuchos::RCP<const Teuchos::ParameterList> valid_params;
681 if( is_null(valid_params) )
683 Teuchos::RCP<Teuchos::ParameterList> pl = Teuchos::parameterList();
684 pl->set(
"IsContiguous",
true,
685 "Are GIDs contiguous");
686 pl->set(
"num_threads", 1,
687 "Number of threads");
688 pl->set(
"pivot",
false,
690 pl->set(
"delayed pivot", 0,
691 "Apply static delayed pivot on a big block");
692 pl->set(
"pivot_tol", .0001,
693 "Tolerance before pivot, currently not used");
694 pl->set(
"symmetric",
false,
695 "Should Symbolic assume symmetric nonzero pattern");
696 pl->set(
"realloc" ,
false,
697 "Should realloc space if not enough");
698 pl->set(
"verbose",
false,
699 "Information about factoring");
700 pl->set(
"verbose_matrix",
false,
701 "Give Permuted Matrices");
704 pl->set(
"prune",
false,
705 "Use prune on BTF blocks (Not Supported)");
706 pl->set(
"btf_matching", 2,
707 "Matching option for BTF: 0 = none, 1 = Basker, 2 = Trilinos (default), (3 = MC64 if enabled)");
708 pl->set(
"blk_matching", 1,
709 "Matching optioon for block: 0 = none, 1 or anything else = Basker (default), (2 = MC64 if enabled)");
710 pl->set(
"min_block_size", 0,
711 "Size of the minimum diagonal blocks");
712 pl->set(
"replace_tiny_pivot",
true,
713 "Replace tiny pivots during the numerical factorization");
714 pl->set(
"use_metis",
true,
716 pl->set(
"run_nd_on_leaves",
false,
717 "Run ND on the final leaf-nodes");
718 pl->set(
"transpose",
false,
719 "Solve the transpose A");
720 pl->set(
"use_sequential_diag_facto",
false,
721 "Use sequential algorithm to factor each diagonal block");
722 pl->set(
"user_fill", (
double)BASKER_FILL_USER,
723 "User-provided padding for the fill ratio");
730 template <
class Matrix,
class Vector>
735 if(current_phase == SOLVE)
return (
false);
737 #ifdef HAVE_AMESOS2_TIMERS 738 Teuchos::TimeMonitor convTimer(this->timers_.mtxConvTime_);
743 if ( single_proc_optimization() ) {
752 nzvals_.resize(this->globalNumNonZeros_);
753 rowind_.resize(this->globalNumNonZeros_);
754 colptr_.resize(this->globalNumCols_ + 1);
757 local_ordinal_type nnz_ret = 0;
759 #ifdef HAVE_AMESOS2_TIMERS 760 Teuchos::TimeMonitor mtxRedistTimer( this->timers_.mtxRedistTime_ );
763 if ( is_contiguous_ ==
true ) {
764 Util::get_ccs_helper<
766 ::do_get(this->matrixA_.ptr(), nzvals_(), rowind_(), colptr_(),
770 Util::get_ccs_helper<
772 ::do_get(this->matrixA_.ptr(), nzvals_(), rowind_(), colptr_(),
778 TEUCHOS_TEST_FOR_EXCEPTION( nnz_ret != as<local_ordinal_type>(this->globalNumNonZeros_),
780 "Amesos2_ShyLUBasker loadA_impl: Did not get the expected number of non-zero vals");
788 template<
class Matrix,
class Vector>
794 #endif // AMESOS2_SHYLUBASKER_DEF_HPP bool single_proc_optimization() const
can we optimize size_type and ordinal_type for straight pass through, also check that is_contiguous_ ...
Definition: Amesos2_ShyLUBasker_def.hpp:156
EPhase
Used to indicate a phase in the direct solution.
Definition: Amesos2_TypeDecl.hpp:65
Amesos2 interface to the Baker package.
Definition: Amesos2_ShyLUBasker_decl.hpp:76
Helper class for getting 1-D copies of multivectors.
Definition: Amesos2_MultiVecAdapter_decl.hpp:266
Definition: Amesos2_TypeDecl.hpp:143
int preOrdering_impl()
Performs pre-ordering on the matrix to increase efficiency.
Definition: Amesos2_ShyLUBasker_def.hpp:162
void transpose(ArrayView< Scalar > vals, ArrayView< GlobalOrdinal > indices, ArrayView< GlobalSizeT > ptr, ArrayView< Scalar > trans_vals, ArrayView< GlobalOrdinal > trans_indices, ArrayView< GlobalSizeT > trans_ptr)
Helper struct for getting pointers to the MV data - only used when number of vectors = 1 and single M...
Definition: Amesos2_MultiVecAdapter_decl.hpp:218
Definition: Amesos2_AbstractConcreteMatrixAdapter.hpp:48
int solve_impl(const Teuchos::Ptr< MultiVecAdapter< Vector > > X, const Teuchos::Ptr< const MultiVecAdapter< Vector > > B) const
ShyLUBasker specific solve.
Definition: Amesos2_ShyLUBasker_def.hpp:416
Amesos2 ShyLUBasker declarations.
bool loadA_impl(EPhase current_phase)
Reads matrix data into internal structures.
Definition: Amesos2_ShyLUBasker_def.hpp:732
A Matrix adapter interface for Amesos2.
Definition: Amesos2_MatrixAdapter_decl.hpp:76
int numericFactorization_impl()
ShyLUBasker specific numeric factorization.
Definition: Amesos2_ShyLUBasker_def.hpp:280
bool matrixShapeOK_impl() const
Determines whether the shape of the matrix is OK for this solver.
Definition: Amesos2_ShyLUBasker_def.hpp:544
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters_impl() const
Definition: Amesos2_ShyLUBasker_def.hpp:675
Definition: Amesos2_TypeDecl.hpp:127
Helper class for putting 1-D data arrays into multivectors.
Definition: Amesos2_MultiVecAdapter_decl.hpp:372
A templated MultiVector class adapter for Amesos2.
Definition: Amesos2_MultiVecAdapter_decl.hpp:176
Definition: Amesos2_TypeDecl.hpp:128