escript  Revision_
Public Member Functions | Private Member Functions | Private Attributes | List of all members
escript::AbstractSystemMatrix Class Reference

Base class for escript system matrices. More...

#include <AbstractSystemMatrix.h>

Inheritance diagram for escript::AbstractSystemMatrix:
paso::SystemMatrix ripley::SystemMatrix

Public Member Functions

 AbstractSystemMatrix ()
 Default constructor for AbstractSystemMatrix. More...
 
 AbstractSystemMatrix (int row_blocksize, const FunctionSpace &row_functionspace, int column_blocksize, const FunctionSpace &column_functionspace)
 
virtual ~AbstractSystemMatrix ()
 Destructor. More...
 
ASM_ptr getPtr ()
 Returns smart pointer which is managing this object. If one does not exist yet it creates one. More...
 
const_ASM_ptr getPtr () const
 Returns smart pointer which is managing this object. If one does not exist yet it creates one. More...
 
Data vectorMultiply (const Data &right) const
 returns the matrix-vector product this*right More...
 
bool isEmpty () const
 returns true if the matrix is empty More...
 
FunctionSpace getColumnFunctionSpace () const
 returns the column function space More...
 
FunctionSpace getRowFunctionSpace () const
 returns the row function space More...
 
int getRowBlockSize () const
 returns the row block size More...
 
int getColumnBlockSize () const
 returns the column block size More...
 
Data solve (const Data &in, boost::python::object &options) const
 returns the solution u of the linear system this*u=in More...
 
virtual void nullifyRowsAndCols (Data &row_q, Data &col_q, double mdv)
 sets matrix entries to zero in specified rows and columns. The rows and columns are marked by positive values in row_q and col_q. Values on the main diagonal which are marked to set to zero by both row_q and col_q are set to mdv (main diagonal value). More...
 
virtual void saveMM (const std::string &filename) const
 writes the matrix to a file using the Matrix Market file format More...
 
virtual void saveHB (const std::string &filename) const
 writes the matrix to a file using the Harwell-Boeing file format More...
 
virtual void resetValues (bool preserveSolverData=false)
 resets the matrix entries More...
 

Private Member Functions

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

Private Attributes

bool m_empty
 
int m_column_blocksize
 
int m_row_blocksize
 
FunctionSpace m_row_functionspace
 
FunctionSpace m_column_functionspace
 

Detailed Description

Base class for escript system matrices.

Constructor & Destructor Documentation

◆ AbstractSystemMatrix() [1/2]

escript::AbstractSystemMatrix::AbstractSystemMatrix ( )
inline

Default constructor for AbstractSystemMatrix.

◆ AbstractSystemMatrix() [2/2]

escript::AbstractSystemMatrix::AbstractSystemMatrix ( int  row_blocksize,
const FunctionSpace row_functionspace,
int  column_blocksize,
const FunctionSpace column_functionspace 
)

◆ ~AbstractSystemMatrix()

virtual escript::AbstractSystemMatrix::~AbstractSystemMatrix ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ getColumnBlockSize()

int escript::AbstractSystemMatrix::getColumnBlockSize ( ) const
inline

◆ getColumnFunctionSpace()

FunctionSpace escript::AbstractSystemMatrix::getColumnFunctionSpace ( ) const
inline

◆ getPtr() [1/2]

ASM_ptr escript::AbstractSystemMatrix::getPtr ( )

Returns smart pointer which is managing this object. If one does not exist yet it creates one.

Referenced by dudley::DudleyDomain::addPDEToSystem(), finley::FinleyDomain::addPDEToSystem(), paso::SystemMatrix::setPreconditioner(), paso::SystemMatrix::solve(), and paso::SystemMatrix::solvePreconditioner().

◆ getPtr() [2/2]

const_ASM_ptr escript::AbstractSystemMatrix::getPtr ( ) const

Returns smart pointer which is managing this object. If one does not exist yet it creates one.

◆ getRowBlockSize()

int escript::AbstractSystemMatrix::getRowBlockSize ( ) const
inline

◆ getRowFunctionSpace()

FunctionSpace escript::AbstractSystemMatrix::getRowFunctionSpace ( ) const
inline

◆ isEmpty()

bool escript::AbstractSystemMatrix::isEmpty ( ) const
inline

returns true if the matrix is empty

Referenced by BOOST_PYTHON_MODULE(), solve(), and vectorMultiply().

◆ nullifyRowsAndCols()

void escript::AbstractSystemMatrix::nullifyRowsAndCols ( Data row_q,
Data col_q,
double  mdv 
)
virtual

sets matrix entries to zero in specified rows and columns. The rows and columns are marked by positive values in row_q and col_q. Values on the main diagonal which are marked to set to zero by both row_q and col_q are set to mdv (main diagonal value).

Reimplemented in paso::SystemMatrix, and ripley::SystemMatrix.

Referenced by BOOST_PYTHON_MODULE().

◆ resetValues()

void escript::AbstractSystemMatrix::resetValues ( bool  preserveSolverData = false)
virtual

resets the matrix entries

Reimplemented in paso::SystemMatrix, and ripley::SystemMatrix.

Referenced by BOOST_PYTHON_MODULE().

◆ saveHB()

void escript::AbstractSystemMatrix::saveHB ( const std::string &  filename) const
virtual

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

Reimplemented in paso::SystemMatrix, and ripley::SystemMatrix.

Referenced by BOOST_PYTHON_MODULE().

◆ saveMM()

void escript::AbstractSystemMatrix::saveMM ( const std::string &  filename) const
virtual

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

Reimplemented in paso::SystemMatrix, and ripley::SystemMatrix.

Referenced by BOOST_PYTHON_MODULE().

◆ setToSolution()

void escript::AbstractSystemMatrix::setToSolution ( Data out,
Data in,
boost::python::object &  options 
) const
privatevirtual

solves the linear system this*out=in

Reimplemented in paso::SystemMatrix, and ripley::SystemMatrix.

Referenced by solve().

◆ solve()

Data escript::AbstractSystemMatrix::solve ( const Data in,
boost::python::object &  options 
) const

◆ vectorMultiply()

Data escript::AbstractSystemMatrix::vectorMultiply ( const Data right) const

◆ ypAx()

void escript::AbstractSystemMatrix::ypAx ( Data y,
Data x 
) const
privatevirtual

performs y+=this*x

Reimplemented in paso::SystemMatrix, and ripley::SystemMatrix.

Referenced by vectorMultiply().

Member Data Documentation

◆ m_column_blocksize

int escript::AbstractSystemMatrix::m_column_blocksize
private

◆ m_column_functionspace

FunctionSpace escript::AbstractSystemMatrix::m_column_functionspace
private

◆ m_empty

bool escript::AbstractSystemMatrix::m_empty
private

◆ m_row_blocksize

int escript::AbstractSystemMatrix::m_row_blocksize
private

◆ m_row_functionspace

FunctionSpace escript::AbstractSystemMatrix::m_row_functionspace
private

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