2008/3/25, Anders Logg <[EMAIL PROTECTED]>:
> There are quite a few of these already (but they are missing in many
> places). For example, here is PETScMatrix::get:
>
> void PETScMatrix::get(real* block,
> uint m, const uint* rows,
> uint n, const uint* cols) const
> {
> dolfin_assert(A);
> MatGetValues(A,
> static_cast<int>(m),
> reinterpret_cast<int*>(const_cast<uint*>(rows)),
> static_cast<int>(n),
> reinterpret_cast<int*>(const_cast<uint*>(cols)),
> block);
> }
>
> Is this what you have in mind?
Looks good. Will dolfin_assert result in an exception or just kill the
application? An informative error message and stack trace is nice to
have. Will the code be removed in release builds or not?
--
Martin
_______________________________________________
DOLFIN-dev mailing list
[email protected]
http://www.fenics.org/mailman/listinfo/dolfin-dev