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 int error_code =
static_cast<solver_type*
>(
this)->preOrdering_impl();
112 if (error_code == EXIT_SUCCESS){
114 status_.last_phase_ = PREORDERING;
121template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
125#ifdef HAVE_AMESOS2_TIMERS
126 Teuchos::TimeMonitor LocalTimer1(
timers_.totalTime_);
129 if( !
status_.preOrderingDone() ){
136 int error_code =
static_cast<solver_type*
>(
this)->symbolicFactorization_impl();
137 if (error_code == EXIT_SUCCESS){
139 status_.last_phase_ = SYMBFACT;
146template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
150#ifdef HAVE_AMESOS2_TIMERS
151 Teuchos::TimeMonitor LocalTimer1(
timers_.totalTime_);
154 if( !
status_.symbolicFactorizationDone() ){
161 int error_code =
static_cast<solver_type*
>(
this)->numericFactorization_impl();
162 if (error_code == EXIT_SUCCESS){
171template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
178template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
181 const Teuchos::Ptr<const Vector> B)
const
183#ifdef HAVE_AMESOS2_TIMERS
184 Teuchos::TimeMonitor LocalTimer1(
timers_.totalTime_);
195 const Teuchos::RCP<MultiVecAdapter<Vector> > x =
197 const Teuchos::RCP<const MultiVecAdapter<Vector> > b =
198 createConstMultiVecAdapter<Vector>(Teuchos::rcpFromPtr(B));
200#ifdef HAVE_AMESOS2_DEBUG
202 TEUCHOS_TEST_FOR_EXCEPTION
203 (x->getGlobalLength() !=
matrixA_->getGlobalNumCols(),
204 std::invalid_argument,
205 "MultiVector X must have length equal to the number of "
206 "global columns in A. X->getGlobalLength() = "
207 << x->getGlobalLength() <<
" != A->getGlobalNumCols() = "
208 <<
matrixA_->getGlobalNumCols() <<
".");
210 TEUCHOS_TEST_FOR_EXCEPTION(b->getGlobalLength() !=
matrixA_->getGlobalNumRows(),
211 std::invalid_argument,
212 "MultiVector B must have length equal to the number of "
215 TEUCHOS_TEST_FOR_EXCEPTION(x->getGlobalNumVectors() != b->getGlobalNumVectors(),
216 std::invalid_argument,
217 "X and B MultiVectors must have the same number of vectors");
220 if( !
status_.numericFactorizationDone() ){
223 const_cast<type&
>(*this).numericFactorization();
226 int error_code =
static_cast<const solver_type*
>(
this)->solve_impl(Teuchos::outArg(*x), Teuchos::ptrInArg(*b));
227 if (error_code == EXIT_SUCCESS){
233template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
237 solve(Teuchos::ptr(X), Teuchos::ptr(B));
241template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
243SolverCore<ConcreteSolver,Matrix,Vector>::solve_ir(
const int maxNumIters,
const bool verbose)
245 return solve_ir(multiVecX_.ptr(), multiVecB_.ptr(), maxNumIters, verbose);
248template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
250SolverCore<ConcreteSolver,Matrix,Vector>::solve_ir(Vector* X,
const Vector* B,
const int maxNumIters,
const bool verbose)
const
252 return solve_ir(Teuchos::ptr(X), Teuchos::ptr(B), maxNumIters, verbose);
255template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
257SolverCore<ConcreteSolver,Matrix,Vector>::solve_ir(
const Teuchos::Ptr< Vector> x,
258 const Teuchos::Ptr<const Vector> b,
259 const int maxNumIters,
260 const bool verbose)
const
262 using KAT = Kokkos::ArithTraits<scalar_type>;
263 using impl_scalar_type =
typename KAT::val_type;
264 using magni_type =
typename KAT::mag_type;
265 using host_execution_space = Kokkos::DefaultHostExecutionSpace;
266 using host_crsmat_t = KokkosSparse::CrsMatrix<impl_scalar_type, int, host_execution_space, void, int>;
267 using host_graph_t =
typename host_crsmat_t::StaticCrsGraphType;
268 using host_values_t =
typename host_crsmat_t::values_type::non_const_type;
269 using host_row_map_t =
typename host_graph_t::row_map_type::non_const_type;
270 using host_colinds_t =
typename host_graph_t::entries_type::non_const_type;
271 using host_mvector_t = Kokkos::View<impl_scalar_type **, Kokkos::LayoutLeft, host_execution_space>;
272 using host_vector_t = Kokkos::View<impl_scalar_type *, Kokkos::LayoutLeft, host_execution_space>;
273 using host_magni_view = Kokkos::View<magni_type *, Kokkos::LayoutLeft, host_execution_space>;
275 const impl_scalar_type one(1.0);
276 const impl_scalar_type mone = impl_scalar_type(-one);
277 const magni_type eps = KAT::eps ();
282 Teuchos::RCP<const MVAdapter> B = createConstMultiVecAdapter<Vector>(Teuchos::rcpFromPtr(b));
284 auto r_ = B->clone();
285 auto e_ = X->clone();
291 const size_t nrhs = X->getGlobalNumVectors();
292 const int nnz = this->matrixA_->getGlobalNNZ();
293 const int nrows = this->matrixA_->getGlobalNumRows();
296 host_crsmat_t crsmat;
297 host_graph_t static_graph;
298 host_row_map_t rowmap_view;
299 host_colinds_t colind_view;
300 host_values_t values_view;
302 Kokkos::resize(rowmap_view, 1+nrows);
303 Kokkos::resize(colind_view, nnz);
304 Kokkos::resize(values_view, nnz);
306 Kokkos::resize(rowmap_view, 1);
307 Kokkos::resize(colind_view, 0);
308 Kokkos::resize(values_view, 0);
314 this->matrixA_.ptr(),
315 values_view, colind_view, rowmap_view,
319 static_graph = host_graph_t(colind_view, rowmap_view);
320 crsmat = host_crsmat_t(
"CrsMatrix", nrows, values_view, static_graph);
325 static_cast<const solver_type*
>(
this)->solve_impl(Teuchos::outArg(*X), Teuchos::ptrInArg(*B));
329 const int ldx = (this->root_ ? X->getGlobalLength() : 0);
330 const int ldb = (this->root_ ? B->getGlobalLength() : 0);
331 const int ldr = (this->root_ ? R->getGlobalLength() : 0);
332 const int lde = (this->root_ ? E->getGlobalLength() : 0);
333 const bool initialize_data =
true;
334 const bool not_initialize_data =
true;
335 host_mvector_t X_view;
336 host_mvector_t B_view;
337 host_mvector_t R_view;
338 host_mvector_t E_view;
340 global_size_type rowIndexBase = this->rowIndexBase_;
341 auto Xptr = Teuchos::Ptr< MVAdapter>(X.ptr());
342 auto Bptr = Teuchos::Ptr<const MVAdapter>(B.ptr());
343 auto Rptr = Teuchos::Ptr< MVAdapter>(R.ptr());
344 auto Eptr = Teuchos::Ptr< MVAdapter>(E.ptr());
345 Util::get_1d_copy_helper_kokkos_view<MVAdapter, host_mvector_t>::
347 Util::get_1d_copy_helper_kokkos_view<MVAdapter, host_mvector_t>::
349 Util::get_1d_copy_helper_kokkos_view<MVAdapter, host_mvector_t>::
351 Util::get_1d_copy_helper_kokkos_view<MVAdapter, host_mvector_t>::
355 host_magni_view x0norms(
"x0norms", nrhs);
356 host_magni_view bnorms(
"bnorms", nrhs);
357 host_magni_view enorms(
"enorms", nrhs);
360 for (
size_t j = 0; j < nrhs; j++) {
361 auto x_subview = Kokkos::subview(X_view, Kokkos::ALL(), j);
362 host_vector_t x_1d (
const_cast<impl_scalar_type*
>(x_subview.data()), x_subview.extent(0));
363 x0norms(j) = KokkosBlas::nrm2(x_1d);
366 std::cout << std::endl
367 <<
" SolverCore :: solve_ir (maxNumIters = " << maxNumIters
368 <<
", tol = " << x0norms(0) <<
" * " << eps <<
" = " << x0norms(0)*eps
374 std::cout <<
" bnorm = ";
375 for (
size_t j = 0; j < nrhs; j++) {
376 auto b_subview = Kokkos::subview(B_view, Kokkos::ALL(), j);
377 host_vector_t b_1d (
const_cast<impl_scalar_type*
>(b_subview.data()), b_subview.extent(0));
378 bnorms(j) = KokkosBlas::nrm2(b_1d);
379 std::cout << bnorms(j) <<
", ";
381 std::cout << std::endl;
390 for (numIters = 0; numIters < maxNumIters && converged == 0; ++numIters) {
393 Kokkos::deep_copy(R_view, B_view);
394 KokkosSparse::spmv(
"N", mone, crsmat, X_view, one, R_view);
399 std::cout <<
" > " << numIters <<
" : norm(r,x,e) = ";
400 for (
size_t j = 0; j < nrhs; j++) {
401 auto r_subview = Kokkos::subview(R_view, Kokkos::ALL(), j);
402 auto x_subview = Kokkos::subview(X_view, Kokkos::ALL(), j);
403 host_vector_t r_1d (
const_cast<impl_scalar_type*
>(r_subview.data()), r_subview.extent(0));
404 host_vector_t x_1d (
const_cast<impl_scalar_type*
>(x_subview.data()), x_subview.extent(0));
405 impl_scalar_type rnorm = KokkosBlas::nrm2(r_1d);
406 impl_scalar_type xnorm = KokkosBlas::nrm2(x_1d);
407 std::cout << rnorm <<
" -> " << rnorm/bnorms(j) <<
" " << xnorm <<
" " << enorms(j) <<
", ";
409 std::cout << std::endl;
414 Util::put_1d_data_helper_kokkos_view<MVAdapter, host_mvector_t>::
416 static_cast<const solver_type*
>(
this)->solve_impl(Teuchos::outArg(*E), Teuchos::ptrInArg(*R));
417 Util::get_1d_copy_helper_kokkos_view<MVAdapter, host_mvector_t>::
422 KokkosBlas::axpy(one, E_view, X_view);
424 if (numIters < maxNumIters-1) {
427 for (
size_t j = 0; j < nrhs; j++) {
428 auto e_subview = Kokkos::subview(E_view, Kokkos::ALL(), j);
429 host_vector_t e_1d (
const_cast<impl_scalar_type*
>(e_subview.data()), e_subview.extent(0));
430 enorms(j) = KokkosBlas::nrm2(e_1d);
431 if (enorms(j) > eps * x0norms(j)) {
435 if (verbose && converged) {
436 std::cout <<
" converged " << std::endl;
442 Teuchos::broadcast(*(this->matrixA_->getComm()), 0, &converged);
445 if (verbose && this->root_) {
447 Kokkos::deep_copy(R_view, B_view);
448 KokkosSparse::spmv(
"N", mone, crsmat, X_view, one, R_view);
450 std::cout <<
" > final residual norm = ";
451 for (
size_t j = 0; j < nrhs; j++) {
452 auto r_subview = Kokkos::subview(R_view, Kokkos::ALL(), j);
453 host_vector_t r_1d (
const_cast<impl_scalar_type*
>(r_subview.data()), r_subview.extent(0));
454 scalar_type rnorm = KokkosBlas::nrm2(r_1d);
455 std::cout << rnorm <<
" -> " << rnorm/bnorms(j) <<
", ";
457 std::cout << std::endl << std::endl;
461 Util::put_1d_data_helper_kokkos_view<MVAdapter, host_mvector_t>::
467template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
471#ifdef HAVE_AMESOS2_TIMERS
472 Teuchos::TimeMonitor LocalTimer1(
timers_.totalTime_);
475 return(
static_cast<solver_type*
>(
this)->matrixShapeOK_impl() );
481template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
486 matrixA_ = createConstMatrixAdapter(a);
488#ifdef HAVE_AMESOS2_DEBUG
489 TEUCHOS_TEST_FOR_EXCEPTION( (keep_phase != CLEAN) &&
492 std::invalid_argument,
493 "Dimensions of new matrix be the same as the old matrix if "
494 "keeping any solver phase" );
497 status_.last_phase_ = keep_phase;
524template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
527 const Teuchos::RCP<Teuchos::ParameterList> & parameterList )
529#ifdef HAVE_AMESOS2_TIMERS
530 Teuchos::TimeMonitor LocalTimer1(
timers_.totalTime_);
533 if( parameterList->name() ==
"Amesos2" ){
536 parameterList->validateParameters(*valid_params);
539 control_.setControlParameters(parameterList);
543 if( parameterList->isSublist(
name()) ){
546 control_.setControlParameters(Teuchos::sublist(parameterList,
name()));
548 static_cast<solver_type*
>(
this)->setParameters_impl(Teuchos::sublist(parameterList,
name()));
556template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
557Teuchos::RCP<const Teuchos::ParameterList>
560#ifdef HAVE_AMESOS2_TIMERS
561 Teuchos::TimeMonitor LocalTimer1(
timers_.totalTime_ );
564 using Teuchos::ParameterList;
569 RCP<ParameterList> control_params = rcp(
new ParameterList(
"Amesos2"));
570 control_params->set(
"Transpose",
false,
"Whether to solve with the matrix transpose");
571 control_params->set(
"Iterative refinement",
false,
"Whether to solve with iterative refinement");
572 control_params->set(
"Number of iterative refinements", 2,
"Number of iterative refinements");
573 control_params->set(
"Verboes for iterative refinement",
false,
"Verbosity for iterative refinements");
579 RCP<const ParameterList>
580 solver_params =
static_cast<const solver_type*
>(
this)->getValidParameters_impl();
582 Teuchos::rcp_const_cast<ParameterList>(solver_params)->set(
"Transpose",
false,
583 "Whether to solve with the "
586 RCP<ParameterList> amesos2_params = rcp(
new ParameterList(
"Amesos2"));
587 amesos2_params->setParameters(*control_params);
588 amesos2_params->set(
name(), *solver_params);
590 return amesos2_params;
594template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
598 std::ostringstream oss;
599 oss <<
name() <<
" solver interface";
604template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
607 Teuchos::FancyOStream &out,
608 const Teuchos::EVerbosityLevel verbLevel)
const
613 using Teuchos::VERB_DEFAULT;
614 using Teuchos::VERB_NONE;
615 using Teuchos::VERB_LOW;
616 using Teuchos::VERB_MEDIUM;
617 using Teuchos::VERB_HIGH;
618 using Teuchos::VERB_EXTREME;
619 Teuchos::EVerbosityLevel vl = verbLevel;
620 if (vl == VERB_DEFAULT) vl = VERB_LOW;
621 Teuchos::RCP<const Teuchos::Comm<int> > comm = this->
getComm();
626 width = std::max<size_t>(width,
size_t(11)) + 2;
627 Teuchos::OSTab tab(out);
635 if( vl != VERB_NONE ) {
636 std::string p =
name();
637 Util::printLine(out);
638 out << this->
description() << std::endl << std::endl;
643 if( vl == VERB_MEDIUM || vl == VERB_HIGH || vl == VERB_EXTREME ){
644 out << p <<
"Nonzero elements per row = "
647 out << p <<
"Percentage of nonzero elements = "
651 if( vl == VERB_HIGH || vl == VERB_EXTREME ){
652 out << p <<
"Use transpose = " <<
control_.useTranspose_
654 out << p <<
"Use iterative refinement = " <<
control_.useIterRefine_
657 if ( vl == VERB_EXTREME ){
660 Util::printLine(out);
665template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
668 Teuchos::FancyOStream &out,
669 const Teuchos::EVerbosityLevel verbLevel)
const
673 double preTime =
timers_.preOrderTime_.totalElapsedTime();
674 double symTime =
timers_.symFactTime_.totalElapsedTime();
675 double numTime =
timers_.numFactTime_.totalElapsedTime();
676 double solTime =
timers_.solveTime_.totalElapsedTime();
677 double totTime =
timers_.totalTime_.totalElapsedTime();
678 double overhead = totTime - (preTime + symTime + numTime + solTime);
680 std::string p =
name() +
" : ";
681 Util::printLine(out);
683 if(verbLevel != Teuchos::VERB_NONE)
685 out << p <<
"Time to convert matrix to implementation format = "
686 <<
timers_.mtxConvTime_.totalElapsedTime() <<
" (s)"
688 out << p <<
"Time to redistribute matrix = "
689 <<
timers_.mtxRedistTime_.totalElapsedTime() <<
" (s)"
692 out << p <<
"Time to convert vectors to implementation format = "
693 <<
timers_.vecConvTime_.totalElapsedTime() <<
" (s)"
695 out << p <<
"Time to redistribute vectors = "
696 <<
timers_.vecRedistTime_.totalElapsedTime() <<
" (s)"
699 out << p <<
"Number of pre-orderings = "
702 out << p <<
"Time for pre-ordering = "
703 << preTime <<
" (s), avg = "
704 << preTime /
status_.getNumPreOrder() <<
" (s)"
707 out << p <<
"Number of symbolic factorizations = "
708 <<
status_.getNumSymbolicFact()
710 out << p <<
"Time for sym fact = "
711 << symTime <<
" (s), avg = "
712 << symTime /
status_.getNumSymbolicFact() <<
" (s)"
715 out << p <<
"Number of numeric factorizations = "
718 out << p <<
"Time for num fact = "
719 << numTime <<
" (s), avg = "
720 << numTime /
status_.getNumNumericFact() <<
" (s)"
723 out << p <<
"Number of solve phases = "
726 out << p <<
"Time for solve = "
727 << solTime <<
" (s), avg = "
728 << solTime /
status_.getNumSolve() <<
" (s)"
731 out << p <<
"Total time spent in Amesos2 = "
734 out << p <<
"Total time spent in the Amesos2 interface = "
735 << overhead <<
" (s)"
737 out << p <<
" (the above time does not include solver time)"
739 out << p <<
"Amesos2 interface time / total time = "
740 << overhead / totTime
742 Util::printLine(out);
747template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
750 Teuchos::ParameterList& timingParameterList)
const
752 Teuchos::ParameterList temp;
753 timingParameterList = temp.setName(
"NULL");
757template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
761 std::string solverName = solver_type::name;
765template <
template <
class,
class>
class ConcreteSolver,
class Matrix,
class Vector >
769 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:606
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:148
void printTiming(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
Prints timing information about the current solver.
Definition Amesos2_SolverCore_def.hpp:667
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:596
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:526
void getTiming(Teuchos::ParameterList &timingParameterList) const
Extracts timing information from the current solver.
Definition Amesos2_SolverCore_def.hpp:749
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:558
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:759
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:483
void loadA(EPhase current_phase)
Refresh this solver's internal data about A.
Definition Amesos2_SolverCore_def.hpp:767
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:173
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:469
super_type & symbolicFactorization()
Performs symbolic factorization on the matrix A.
Definition Amesos2_SolverCore_def.hpp:123
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
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