petsc-3.4.5 2014-06-29

PetscObjectStateIncrease

Increases the state of any PetscObject, regardless of the type.

Synopsis

#include "petscsys.h"
PetscErrorCode PetscObjectStateIncrease(PetscObject obj)
Not Collective

Input Parameter

obj -any PETSc object, for example a Vec, Mat or KSP. This must be cast with a (PetscObject), for example, PetscObjectStateIncrease((PetscObject)mat);

Notes: object state is an integer which gets increased every time the object is changed. By saving and later querying the object state one can determine whether information about the object is still current. Currently, state is maintained for Vec and Mat objects.

This routine is mostly for internal use by PETSc; a developer need only call it after explicit access to an object's internals. Routines such as VecSet() or MatScale() already call this routine. It is also called, as a precaution, in VecRestoreArray(), MatRestoreRow(), MatDenseRestoreArray().

seealso: PetscObjectStateQuery(), PetscObjectStateDecrease()

Level:developer
Location:
include/petsc-private/petscimpl.h
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages