escript  Revision_
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
paso::SystemMatrixAdapter Class Reference

#include <SystemMatrixAdapter.h>

Inheritance diagram for paso::SystemMatrixAdapter:
escript::AbstractSystemMatrix

List of all members.

Public Member Functions

 SystemMatrixAdapter ()
 Wrapper for paso::SystemMatrix.
 SystemMatrixAdapter (SystemMatrix_ptr system_matrix, const int row_blocksize, const escript::FunctionSpace &row_functionspace, const int column_blocksize, const escript::FunctionSpace &colum_functionspace)
 ~SystemMatrixAdapter ()
 Destructor for SystemMatrixAdapter. As specified in the constructor this deallocates the pointer given to the constructor.
SystemMatrix_ptr getPaso_SystemMatrix () const
 Returns the pointer to the system matrix.
const
escript::AbstractSystemMatrix
asAbstractSystemMatrix () const
 Returns the system matrix as a const AbstractSystemMatrix&.
void nullifyRowsAndCols (escript::Data &row_q, escript::Data &col_q, const double mdv) const
 nullifyRowsAndCols - calls SystemMatrix::nullifyRowsAndCols.
virtual void saveMM (const std::string &filename) const
 writes the matrix to a file using the Matrix Market file format
virtual void saveHB (const std::string &filename) const
 writes the matrix to a file using the Harwell-Boeing file format
virtual void resetValues () const
 sets the matrix entries to zero
void Print_Matrix_Info (const bool) const
 prints information about a system matrix

Static Public Member Functions

static const SystemMatrixAdapterasSystemMatrixAdapter (const AbstractSystemMatrix &systemmatrix)
 Returns a system matrix as a const SystemMatrixAdapter&.
static int mapOptionToPaso (const int option)
 maps escript options onto Paso options
static int getSystemMatrixTypeId (const int solver, const int preconditioner, const int package, const bool symmetry, Esys_MPIInfo *mpiInfo)
 returns the identifier of the matrix type to be used for the global stiffness matrix when the given solver, preconditioner and package is used
static void escriptToPasoOptions (Options *paso_options, const boost::python::object &options)
 extract paso options from SolutionOptions class
static void pasoToEscriptOptions (const Options *paso_options, boost::python::object &options)
 copies diagnostic data back to the solver options

Private Member Functions

virtual void setToSolution (escript::Data &out, escript::Data &in, boost::python::object &options) const
 solves the linear system this*out=in
virtual void ypAx (escript::Data &y, escript::Data &x) const
 performs y+=this*x

Private Attributes

SystemMatrix_ptr m_system_matrix

Constructor & Destructor Documentation

Wrapper for paso::SystemMatrix.

Description: Wrapper for paso::SystemMatrix. /brief Default Constructor for SystemMatrixAdapter. NB: Only throws an exception.

paso::SystemMatrixAdapter::SystemMatrixAdapter ( SystemMatrix_ptr  system_matrix,
const int  row_blocksize,
const escript::FunctionSpace row_functionspace,
const int  column_blocksize,
const escript::FunctionSpace colum_functionspace 
)

/brief Constructor for SystemMatrixAdapter.

Destructor for SystemMatrixAdapter. As specified in the constructor this deallocates the pointer given to the constructor.


Member Function Documentation

Returns the system matrix as a const AbstractSystemMatrix&.

static const SystemMatrixAdapter& paso::SystemMatrixAdapter::asSystemMatrixAdapter ( const AbstractSystemMatrix systemmatrix) [inline, static]

Returns a system matrix as a const SystemMatrixAdapter&.

void paso::SystemMatrixAdapter::escriptToPasoOptions ( Options paso_options,
const boost::python::object &  options 
) [static]

extract paso options from SolutionOptions class

