Restore build assertion that is once more valid following cset dd4a755bc683.

Also, implement a function for zeroing a CSRMatrix, and create a
read/write reference to the underlying matrix.  Needed for clearing
the coefficient matrix between each Jacobian assembly.
This commit is contained in:
Bård Skaflestad
2011-10-06 14:48:51 +02:00
parent 7f766149b3
commit ff8518e55e

View File

@@ -49,6 +49,15 @@
namespace Opm {
namespace ImplicitTransportDefault {
template <>
class MatrixZero <struct CSRMatrix> {
public:
static void
zero(struct CSRMatrix& A) {
csrmatrix_zero(&A);
}
};
template <>
class MatrixBlockAssembler<struct CSRMatrix> {
public:
@@ -83,6 +92,7 @@ namespace Opm {
assert (ndof > 0);
assert (ndof == ndof_);
assert (i == (ia_.size() - 1) / ndof_); (void) i;
expandSortConn(conn, ndof);
const int nconn = static_cast<int>(esconn_.size());
@@ -117,8 +127,8 @@ namespace Opm {
construct();
}
const struct CSRMatrix&
matrix() const { return mat_; }
struct CSRMatrix& matrix() { return mat_; }
const struct CSRMatrix& matrix() const { return mat_; }
private:
void