Go to the documentation of this file.
17 #ifndef __ESCRIPT_ABSTRACTSYSTEMMATRIX_H__
18 #define __ESCRIPT_ABSTRACTSYSTEMMATRIX_H__
25 #include <boost/python/object.hpp>
31 class AbstractSystemMatrix;
79 Data vectorMultiply(
const Data& right)
const;
85 bool isEmpty()
const {
return m_empty; }
91 inline FunctionSpace getColumnFunctionSpace()
const
94 throw SystemMatrixException(
"Error - Matrix is empty.");
95 return m_column_functionspace;
106 return m_row_functionspace;
113 inline int getRowBlockSize()
const
117 return m_row_blocksize;
124 inline int getColumnBlockSize()
const
128 return m_column_blocksize;
135 Data solve(
const Data& in, boost::python::object& options)
const;
144 virtual void nullifyRowsAndCols(
Data& row_q,
Data& col_q,
double mdv);
150 virtual void saveMM(
const std::string& filename)
const;
155 virtual void saveHB(
const std::string& filename)
const;
160 virtual void resetValues(
bool preserveSolverData =
false);
168 virtual void setToSolution(
Data& out,
Data& in,
169 boost::python::object& options)
const;
175 virtual void ypAx(
Data& y,
Data& x)
const;
178 int m_column_blocksize;
189 #endif // __ESCRIPT_ABSTRACTSYSTEMMATRIX_H__
virtual void saveMM(const std::string &filename) const
writes the matrix to a file using the Matrix Market file format
Definition: AbstractSystemMatrix.cpp:130
#define ESCRIPT_DLL_API
Definition: escriptcore/src/system_dep.h:28
bool isComplex() const
True if components of this data are stored as complex.
Definition: Data.cpp:1163
#define POINTER_WRAPPER_CLASS(x)
Definition: Pointers.h:31
bool isEmpty() const
returns true if the matrix is empty
Definition: AbstractSystemMatrix.h:96
virtual void saveHB(const std::string &filename) const
writes the matrix to a file using the Harwell-Boeing file format
Definition: AbstractSystemMatrix.cpp:135
AbstractSystemMatrix()
Default constructor for AbstractSystemMatrix.
Definition: AbstractSystemMatrix.h:61
virtual void setToSolution(Data &out, Data &in, boost::python::object &options) const
solves the linear system this*out=in
Definition: AbstractSystemMatrix.cpp:117
boost::shared_ptr< const AbstractSystemMatrix > const_ASM_ptr
Definition: AbstractSystemMatrix.h:46
Data vectorMultiply(const Data &right) const
returns the matrix-vector product this*right
Definition: AbstractSystemMatrix.cpp:75
FunctionSpace getColumnFunctionSpace() const
returns the column function space
Definition: AbstractSystemMatrix.h:102
int getDataPointSize() const
Return the size of the data point. It is the product of the data point shape dimensions.
Definition: Data.cpp:1363
Definition: FunctionSpace.h:45
#define REFCOUNT_BASE_CLASS(x)
Definition: Pointers.h:29
virtual void resetValues(bool preserveSolverData=false)
resets the matrix entries
Definition: AbstractSystemMatrix.cpp:140
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 positiv...
Definition: AbstractSystemMatrix.cpp:123
Typedefs and macros for reference counted storage.
Data represents a collection of datapoints.
Definition: Data.h:62
Definition: DataException.h:37
ASM_ptr getPtr()
Returns smart pointer which is managing this object. If one does not exist yet it creates one.
Definition: AbstractSystemMatrix.cpp:52
std::vector< int > ShapeType
The shape of a single datapoint.
Definition: DataTypes.h:65
Base class for escript system matrices.
Definition: AbstractSystemMatrix.h:53
Data solve(const Data &in, boost::python::object &options) const
returns the solution u of the linear system this*u=in
Definition: AbstractSystemMatrix.cpp:99
SystemMatrixException exception class.
Definition: SystemMatrixException.h:45
Data operator*(const AbstractSystemMatrix &left, const Data &right)
Definition: AbstractSystemMatrix.cpp:70
virtual void ypAx(Data &y, Data &x) const
performs y+=this*x
Definition: AbstractSystemMatrix.cpp:94
Definition: AbstractContinuousDomain.cpp:22
FunctionSpace getRowFunctionSpace() const
returns the row function space
Definition: AbstractSystemMatrix.h:113
boost::shared_ptr< AbstractSystemMatrix > ASM_ptr
Definition: AbstractSystemMatrix.h:43
std::complex< real_t > cplx_t
complex data type
Definition: DataTypes.h:76
int getRowBlockSize() const
returns the row block size
Definition: AbstractSystemMatrix.h:124
int getColumnBlockSize() const
returns the column block size
Definition: AbstractSystemMatrix.h:135