You are correct that those routines should exist but simply do not exist in the PETSc 3.6 release. I have added them in the branch barry/add-dmdavecgetarrayreadf90/maint as well as the attached patch.
Please let me know if you have any trouble with them, Barry
add-dmdavecgetarrayreadf90.patch
Description: Binary data
> On Jun 29, 2015, at 9:50 PM, Adrian Croucher <[email protected]> > wrote: > > hi, I'm using a SNES to solve a nonlinear problem on a DMDA, using Fortran. > > In my function to be minimized I need an array on the solution vector. If I > use DMDAVecGetArrayF90(), I get an 'object is in wrong state' error because > the solution vector has been locked read-only by the SNES. > > If I'm using DMPLex I use VecGetArrayReadF90() to get a read-only array, but > for DMDA there doesn't seem to be a corresponding DMDAVecGetArrayReadF90(). > Is there something else I should use instead? > > - Adrian > > -- > Dr Adrian Croucher > Senior Research Fellow > Department of Engineering Science > University of Auckland, New Zealand > email: [email protected] > tel: +64 (0)9 923 84611 >
