VecGetValues and tutorail?
billy at dem.uminho.pt
billy at dem.uminho.pt
Sun Feb 26 17:00:25 CST 2006
Hi,
I want to parallelize an unstructured finite volume CFD code. The code is
second-order in space, so I only need one layer of overlap between domains. The
time advancement is implicit.
I renumbered the cells in my application to respect PETSc ordering.
Do I need to use AO: Application Orderings? Or is this optional?
P0 P1
---------- ----------
| 0| 1| 2| <-> | 9|10|11|
| 3| 4| 5| <-> |12|13|14|
| 6| 7| 8| <-> |15|16|17|
---------- ----------
Should I use VecCreateGhost to include the ghost cells or another type of vector
like VecCreateSeq?
P0 P1
------------- -------------
| 0| 1| 2| 9| <-> |18| 9|10|11|
| 3| 4| 5|10| <-> |19|12|13|14|
| 6| 7| 8|11| <-> |21|15|16|17|
------------- -------------
Do I need to create IS: Index Sets?
P0 P1
------------- -------------
| 0| 1| 2| 9| <-> | 9| 0| 1| 2|
| 3| 4| 5|10| <-> |10| 3| 4| 5|
| 6| 7| 8|11| <-> |11| 6| 7| 8|
------------- -------------
Then I should apply VecScatter routines to update ghost cells, right?
Sorry for asking so many questions, but this is all very confusing to me.
Billy.
Quoting Satish Balay <balay at mcs.anl.gov>:
> On Fri, 24 Feb 2006, billy at dem.uminho.pt wrote:
>
> >
> > Hello,
> >
> >
> > "VecGetValues - Gets values from certain locations of a vector. Currently
> can
> > only get values on the same processor"
> >
> > How can I get a value of the vector belonging to a different processor?
> >
> >
> > I am trying to learn how to adapt my code to work in parallel. Have looked
> at
> > src/snes/examples/tutorials/ex10d/ex10.c, but I am still confused on how to
> use
> > petsc with unstructured meshes. Is there any simple step-by-step
> tutorial?
>
> Basically - you'll have to use VecScatter routines to specify the
> communication required. Then use VecScatterBegin/End() to invoke this
> communication. Some of this info is in the tutorial slides [check
> arround slide 150] in:
> http://www-unix.mcs.anl.gov/petsc/petsc-as/documentation/tutorials/PetscTu06.pdf
>
> Not usre if there is an unstructured grid example code. [but there are
> examples using VecScatters in src/dm/da/examples/tutorials]
>
> Satish
>
>
More information about the petsc-users
mailing list