se2(partitioning)

Yixun Liu enjoywm at cs.wm.edu
Fri Feb 20 13:05:50 CST 2009


Matthew Knepley wrote:
> The coordinates are stored according to the PETSc numbering. You get
> them using
>
>  
> http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/DA/DAGetCoordinates.html
>
>    Matt
>
> On Fri, Feb 20, 2009 at 12:25 PM, Yixun Liu <enjoywm at cs.wm.edu
> <mailto:enjoywm at cs.wm.edu>> wrote:
>
>     Hi,
>     In ex2, the following codes Change the element vertex information
>     to the
>     PETSc numbering.
>
>     705:AOCreateBasic
>     <http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-3.0.0/docs/manualpages/AO/AOCreateBasic.html#AOCreateBasic>(PETSC_COMM_WORLD
>     <http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-3.0.0/docs/manualpages/Sys/PETSC_COMM_WORLD.html#PETSC_COMM_WORLD>,gdata->nlocal,gdata->localvert,PETSC_NULL
>     <http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-3.0.0/docs/manualpages/Sys/PETSC_NULL.html#PETSC_NULL>,&ao);
>      <http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-3.0.0/docs/manualpages/AO/AOCreateBasic.html#AOCreateBasic>710:AOApplicationToPetsc
>     <http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-3.0.0/docs/manualpages/AO/AOApplicationToPetsc.html#AOApplicationToPetsc>(ao,3*gdata->mlocal_ele,gdata->ele);
>
>     However, I cannot find the codes which are used to create an array
>     or vector, which stores the coordinates according to the PETSc
>     numbering. Without this array how we get the coordinate of the
>     vertex of an element?
>
>     Thanks.
>
>
>
>
>
> -- 
> 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
Can I use VecCreateMPIWithArray(PETSC_COMM_WORLD, 2*gdata->mlocal_vert,
PETSC_DECIDE, gdata->vert, &vert) to get Vec vert, which stores the
coordinates according to PETSc order?

Yixun


More information about the petsc-users mailing list