53#ifndef AMESOS2_SOLVERCORE_DEF_HPP
54#define AMESOS2_SOLVERCORE_DEF_HPP
56#include "Kokkos_ArithTraits.hpp"
58#include "Amesos2_MatrixAdapter_def.hpp"
59#include "Amesos2_MultiVecAdapter_def.hpp"
63#include "KokkosSparse_spmv.hpp"
64#include "KokkosBlas.hpp"
69template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
71 Teuchos::RCP<const Matrix> A,
72 Teuchos::RCP<Vector> X,
73 Teuchos::RCP<const Vector> B )
74 :
matrixA_(createConstMatrixAdapter<Matrix>(A))
86 TEUCHOS_TEST_FOR_EXCEPTION(
88 std::invalid_argument,
89 "Matrix shape inappropriate for this solver");
94template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
101template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
105#ifdef HAVE_AMESOS2_TIMERS
106 Teuchos::TimeMonitor LocalTimer1(
timers_.totalTime_);
111 static_cast<solver_type*
>(
this)->preOrdering_impl();
113 status_.last_phase_ = PREORDERING;
119template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
123#ifdef HAVE_AMESOS2_TIMERS
124 Teuchos::TimeMonitor LocalTimer1(
timers_.totalTime_);
127 if( !
status_.preOrderingDone() ){
134 static_cast<solver_type*
>(
this)->symbolicFactorization_impl();
136 status_.last_phase_ = SYMBFACT;
142template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
146#ifdef HAVE_AMESOS2_TIMERS
147 Teuchos::TimeMonitor LocalTimer1(
timers_.totalTime_);
150 if( !
status_.symbolicFactorizationDone() ){
157 static_cast<solver_type*
>(
this)->numericFactorization_impl();
165template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
172template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
175 const Teuchos::Ptr<const Vector> B)
const
177#ifdef HAVE_AMESOS2_TIMERS
178 Teuchos::TimeMonitor LocalTimer1(
timers_.totalTime_);
189 const Teuchos::RCP<MultiVecAdapter<Vector> > x =
191 const Teuchos::RCP<const MultiVecAdapter<Vector> > b =
192 createConstMultiVecAdapter<Vector>(Teuchos::rcpFromPtr(B));
194#ifdef HAVE_AMESOS2_DEBUG
196 TEUCHOS_TEST_FOR_EXCEPTION
197 (x->getGlobalLength() != matrixA_->getGlobalNumCols(),
198 std::invalid_argument,
199 "MultiVector X must have length equal to the number of "
200 "global columns in A. X->getGlobalLength() = "
201 << x->getGlobalLength() <<
" != A->getGlobalNumCols() = "
202 << matrixA_->getGlobalNumCols() <<
".");
204 TEUCHOS_TEST_FOR_EXCEPTION(b->getGlobalLength() != matrixA_->getGlobalNumRows(),
205 std::invalid_argument,
206 "MultiVector B must have length equal to the number of "
209 TEUCHOS_TEST_FOR_EXCEPTION(x->getGlobalNumVectors() != b->getGlobalNumVectors(),
210 std::invalid_argument,
211 "X and B MultiVectors must have the same number of vectors");
214 if( !
status_.numericFactorizationDone() ){
217 const_cast<type&
>(*this).numericFactorization();
220 static_cast<const solver_type*
>(
this)->solve_impl(Teuchos::outArg(*x), Teuchos::ptrInArg(*b));
222 status_.last_phase_ = SOLVE;
225template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
229 solve(Teuchos::ptr(X), Teuchos::ptr(B));
233template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
235SolverCore<ConcreteSolver,Matrix,Vector>::solve_ir(
const int maxNumIters,
const bool verbose)
240template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
242SolverCore<ConcreteSolver,Matrix,Vector>::solve_ir(Vector* X,
const Vector* B,
const int maxNumIters,
const bool verbose)
const
244 return solve_ir(Teuchos::ptr(X), Teuchos::ptr(B), maxNumIters, verbose);
247template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
249SolverCore<ConcreteSolver,Matrix,Vector>::solve_ir(
const Teuchos::Ptr< Vector> x,
250 const Teuchos::Ptr<const Vector> b,
251 const int maxNumIters,
252 const bool verbose)
const
254 using KAT = Kokkos::ArithTraits<scalar_type>;
255 using impl_scalar_type =
typename KAT::val_type;
256 using magni_type =
typename KAT::mag_type;
257 using host_execution_space = Kokkos::DefaultHostExecutionSpace;
258 using host_crsmat_t = KokkosSparse::CrsMatrix<impl_scalar_type, int, host_execution_space, void, int>;
259 using host_graph_t =
typename host_crsmat_t::StaticCrsGraphType;
260 using host_values_t =
typename host_crsmat_t::values_type::non_const_type;
261 using host_row_map_t =
typename host_graph_t::row_map_type::non_const_type;
262 using host_colinds_t =
typename host_graph_t::entries_type::non_const_type;
263 using host_mvector_t = Kokkos::View<impl_scalar_type **, Kokkos::LayoutLeft, host_execution_space>;
264 using host_vector_t = Kokkos::View<impl_scalar_type *, Kokkos::LayoutLeft, host_execution_space>;
265 using host_magni_view = Kokkos::View<magni_type *, Kokkos::LayoutLeft, host_execution_space>;
267 const impl_scalar_type one(1.0);
268 const impl_scalar_type mone = impl_scalar_type(-one);
269 const magni_type eps = KAT::eps ();
274 Teuchos::RCP<const MVAdapter> B = createConstMultiVecAdapter<Vector>(Teuchos::rcpFromPtr(b));
276 auto r_ = B->clone();
277 auto e_ = X->clone();
283 const size_t nrhs = X->getGlobalNumVectors();
284 const int nnz = this->
matrixA_->getGlobalNNZ();
285 const int nrows = this->
matrixA_->getGlobalNumRows();
288 host_crsmat_t crsmat;
289 host_graph_t static_graph;
290 host_row_map_t rowmap_view;
291 host_colinds_t colind_view;
292 host_values_t values_view;
294 Kokkos::resize(rowmap_view, 1+nrows);
295 Kokkos::resize(colind_view, nnz);
296 Kokkos::resize(values_view, nnz);
298 Kokkos::resize(rowmap_view, 1);
299 Kokkos::resize(colind_view, 0);
300 Kokkos::resize(values_view, 0);
307 values_view, colind_view, rowmap_view,
311 static_graph = host_graph_t(colind_view, rowmap_view);
312 crsmat = host_crsmat_t(
"CrsMatrix", nrows, values_view, static_graph);
317 static_cast<const solver_type*
>(
this)->solve_impl(Teuchos::outArg(*X), Teuchos::ptrInArg(*B));
321 const int ldx = (this->
root_ ? X->getGlobalLength() : 0);
322 const int ldb = (this->
root_ ? B->getGlobalLength() : 0);
323 const int ldr = (this->
root_ ? R->getGlobalLength() : 0);
324 const int lde = (this->
root_ ? E->getGlobalLength() : 0);
325 const bool initialize_data =
true;
326 const bool not_initialize_data =
true;
327 host_mvector_t X_view;
328 host_mvector_t B_view;
329 host_mvector_t R_view;
330 host_mvector_t E_view;
333 auto Xptr = Teuchos::Ptr< MVAdapter>(X.ptr());
334 auto Bptr = Teuchos::Ptr<const MVAdapter>(B.ptr());
335 auto Rptr = Teuchos::Ptr< MVAdapter>(R.ptr());
336 auto Eptr = Teuchos::Ptr< MVAdapter>(E.ptr());
337 Util::get_1d_copy_helper_kokkos_view<MVAdapter, host_mvector_t>::
339 Util::get_1d_copy_helper_kokkos_view<MVAdapter, host_mvector_t>::
341 Util::get_1d_copy_helper_kokkos_view<MVAdapter, host_mvector_t>::
343 Util::get_1d_copy_helper_kokkos_view<MVAdapter, host_mvector_t>::
347 host_magni_view x0norms(
"x0norms", nrhs);
348 host_magni_view bnorms(
"bnorms", nrhs);
349 host_magni_view enorms(
"enorms", nrhs);
352 for (
size_t j = 0; j < nrhs; j++) {
353 auto x_subview = Kokkos::subview(X_view, Kokkos::ALL(), j);
354 host_vector_t x_1d (
const_cast<impl_scalar_type*
>(x_subview.data()), x_subview.extent(0));
355 x0norms(j) = KokkosBlas::nrm2(x_1d);
358 std::cout << std::endl
359 <<
" SolverCore :: solve_ir (maxNumIters = " << maxNumIters
360 <<
", tol = " << x0norms(0) <<
" * " << eps <<
" = " << x0norms(0)*eps
366 std::cout <<
" bnorm = ";
367 for (
size_t j = 0; j < nrhs; j++) {
368 auto b_subview = Kokkos::subview(B_view, Kokkos::ALL(), j);
369 host_vector_t b_1d (
const_cast<impl_scalar_type*
>(b_subview.data()), b_subview.extent(0));
370 bnorms(j) = KokkosBlas::nrm2(b_1d);
371 std::cout << bnorms(j) <<
", ";
373 std::cout << std::endl;
382 for (numIters = 0; numIters < maxNumIters && converged == 0; ++numIters) {
385 Kokkos::deep_copy(R_view, B_view);
386 KokkosSparse::spmv(
"N", mone, crsmat, X_view, one, R_view);
391 std::cout <<
" > " << numIters <<
" : norm(r,x,e) = ";
392 for (
size_t j = 0; j < nrhs; j++) {
393 auto r_subview = Kokkos::subview(R_view, Kokkos::ALL(), j);
394 auto x_subview = Kokkos::subview(X_view, Kokkos::ALL(), j);
395 host_vector_t r_1d (
const_cast<impl_scalar_type*
>(r_subview.data()), r_subview.extent(0));
396 host_vector_t x_1d (
const_cast<impl_scalar_type*
>(x_subview.data()), x_subview.extent(0));
397 impl_scalar_type rnorm = KokkosBlas::nrm2(r_1d);
398 impl_scalar_type xnorm = KokkosBlas::nrm2(x_1d);
399 std::cout << rnorm <<
" -> " << rnorm/bnorms(j) <<
" " << xnorm <<
" " << enorms(j) <<
", ";
401 std::cout << std::endl;
406 Util::put_1d_data_helper_kokkos_view<MVAdapter, host_mvector_t>::
407 do_put(Rptr, R_view, ldr, CONTIGUOUS_AND_ROOTED, rowIndexBase);
408 static_cast<const solver_type*
>(
this)->solve_impl(Teuchos::outArg(*E), Teuchos::ptrInArg(*R));
409 Util::get_1d_copy_helper_kokkos_view<MVAdapter, host_mvector_t>::
410 do_get(initialize_data, Eptr, E_view, lde, CONTIGUOUS_AND_ROOTED, rowIndexBase);
414 KokkosBlas::axpy(one, E_view, X_view);
416 if (numIters < maxNumIters-1) {
419 for (
size_t j = 0; j < nrhs; j++) {
420 auto e_subview = Kokkos::subview(E_view, Kokkos::ALL(), j);
421 host_vector_t e_1d (
const_cast<impl_scalar_type*
>(e_subview.data()), e_subview.extent(0));
422 enorms(j) = KokkosBlas::nrm2(e_1d);
423 if (enorms(j) > eps * x0norms(j)) {
427 if (verbose && converged) {
428 std::cout <<
" converged " << std::endl;
434 Teuchos::broadcast(*(this->matrixA_->getComm()), 0, &converged);
437 if (verbose && this->root_) {
439 Kokkos::deep_copy(R_view, B_view);
440 KokkosSparse::spmv(
"N", mone, crsmat, X_view, one, R_view);
442 std::cout <<
" > final residual norm = ";
443 for (
size_t j = 0; j < nrhs; j++) {
444 auto r_subview = Kokkos::subview(R_view, Kokkos::ALL(), j);
445 host_vector_t r_1d (
const_cast<impl_scalar_type*
>(r_subview.data()), r_subview.extent(0));
446 scalar_type rnorm = KokkosBlas::nrm2(r_1d);
447 std::cout << rnorm <<
" -> " << rnorm/bnorms(j) <<
", ";
449 std::cout << std::endl << std::endl;
453 Util::put_1d_data_helper_kokkos_view<MVAdapter, host_mvector_t>::
454 do_put(Xptr, X_view, ldx, CONTIGUOUS_AND_ROOTED, rowIndexBase);
459template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
463#ifdef HAVE_AMESOS2_TIMERS
464 Teuchos::TimeMonitor LocalTimer1(
timers_.totalTime_);
467 return(
static_cast<solver_type*
>(
this)->matrixShapeOK_impl() );
473template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
478 matrixA_ = createConstMatrixAdapter(a);
480#ifdef HAVE_AMESOS2_DEBUG
481 TEUCHOS_TEST_FOR_EXCEPTION( (keep_phase != CLEAN) &&
484 std::invalid_argument,
485 "Dimensions of new matrix be the same as the old matrix if "
486 "keeping any solver phase" );
489 status_.last_phase_ = keep_phase;
516template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
519 const Teuchos::RCP<Teuchos::ParameterList> & parameterList )
521#ifdef HAVE_AMESOS2_TIMERS
522 Teuchos::TimeMonitor LocalTimer1(
timers_.totalTime_);
525 if( parameterList->name() ==
"Amesos2" ){
528 parameterList->validateParameters(*valid_params);
531 control_.setControlParameters(parameterList);
535 if( parameterList->isSublist(
name()) ){
538 control_.setControlParameters(Teuchos::sublist(parameterList,
name()));
540 static_cast<solver_type*
>(
this)->setParameters_impl(Teuchos::sublist(parameterList,
name()));
548template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
549Teuchos::RCP<const Teuchos::ParameterList>
552#ifdef HAVE_AMESOS2_TIMERS
553 Teuchos::TimeMonitor LocalTimer1(
timers_.totalTime_ );
556 using Teuchos::ParameterList;
561 RCP<ParameterList> control_params = rcp(
new ParameterList(
"Amesos2"));
562 control_params->set(
"Transpose",
false,
"Whether to solve with the matrix transpose");
563 control_params->set(
"Iterative refinement",
false,
"Whether to solve with iterative refinement");
564 control_params->set(
"Number of iterative refinements", 2,
"Number of iterative refinements");
565 control_params->set(
"Verboes for iterative refinement",
false,
"Verbosity for iterative refinements");
571 RCP<const ParameterList>
572 solver_params =
static_cast<const solver_type*
>(
this)->getValidParameters_impl();
574 Teuchos::rcp_const_cast<ParameterList>(solver_params)->set(
"Transpose",
false,
575 "Whether to solve with the "
578 RCP<ParameterList> amesos2_params = rcp(
new ParameterList(
"Amesos2"));
579 amesos2_params->setParameters(*control_params);
580 amesos2_params->set(
name(), *solver_params);
582 return amesos2_params;
586template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
590 std::ostringstream oss;
591 oss <<
name() <<
" solver interface";
596template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
599 Teuchos::FancyOStream &out,
600 const Teuchos::EVerbosityLevel verbLevel)
const
605 using Teuchos::VERB_DEFAULT;
606 using Teuchos::VERB_NONE;
607 using Teuchos::VERB_LOW;
608 using Teuchos::VERB_MEDIUM;
609 using Teuchos::VERB_HIGH;
610 using Teuchos::VERB_EXTREME;
611 Teuchos::EVerbosityLevel vl = verbLevel;
612 if (vl == VERB_DEFAULT) vl = VERB_LOW;
613 Teuchos::RCP<const Teuchos::Comm<int> > comm = this->
getComm();
618 width = std::max<size_t>(width,
size_t(11)) + 2;
619 Teuchos::OSTab tab(out);
627 if( vl != VERB_NONE ) {
628 std::string p =
name();
630 out << this->
description() << std::endl << std::endl;
635 if( vl == VERB_MEDIUM || vl == VERB_HIGH || vl == VERB_EXTREME ){
636 out << p <<
"Nonzero elements per row = "
639 out << p <<
"Percentage of nonzero elements = "
643 if( vl == VERB_HIGH || vl == VERB_EXTREME ){
644 out << p <<
"Use transpose = " <<
control_.useTranspose_
646 out << p <<
"Use iterative refinement = " <<
control_.useIterRefine_
649 if ( vl == VERB_EXTREME ){
657template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
660 Teuchos::FancyOStream &out,
661 const Teuchos::EVerbosityLevel verbLevel)
const
665 double preTime =
timers_.preOrderTime_.totalElapsedTime();
666 double symTime =
timers_.symFactTime_.totalElapsedTime();
667 double numTime =
timers_.numFactTime_.totalElapsedTime();
668 double solTime =
timers_.solveTime_.totalElapsedTime();
669 double totTime =
timers_.totalTime_.totalElapsedTime();
670 double overhead = totTime - (preTime + symTime + numTime + solTime);
672 std::string p =
name() +
" : ";
675 if(verbLevel != Teuchos::VERB_NONE)
677 out << p <<
"Time to convert matrix to implementation format = "
678 <<
timers_.mtxConvTime_.totalElapsedTime() <<
" (s)"
680 out << p <<
"Time to redistribute matrix = "
681 <<
timers_.mtxRedistTime_.totalElapsedTime() <<
" (s)"
684 out << p <<
"Time to convert vectors to implementation format = "
685 <<
timers_.vecConvTime_.totalElapsedTime() <<
" (s)"
687 out << p <<
"Time to redistribute vectors = "
688 <<
timers_.vecRedistTime_.totalElapsedTime() <<
" (s)"
691 out << p <<
"Number of pre-orderings = "
694 out << p <<
"Time for pre-ordering = "
695 << preTime <<
" (s), avg = "
696 << preTime /
status_.getNumPreOrder() <<
" (s)"
699 out << p <<
"Number of symbolic factorizations = "
700 <<
status_.getNumSymbolicFact()
702 out << p <<
"Time for sym fact = "
703 << symTime <<
" (s), avg = "
704 << symTime /
status_.getNumSymbolicFact() <<
" (s)"
707 out << p <<
"Number of numeric factorizations = "
710 out << p <<
"Time for num fact = "
711 << numTime <<
" (s), avg = "
712 << numTime /
status_.getNumNumericFact() <<
" (s)"
715 out << p <<
"Number of solve phases = "
718 out << p <<
"Time for solve = "
719 << solTime <<
" (s), avg = "
720 << solTime /
status_.getNumSolve() <<
" (s)"
723 out << p <<
"Total time spent in Amesos2 = "
726 out << p <<
"Total time spent in the Amesos2 interface = "
727 << overhead <<
" (s)"
729 out << p <<
" (the above time does not include solver time)"
731 out << p <<
"Amesos2 interface time / total time = "
732 << overhead / totTime
739template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
742 Teuchos::ParameterList& timingParameterList)
const
744 Teuchos::ParameterList temp;
745 timingParameterList = temp.setName(
"NULL");
749template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
753 std::string solverName = solver_type::name;
757template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
761 matrix_loaded_ =
static_cast<solver_type*
>(
this)->loadA_impl(current_phase);
@ ROOTED
Definition Amesos2_TypeDecl.hpp:127
@ CONTIGUOUS_AND_ROOTED
Definition Amesos2_TypeDecl.hpp:128
@ ARBITRARY
Definition Amesos2_TypeDecl.hpp:143
Utility functions for Amesos2.
A Matrix adapter interface for Amesos2.
Definition Amesos2_MatrixAdapter_decl.hpp:76
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
Definition Amesos2_SolverCore_def.hpp:598
int nprocs_
Number of process images in the matrix communicator.
Definition Amesos2_SolverCore_decl.hpp:509
super_type & numericFactorization()
Performs numeric factorization on the matrix A.
Definition Amesos2_SolverCore_def.hpp:144
void printTiming(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
Prints timing information about the current solver.
Definition Amesos2_SolverCore_def.hpp:659
Teuchos::RCP< const MatrixAdapter< Matrix > > matrixA_
The LHS operator.
Definition Amesos2_SolverCore_decl.hpp:455
std::string description() const
Returns a short description of this Solver.
Definition Amesos2_SolverCore_def.hpp:588
int rank_
The MPI rank of this image.
Definition Amesos2_SolverCore_decl.hpp:503
bool root_
If true, then this is the root processor.
Definition Amesos2_SolverCore_decl.hpp:506
SolverCore(Teuchos::RCP< const Matrix > A, Teuchos::RCP< Vector > X, Teuchos::RCP< const Vector > B)
Initialize a Solver instance.
Definition Amesos2_SolverCore_def.hpp:70
super_type & setParameters(const Teuchos::RCP< Teuchos::ParameterList > ¶meterList)
Set/update internal variables and solver options.
Definition Amesos2_SolverCore_def.hpp:518
void getTiming(Teuchos::ParameterList &timingParameterList) const
Extracts timing information from the current solver.
Definition Amesos2_SolverCore_def.hpp:741
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Return a const parameter list of all of the valid parameters that this->setParameterList(....
Definition Amesos2_SolverCore_def.hpp:550
global_size_type rowIndexBase_
Index base of rowmap of matrixA_.
Definition Amesos2_SolverCore_decl.hpp:485
std::string name() const
Return the name of this solver.
Definition Amesos2_SolverCore_def.hpp:751
global_size_type globalNumCols_
Number of global columns in matrixA_.
Definition Amesos2_SolverCore_decl.hpp:479
void setA(const Teuchos::RCP< const Matrix > a, EPhase keep_phase=CLEAN)
Sets the matrix A of this solver.
Definition Amesos2_SolverCore_def.hpp:475
void loadA(EPhase current_phase)
Refresh this solver's internal data about A.
Definition Amesos2_SolverCore_def.hpp:759
bool matrix_loaded_
Definition Amesos2_SolverCore_decl.hpp:462
global_size_type columnIndexBase_
Index base of column map of matrixA_.
Definition Amesos2_SolverCore_decl.hpp:488
Timers timers_
Various timing statistics.
Definition Amesos2_SolverCore_decl.hpp:497
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
Returns a pointer to the Teuchos::Comm communicator with this operator.
Definition Amesos2_SolverCore_decl.hpp:363
global_size_type globalNumNonZeros_
Number of global non-zero values in matrixA_.
Definition Amesos2_SolverCore_decl.hpp:482
global_size_type globalNumRows_
Number of global rows in matrixA_.
Definition Amesos2_SolverCore_decl.hpp:476
Status status_
Holds status information about a solver.
Definition Amesos2_SolverCore_decl.hpp:491
~SolverCore()
Destructor.
Definition Amesos2_SolverCore_def.hpp:95
Teuchos::RCP< const Vector > multiVecB_
The RHS vector/multi-vector.
Definition Amesos2_SolverCore_decl.hpp:473
void solve()
Solves (or )
Definition Amesos2_SolverCore_def.hpp:167
Control control_
Parameters for solving.
Definition Amesos2_SolverCore_decl.hpp:494
bool matrixShapeOK()
Returns true if the solver can handle this matrix shape.
Definition Amesos2_SolverCore_def.hpp:461
super_type & symbolicFactorization()
Performs symbolic factorization on the matrix A.
Definition Amesos2_SolverCore_def.hpp:121
Teuchos::RCP< Vector > multiVecX_
The LHS vector/multi-vector.
Definition Amesos2_SolverCore_decl.hpp:466
super_type & preOrdering()
Pre-orders the matrix A for minimal fill-in.
Definition Amesos2_SolverCore_def.hpp:103
Interface to Amesos2 solver objects.
Definition Amesos2_Solver_decl.hpp:78
EPhase
Used to indicate a phase in the direct solution.
Definition Amesos2_TypeDecl.hpp:65
void printLine(Teuchos::FancyOStream &out)
Prints a line of 70 "-"s on std::cout.
Definition Amesos2_Util.cpp:119
A templated MultiVector class adapter for Amesos2.
Definition Amesos2_MultiVecAdapter_decl.hpp:176
Teuchos::RCP< MultiVecAdapter< MV > > createMultiVecAdapter(Teuchos::RCP< MV > mv)
Factory creation method for MultiVecAdapters.
Definition Amesos2_MultiVecAdapter_decl.hpp:188
Similar to get_ccs_helper , but used to get a CRS representation of the given matrix.
Definition Amesos2_Util.hpp:663