[petsc-users] DMDAVecGetArrayF90
Matthew Knepley
knepley at gmail.com
Wed Mar 4 12:35:26 CST 2015
On Wed, Mar 4, 2015 at 12:26 PM, <Carol.Brickley at awe.co.uk> wrote:
> Hi,
>
> I am using DMDAVecGetArrayF90 with a pointer in petsc 3.4.3. Is there
> anyway of finding out what the start and finish indices of the pointer
> coming back from this routine are per processor?
>
> I have declared:
>
>
> DM :: da
> Vec :: X
> PetscScalar,pointer :: xv(:,:)=>null()
>
>
> DMDAVecGetArrayF90(da,X,xv,ierr)
>
>
> Do j = 1, m
> Do i = 1, n
> xv(i-1.j-1) = rhs2d(i,j)
> enddo
> enddo
>
>
> DMDAVecRestoreArrayF90(da,X,xv,ierr)
>
> When we have xv(0:n-1,0:m-1) from DMDAVecGetArrayF90 it works fine but
> other processors may give back eg; xv(0:n-1,1:m-1) or something else and it
> will fail as the second index
> now goes below 0 to 1. Any ideas of what I can do next?
>
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMDAGetCorners.html
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMDAGetGhostCorners.html#DMDAGetGhostCorners
Matt
>
> Thanks,
>
> Carol
>
>
> Dr Carol Brickley
> BSc,PhD,ARCS,DIC,MBCS
>
> Senior Software Engineer
> Applied Computer Science
> DS+T,
> AWE
> Aldermaston
> Reading
> Berkshire
> RG7 4PR
>
> Direct: 0118 9855035
>
>
>
> ___________________________________________________
> ____________________________
>
> The information in this email and in any attachment(s) is
> commercial in confidence. If you are not the named addressee(s)
> or
> if you receive this email in error then any distribution, copying or
> use of this communication or the information in it is strictly
> prohibited. Please notify us immediately by email at
> admin.internet(at)awe.co.uk, and then delete this message from
> your computer. While attachments are virus checked, AWE plc
> does not accept any liability in respect of any virus which is not
> detected.
>
> AWE Plc
> Registered in England and Wales
> Registration No 02763902
> AWE, Aldermaston, Reading, RG7 4PR
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150304/634cfe7c/attachment.html>
More information about the petsc-users
mailing list