[petsc-dev] VecRestoreArrayRead and const

Jed Brown jed at 59A2.org
Mon Jun 14 05:56:47 CDT 2010


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



More information about the petsc-dev mailing list