<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Oct 14, 2014 at 7:27 AM, Yoann Cheny <span dir="ltr"><<a href="mailto:yoann.cheny@univ-lorraine.fr" target="_blank">yoann.cheny@univ-lorraine.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000"><div>Hi,</div><div>I'm working on the parallelization of an existing 3D solver for incompressible Navier-Stokes equations based on a cut-cell method. </div><div>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. </div><div>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. </div><div>Due to the data structure I plan to use DMDA object to build the linear system, am I right ? </div></div></div></blockquote><div><br></div><div>This is definitely possible.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000"><div>I read in the archives that dmda objects were not designed to handle with staggered grids, does it still hold ?</div></div></div></blockquote><div><br></div><div>Yes, it is not designed to handle this, so any option is somewhat messy.</div><div><br></div><div>The easiest way to do a staggered discretization is to think of different variables being on shifted grids and use a bigger</div><div>buffer region to handle the shift.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000"><div>And finally I plan to model my code on the ksp example ex46.c, is there any F90 version of it ? </div></div></div></blockquote><div><br></div><div>KSP ex46 will not help you very much. SNES ex30 uses a staggered discretization and does the shifting.</div><div><br></div><div>If you are really adventurous, you could try and use the new PetscSection layout over a DMDA, which allows variables</div><div>anywhere (like faces). However, this is not tested at all, would require lots of debugging and programming, all to make</div><div>your code somewhat nicer to look at and simpler on the boundaries. Unless you are up for a ton of development, I would</div><div>stick with SNES ex30.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000"><div>Any advice and suggestions will be greatly appreciated.</div><div>Best regards,</div><div>Yoann</div><div><h1 style="margin:0px 0px 20px;padding:0px 0px 19px;border-width:0px 0px 1px;border-bottom-style:solid;border-bottom-color:#eeeeee;outline:0px;font-size:36.63px;vertical-align:baseline;font-weight:300;line-height:40px;color:#333333;font-family:'Open Sans','Liberation Sans',FreeSans,sans-serif;background:0px 0px #ffffff"><br></h1></div><div><span name="x"></span>=================================================<span class="HOEnZb"><font color="#888888"><br>Yoann CHENY <br>Maître de Conférences<br>Enseignement : EEIGM                                03 83 36 83 49<br>Recherche     : <a href="http://lemta.ensem.inpl-nancy.fr/" target="_blank">LEMTA</a> UMR 7563 CNRS 03 83 59 55 94 <div>=================================================<br><div><br></div></div><span name="x"></span><br></font></span></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener
</div></div>