In addition I set FieldCtx* FC = (FieldCtx*) ctx; in the _petsc_resiadualVector before any calculations Thanks a lot -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111123/7b600894/attachment.htm>