* Define number type of matrix.
*/
typedef typename MATRIX::value_type number;
+
+ /**
+ * Value type for inverse matrices.
+ */
+ typedef inverse_type value_type;
public:
/**
*/
bool empty () const;
+ /**
+ * Read-only access to entries.
+ * This function is only possible
+ * if the inverse diagonal blocks
+ * are stored.
+ */
+ value_type el(unsigned int i,
+ unsigned int j) const;
+
/**
* Use only the inverse of the
* first diagonal block to save
*/
PreconditionBlock<MATRIX, inverse_type>::empty;
+ /**
+ * Make function of base class public again.
+ */
+ PreconditionBlock<MATRIX, inverse_type>::el;
+
/**
* Make function of base class public again.
*/
* Make function of base class public again.
*/
PreconditionBlock<MATRIX, inverse_type>::empty;
+
+ /**
+ * Make function of base class public again.
+ */
+ PreconditionBlock<MATRIX, inverse_type>::el;
/**
* Make function of base class public again.
*/
PreconditionBlockSOR<MATRIX, inverse_type>::empty;
+ /**
+ * Make function of base class public again.
+ */
+ PreconditionBlockSOR<MATRIX, inverse_type>::el;
+
/**
* Make function of base class public again.
*/
return A->empty();
}
+
+template<class MATRIX, typename inverse_type>
+inline inverse_type
+PreconditionBlock<MATRIX, inverse_type>::el (
+ unsigned int i,
+ unsigned int j) const
+{
+ const unsigned int bs = blocksize;
+ const unsigned int nb = i/bs;
+
+ const FullMatrix<inverse_type>& B = inverse(nb);
+
+ const unsigned int ib = i % bs;
+ const unsigned int jb = j % bs;
+
+ if (jb +nb != j)
+ {
+ return 0.;
+ }
+
+ return B(ib, jb);
+}
+
#endif