finley::SystemMatrixAdapter Class Reference

#include <SystemMatrixAdapter.h>

Inheritance diagram for finley::SystemMatrixAdapter:

escript::AbstractSystemMatrix

List of all members.

Public Member Functions

 SystemMatrixAdapter ()
 Wrapper for Paso_SystemMatrix.
 SystemMatrixAdapter (Paso_SystemMatrix *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.
Paso_SystemMatrixgetPaso_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 Paso_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 void escriptToPasoOptions (Paso_Options *paso_options, const boost::python::object &options)
 extract paso options from SolutionOptions class
static void pasoToEscriptOptions (const Paso_Options *paso_options, boost::python::object &options)
 copied diagonistic data back to the solver option.

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

boost::shared_ptr
< Paso_SystemMatrix
m_system_matrix


Constructor & Destructor Documentation

finley::SystemMatrixAdapter::SystemMatrixAdapter (  ) 

Wrapper for Paso_SystemMatrix.

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

finley::SystemMatrixAdapter::SystemMatrixAdapter ( Paso_SystemMatrix system_matrix,
const int  row_blocksize,
const escript::FunctionSpace row_functionspace,
const int  column_blocksize,
const escript::FunctionSpace colum_functionspace 
)

/brief Constructor for SystemMatrixAdapter.

References m_system_matrix.

finley::SystemMatrixAdapter::~SystemMatrixAdapter (  ) 

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

References m_system_matrix, and Paso_SystemMatrix_free().


Member Function Documentation

Paso_SystemMatrix * finley::SystemMatrixAdapter::getPaso_SystemMatrix (  )  const

Returns the pointer to the system matrix.

References m_system_matrix.

Referenced by finley::MeshAdapter::addPDEToSystem(), nullifyRowsAndCols(), resetValues(), saveHB(), saveMM(), setToSolution(), and ypAx().

const escript::AbstractSystemMatrix& finley::SystemMatrixAdapter::asAbstractSystemMatrix (  )  const [inline]

Returns the system matrix as a const AbstractSystemMatrix&.

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

Returns a system matrix as a const SystemMatrixAdapter&.

void finley::SystemMatrixAdapter::nullifyRowsAndCols ( escript::Data row_q,
escript::Data col_q,
const double  mdv 
) const

void finley::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 finley::checkPasoError(), getPaso_SystemMatrix(), Paso_SystemMatrix_saveMM(), TMPMEMALLOC, and TMPMEMFREE.

Referenced by BOOST_PYTHON_MODULE().

void finley::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 finley::checkPasoError(), getPaso_SystemMatrix(), Paso_SystemMatrix_saveHB(), TMPMEMALLOC, and TMPMEMFREE.

Referenced by BOOST_PYTHON_MODULE().

void finley::SystemMatrixAdapter::resetValues (  )  const [virtual]

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

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

extract paso options from SolutionOptions class

References EXTRACT, EXTRACT_OPTION, Paso_Options_setDefaults(), and escript::DataMaths::symmetric().

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

void finley::SystemMatrixAdapter::pasoToEscriptOptions ( const Paso_Options paso_options,
boost::python::object &  options 
) [static]

copied diagonistic data back to the solver option.

References SET.

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

void finley::SystemMatrixAdapter::Print_Matrix_Info ( const bool  full = false  )  const

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

void finley::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:

Generated on Mon Aug 10 10:04:45 2009 for ESYS13 by  doxygen 1.5.6