On Thu, 26 Feb 2015 11:31:17 +0100 Murtazo Nazarov <[email protected]> wrote:
> Hi, > > I created the identity matrix by the following lines: Provided M is > the mass matrix > > I = M; > I.zero(); > I.ident_zeros(); > I.compressed(I); As the error message says, the matrix can't be reinitialized. This a conscious design change. The bug is that there's missing protection against self-assignment. You should rather do Matrix I_new(); I.compressed(I_new); Jan > > After the upgrade to dolfin-1.5.0 the last line gives the following > error: > > *** > ------------------------------------------------------------------------- > *** DOLFIN encountered an error. If you are not able to resolve this > issue *** using the information listed below, you can ask for help at > *** > *** [email protected] > *** > *** Remember to include the error message listed below and, if > possible, *** include a *minimal* running example to reproduce the > error. *** > *** > ------------------------------------------------------------------------- > *** Error: Unable to init PETSc matrix. > *** Reason: PETScMatrix may not be initialized more than once.. > *** Where: This error was encountered inside PETScMatrix.cpp. > *** Process: unknown > *** > *** DOLFIN version: 1.5.0 > *** Git changeset: > *** > ------------------------------------------------------------------------- > > Is it a bug or there is a different way of using matrix.compressed? > > Thank you for your comment. > > Regards, > Murtazo > _______________________________________________ > fenics-support mailing list > [email protected] > http://fenicsproject.org/mailman/listinfo/fenics-support _______________________________________________ fenics-support mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics-support
