*/
virtual ~PointerMatrixBase ();
+ /**
+ * Reset pointer and release the
+ * matrix pointed to.
+ */
+ virtual void clear () = 0;
+
/**
* Find out if two matrices point
* to the same object.
*/
PointerMatrix(const MATRIX* M,
const char* name);
+
+ // Use doc from base class
+ virtual void clear();
/**
* Return whether the object is
{}
+template<class MATRIX, class VECTOR>
+inline void
+PointerMatrix<MATRIX, VECTOR>::clear ()
+{
+ m = 0;
+}
+
+
template<class MATRIX, class VECTOR>
inline const PointerMatrix<MATRIX, VECTOR>&
PointerMatrix<MATRIX, VECTOR>::operator= (const MATRIX* M)
void initialize (const MATRIX &A,
AdditionalData parameters = AdditionalData());
+ /**
+ * Release the matrix and reset
+ * its pointer.
+ */
+ void clear();
+
protected:
/**
* Pointer to the matrix object.
relaxation = parameters.relaxation;
}
+
+template <class MATRIX>
+inline void
+PreconditionRelaxation<MATRIX>::clear ()
+{
+ A = 0;
+}
+
+
//---------------------------------------------------------------------------
template <class MATRIX>