References escript::SolverBuddy::_getRestartForC(), paso::Options::absolute_tolerance, paso::Options::accept_failed_convergence, escript::SolverBuddy::acceptConvergenceFailure(), paso::Options::adapt_inner_tolerance, escript::SolverBuddy::adaptInnerTolerance(), paso::Options::coarse_matrix_refinements, paso::Options::coarsening_method, paso::Options::coarsening_threshold, paso::Options::diagonal_dominance_threshold, paso::Options::drop_storage, paso::Options::drop_tolerance, escript::SolverBuddy::getAbsoluteTolerance(), escript::SolverBuddy::getAMGInterpolation(), escript::SolverBuddy::getCoarsening(), escript::SolverBuddy::getCoarseningThreshold(), escript::SolverBuddy::getDiagonalDominanceThreshold(), escript::SolverBuddy::getDropStorage(), escript::SolverBuddy::getDropTolerance(), escript::SolverBuddy::getInnerIterMax(), escript::SolverBuddy::getInnerTolerance(), escript::SolverBuddy::getIterMax(), escript::SolverBuddy::getLevelMax(), escript::SolverBuddy::getMinCoarseMatrixSize(), escript::SolverBuddy::getMinCoarseMatrixSparsity(), escript::SolverBuddy::getNumCoarseMatrixRefinements(), escript::SolverBuddy::getNumPostSweeps(), escript::SolverBuddy::getNumPreSweeps(), escript::SolverBuddy::getNumRefinements(), escript::SolverBuddy::getNumSweeps(), escript::SolverBuddy::getODESolver(), escript::SolverBuddy::getPackage(), escript::SolverBuddy::getPreconditioner(), escript::SolverBuddy::getRelaxationFactor(), escript::SolverBuddy::getReordering(), escript::SolverBuddy::getSmoother(), escript::SolverBuddy::getSolverMethod(), escript::SolverBuddy::getTolerance(), escript::SolverBuddy::getTruncation(), paso::Options::inner_iter_max, paso::Options::inner_tolerance, paso::Options::interpolation_method, escript::SolverBuddy::isSymmetric(), escript::SolverBuddy::isVerbose(), paso::Options::iter_max, paso::Options::level_max, mapOptionToPaso(), paso::Options::method, paso::Options::min_coarse_matrix_size, paso::Options::min_coarse_sparsity, paso::Options::ode_solver, paso::Options::package, paso::Options::post_sweeps, paso::Options::pre_sweeps, paso::Options::preconditioner, paso::Options::refinements, paso::Options::relaxation_factor, paso::Options::reordering, paso::Options::restart, paso::Options::setDefaults(), paso::Options::smoother, paso::Options::sweeps, paso::Options::symmetric, paso::Options::tolerance, paso::Options::truncation, paso::Options::use_local_preconditioner, escript::SolverBuddy::useLocalPreconditioner(), paso::Options::usePanel, escript::SolverBuddy::usePanel(), and paso::Options::verbose.

Referenced by paso::TransportProblemAdapter::setToSolution(), and setToSolution().

int paso::SystemMatrixAdapter::getSystemMatrixTypeId ( const int  solver,
const int  preconditioner,
const int  package,
const bool  symmetry,
Esys_MPIInfo mpiInfo 
) [static]

returns the identifier of the matrix type to be used for the global stiffness matrix when the given solver, preconditioner and package is used

References paso::checkPasoError(), and mapOptionToPaso().

int paso::SystemMatrixAdapter::mapOptionToPaso ( const int  option) [static]

maps escript options onto Paso options

