MixedDat objects don’t only rely on the PETSc Vec of the underlying Dat objects, they is also a Vec living on the mixed space that is made by duplicating the layout vector of the dataset attached to the MixedDat instance.
The data version of MixedDat is obtained by summing the data version of the underlying Dat (not unique but enough to detect that the data value changed), but we also need to update the data version of the vector in the mixed space in the vec_context where it is populated.
This causes a test to fail in firedrake as PETSc Vecs cache some operations (e.g. norm computations) based on the Vec's state counter which can lead to wrong numerical values.
MixedDat
objects don’t only rely on the PETSc Vec of the underlyingDat
objects, they is also a Vec living on the mixed space that is made by duplicating the layout vector of the dataset attached to theMixedDat
instance.The data version of
MixedDat
is obtained by summing the data version of the underlyingDat
(not unique but enough to detect that the data value changed), but we also need to update the data version of the vector in the mixed space in thevec_context
where it is populated.This causes a test to fail in firedrake as PETSc Vecs cache some operations (e.g. norm computations) based on the Vec's state counter which can lead to wrong numerical values.