[petsc-users] preliminary questions before parallelizing structured solver

Matthew Knepley knepley at gmail.com
Tue Oct 14 07:43:49 CDT 2014


On Tue, Oct 14, 2014 at 7:27 AM, Yoann Cheny <yoann.cheny at univ-lorraine.fr>
wrote:

> Hi,
> I'm working on the parallelization of an existing 3D solver
> for incompressible Navier-Stokes equations based on a cut-cell method.
> The equations are discretized on a Cartesian staggered grid on which an
> arbitrary complex geomertry is represented by its level-set function such
> that the method preserves the usual Cartesian 7-points stencil.
> The time integration is performed with a semi-explicit projection method
> (AB/BDF2) and as a result a Poisson eq. (for the pressure) and a Helmoltz
> eq. (momentum) must be solved at each time step.
> Due to the data structure I plan to use DMDA object to build the linear
> system, am I right ?
>

This is definitely possible.


> I read in the archives that dmda objects were not designed to handle with
> staggered grids, does it still hold ?
>

Yes, it is not designed to handle this, so any option is somewhat messy.

The easiest way to do a staggered discretization is to think of different
variables being on shifted grids and use a bigger
buffer region to handle the shift.


> And finally I plan to model my code on the ksp example ex46.c, is there
> any F90 version of it ?
>

KSP ex46 will not help you very much. SNES ex30 uses a staggered
discretization and does the shifting.

If you are really adventurous, you could try and use the new PetscSection
layout over a DMDA, which allows variables
anywhere (like faces). However, this is not tested at all, would require
lots of debugging and programming, all to make
your code somewhat nicer to look at and simpler on the boundaries. Unless
you are up for a ton of development, I would
stick with SNES ex30.

  Thanks,

     Matt

Any advice and suggestions will be greatly appreciated.
> Best regards,
> Yoann
>
> =================================================
> Yoann CHENY
> Maître de Conférences
> Enseignement : EEIGM                                03 83 36 83 49
> Recherche     : LEMTA <http://lemta.ensem.inpl-nancy.fr/> UMR 7563 CNRS
> 03 83 59 55 94
> =================================================
>
>
>


-- 
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/20141014/7582774a/attachment.html>


More information about the petsc-users mailing list