References escript::ESCRIPT_AGGREGATION_COARSENING, escript::ESCRIPT_AMG, escript::ESCRIPT_AMLI, escript::ESCRIPT_BACKWARD_EULER, escript::ESCRIPT_BICGSTAB, escript::ESCRIPT_BOOMERAMG, escript::ESCRIPT_CGS, escript::ESCRIPT_CHOLEVSKY, escript::ESCRIPT_CIJP_COARSENING, escript::ESCRIPT_CIJP_FIXED_RANDOM_COARSENING, escript::ESCRIPT_CLASSIC_INTERPOLATION, escript::ESCRIPT_CLASSIC_INTERPOLATION_WITH_FF_COUPLING, escript::ESCRIPT_CR, escript::ESCRIPT_CRANK_NICOLSON, escript::ESCRIPT_DEFAULT, escript::ESCRIPT_DEFAULT_REORDERING, escript::ESCRIPT_DIRECT, escript::ESCRIPT_DIRECT_INTERPOLATION, escript::ESCRIPT_FALGOUT_COARSENING, escript::ESCRIPT_GAUSS_SEIDEL, escript::ESCRIPT_GMRES, escript::ESCRIPT_HMIS_COARSENING, escript::ESCRIPT_ILU0, escript::ESCRIPT_ILUT, escript::ESCRIPT_ITERATIVE, escript::ESCRIPT_JACOBI, escript::ESCRIPT_LINEAR_CRANK_NICOLSON, escript::ESCRIPT_LUMPING, escript::ESCRIPT_MINIMUM_FILL_IN, escript::ESCRIPT_MINRES, escript::ESCRIPT_MKL, escript::ESCRIPT_NESTED_DISSECTION, escript::ESCRIPT_NO_PRECONDITIONER, escript::ESCRIPT_NO_REORDERING, escript::ESCRIPT_NONLINEAR_GMRES, escript::ESCRIPT_PASO, escript::ESCRIPT_PASTIX, escript::ESCRIPT_PCG, escript::ESCRIPT_PMIS_COARSENING, escript::ESCRIPT_PRES20, escript::ESCRIPT_REC_ILU, escript::ESCRIPT_RILU, escript::ESCRIPT_RUGE_STUEBEN_COARSENING, escript::ESCRIPT_STANDARD_COARSENING, escript::ESCRIPT_SUPER_LU, escript::ESCRIPT_TFQMR, escript::ESCRIPT_TRILINOS, escript::ESCRIPT_UMFPACK, escript::ESCRIPT_YAIR_SHAPIRA_COARSENING, PASO_AGGREGATION_COARSENING, PASO_AMG, PASO_AMLI, PASO_BACKWARD_EULER, PASO_BICGSTAB, PASO_BOOMERAMG, PASO_CGS, PASO_CHOLEVSKY, PASO_CIJP_COARSENING, PASO_CIJP_FIXED_RANDOM_COARSENING, PASO_CLASSIC_INTERPOLATION, PASO_CLASSIC_INTERPOLATION_WITH_FF_COUPLING, PASO_CR, PASO_CRANK_NICOLSON, PASO_DEFAULT, PASO_DEFAULT_REORDERING, PASO_DIRECT, PASO_DIRECT_INTERPOLATION, PASO_FALGOUT_COARSENING, PASO_GAUSS_SEIDEL, PASO_GMRES, PASO_HMIS_COARSENING, PASO_ILU0, PASO_ILUT, PASO_ITERATIVE, PASO_JACOBI, PASO_LINEAR_CRANK_NICOLSON, PASO_LUMPING, PASO_MINIMUM_FILL_IN, PASO_MINRES, PASO_MKL, PASO_NESTED_DISSECTION, PASO_NO_PRECONDITIONER, PASO_NO_REORDERING, PASO_NONLINEAR_GMRES, PASO_PASO, PASO_PASTIX, PASO_PCG, PASO_PMIS_COARSENING, PASO_PRES20, PASO_REC_ILU, PASO_RILU, PASO_RUGE_STUEBEN_COARSENING, PASO_STANDARD_COARSENING, PASO_SUPER_LU, PASO_TFQMR, PASO_TRILINOS, PASO_UMFPACK, and PASO_YAIR_SHAPIRA_COARSENING.

Referenced by escriptToPasoOptions(), getSystemMatrixTypeId(), and paso::TransportProblemAdapter::getTransportTypeId().

void paso::SystemMatrixAdapter::nullifyRowsAndCols ( escript::Data row_q,
escript::Data col_q,
const double  mdv 
) const [virtual]
void paso::SystemMatrixAdapter::pasoToEscriptOptions ( const Options paso_options,
boost::python::object &  options 
) [static]

copies diagnostic data back to the solver options

References SET.

Referenced by paso::TransportProblemAdapter::setToSolution(), and setToSolution().

void paso::SystemMatrixAdapter::Print_Matrix_Info ( const bool  full = false) const
void paso::SystemMatrixAdapter::resetValues ( ) const [virtual]

sets the matrix entries to zero

Reimplemented from escript::AbstractSystemMatrix.

References paso::checkPasoError(), m_system_matrix, and paso::solve_free().

Referenced by BOOST_PYTHON_MODULE().

void paso::SystemMatrixAdapter::saveHB ( const std::string &  filename) const [virtual]

writes the matrix to a file using the Harwell-Boeing file format

Reimplemented from escript::AbstractSystemMatrix.

References paso::checkPasoError(), and m_system_matrix.

Referenced by BOOST_PYTHON_MODULE().

void paso::SystemMatrixAdapter::saveMM ( const std::string &  filename) const [virtual]

writes the matrix to a file using the Matrix Market file format

Reimplemented from escript::AbstractSystemMatrix.

References paso::checkPasoError(), and m_system_matrix.

Referenced by BOOST_PYTHON_MODULE().

void paso::SystemMatrixAdapter::setToSolution ( escript::Data out,
escript::Data in,
boost::python::object &  options 
) const [private, virtual]
void paso::SystemMatrixAdapter::ypAx ( escript::Data y,
escript::Data x 
) const [private, virtual]

Member Data Documentation


The documentation for this class was generated from the following files: