PETSc doesn't allow to mix additions to matrix entries and overwriting them (to make synchronisation of parallel computations simpler). Since the interface of the existing classes don't support the notion of not interleaving things, we have to emulate this ourselves. The way we do it is to, for each access operation, store whether it is an insertion or an addition. If the previous one was of different type, then we first have to flush the PETSc buffers; otherwise, we can simply go on.
The following structure and variable declare and store the previous state.
Definition at line 1208 of file petsc_matrix_base.h.
documentation generated on Wed May 23 2012 12:04:19 by
doxygen
1.7.3