/**
* Auxiliary vector.
*/
- VECTOR aux;
+ // VECTOR aux;
/**
* Shift parameter.
*/
*
* @author Guido Kanschat, 2001
*/
-template<class MATRIX, class MASSMATRIX>
+template<class MATRIX, class MASSMATRIX, class VECTOR>
class ShiftedMatrixGeneralized
{
public:
/**
* Matrix-vector-product.
*/
- template <class VECTOR>
void vmult (VECTOR& dst, const VECTOR& src) const;
/**
* Residual.
*/
- template <class VECTOR>
double residual (VECTOR& dst, const VECTOR& src, const VECTOR& rhs) const;
private:
*/
SmartPointer<const MASSMATRIX> M;
+ /**
+ * Auxiliary vector.
+ */
+ VECTOR aux;
+
/**
* Shift parameter.
*/
//----------------------------------------------------------------------//
-
-template <class MATRIX, class MASSMATRIX>
+template <class MATRIX, class MASSMATRIX, class VECTOR>
inline
-ShiftedMatrixGeneralized<MATRIX, MASSMATRIX>
+ShiftedMatrixGeneralized<MATRIX, MASSMATRIX, VECTOR>
::ShiftedMatrixGeneralized (const MATRIX& A,
const MASSMATRIX& M,
const double sigma)
{}
-
-template <class MATRIX, class MASSMATRIX>
+template <class MATRIX, class MASSMATRIX, class VECTOR>
inline void
-ShiftedMatrixGeneralized<MATRIX, MASSMATRIX>::shift (const double s)
+ShiftedMatrixGeneralized<MATRIX, MASSMATRIX, VECTOR>::shift (const double s)
{
sigma = s;
}
-
-template <class MATRIX, class MASSMATRIX>
+template <class MATRIX, class MASSMATRIX, class VECTOR>
inline double
-ShiftedMatrixGeneralized<MATRIX, MASSMATRIX>::shift () const
+ShiftedMatrixGeneralized<MATRIX, MASSMATRIX, VECTOR>::shift () const
{
return sigma;
}
-
-template <class MATRIX, class MASSMATRIX>
-template <class VECTOR>
+template <class MATRIX, class MASSMATRIX, class VECTOR>
inline void
-ShiftedMatrixGeneralized<MATRIX, MASSMATRIX>::vmult (VECTOR& dst,
+ShiftedMatrixGeneralized<MATRIX, MASSMATRIX, VECTOR>::vmult (VECTOR& dst,
const VECTOR& src) const
{
A.vmult(dst, src);
}
-template <class MATRIX, class MASSMATRIX>
-template <class VECTOR>
+template <class MATRIX, class MASSMATRIX, class VECTOR>
inline double
-ShiftedMatrixGeneralized<MATRIX, MASSMATRIX>::residual (VECTOR& dst,
+ShiftedMatrixGeneralized<MATRIX, MASSMATRIX, VECTOR>::residual (VECTOR& dst,
const VECTOR& src,
const VECTOR& rhs) const
{