[petsc-users] DMDAVecGetArrayReadF90

Barry Smith bsmith at mcs.anl.gov
Mon Jun 29 22:25:36 CDT 2015


  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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-dmdavecgetarrayreadf90.patch
Type: application/octet-stream
Size: 13210 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150629/27a564ed/attachment-0001.obj>
-------------- next part --------------


> On Jun 29, 2015, at 9:50 PM, Adrian Croucher <a.croucher at auckland.ac.nz> 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: a.croucher at auckland.ac.nz
> tel: +64 (0)9 923 84611
> 



More information about the petsc-users mailing list