It seems to me that every correct use of this function should mark the
array const, so perhaps it would make sense to have

  PetscErrorCode VecGetArrayRead(Vec,const PetscScalar**);
  PetscErrorCode VecRestoreArrayRead(Vec,const PetscScalar**);

rather than always casting away const at the call site.

Jed

Reply via email to