Gradient at ghost cells only?

Barry Smith bsmith at mcs.anl.gov
Sat Mar 4 12:02:17 CST 2006



On Sat, 4 Mar 2006, billy at dem.uminho.pt wrote:

>
> Hi,
>
> I need the gradient of 5 scalars at ghost cells and I was thinking of creating
> 5x3 vectors with VecCreateGhost(). Right now, I calculate the gradient during
> each iteration and I don't store it's value.
> I would like to calculate, store and exchange the gradient at the ghost cells
> only, to minimize memory requirements. How is the best way to do that?
^^^^^^^
    Do you not need the gradient values for the interior points? Or are you 
willing to recompute the gradients for the interior points? Why different?

    If the gradient is the same each time why not just calculate it the first
time and store it for later? Don't make live complicated by using 
VecCreateGhost(), just compute them and store them in some array.

    Barry


>
> Billy.
>
>




More information about the petsc-users mailing list