PETSc interface for staggered and structured grid?

Barry Smith bsmith at mcs.anl.gov
Wed Jan 21 11:29:09 CST 2009


     The DA object in PETSc is intended as the way to manage  
computations on structured grids
as in ex19.c Hong mentioned.

      With staggered grids there is one extra complication. The DA is  
based on having the same
number of unknowns at each grid point; this causes trouble for  
pressure which are cell centered
so there are less pressure locations. Thus you have to "fake it" by  
treating as an identity those extra
values.

    Barry



On Jan 21, 2009, at 8:57 AM, Hong Zhang wrote:

>
> You may take a look at ~petsc/src/snes/examples/tutorials/ex19.c
> which solves a Nonlinear driven cavity over structured 2d
> grid.
>
> Hong
>
> On Wed, 21 Jan 2009, Etienne Ahusborde wrote:
>
>> Hello,
>>
>> I am a new user of PETSc.
>>
>> My goal is to solve linear systems coming from the Navier-Stokes  
>> equations. Components of the velocity field
>> are coupled each other, so that, in 2D, the matrix is composed of  
>> four blocks (two diagonal blocks, one for each component,
>> and two extra-diagonal blocks for the coupling between u and v).  
>> Discretization is made on a staggered and structured grid
>> (MAC grid, one grid for each component).
>>
>> After having read the user manual, I an wondering if there is a way  
>> to take benefit of the structured grid as the Semi-Structured-Grid  
>> System interface of Hypre, or if I have to use the parallel AIJ  
>> Sparse matrices. We have understood that the distributed arrays are
>> rather  adapted to scalar equations (in comparison with coupled  
>> vectorial equations).
>>
>> In your opinion, what is the best way to treat our problem?
>>
>> Kind regards
>>
>> Etienne Ahusborde
>>
>>
>>
>>




More information about the petsc-users mailing list