<div dir="ltr">Hi Sir,<div>  Thanks a lot for the clarification.</div><div>  I will give it a try, let's see how things go.</div><div><br></div><div><br></div><div>Somdeb</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 29, 2016 at 9:37 AM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
   Sadly this type of situation is not as easy to handle as one would hope. What you suggest is possible, there are basically two different approaches<br>
<br>
1) have both DA live on all processes<br>
<br>
2) Create a subcommunicator for DAtop and its complement for DAcavity.<br>
<br>
 In either case I would suggest using the "ghost" boundary conditions for the top of the DAcavity and the bottom of the DAtop and  use two  VecScatters to communicate from/to them and the regular parts of the domain. Then essentially ghost point updates are done with DAGlobalToLocal() on each DA and the VecScatters. For parts of DATop that are not above the DACavity you would just ignore the "extra" ghost locations.<br>
<br>
  I would start by figuring out how to do this and not yet worry about Jacobians etc. Just be able to go from global to local on the composite grid vector to the local vectors. Use a very small number of points and run starting on one process. I would use 1) not 2) since it is simpler to understand.<br>
<br>
   Good luck,<br>
<br>
    Barry<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
> On Dec 28, 2016, at 3:49 PM, Somdeb Bandopadhyay <<a href="mailto:sb020287@gmail.com">sb020287@gmail.com</a>> wrote:<br>
><br>
> Hi all,<br>
>   I am trying to modify a single block incompressible solver for flow over open cavity. One way I could do it, is to set part of the domain as flagged and apply velocity field=0 all over it. But it does not seem to be appropriate way (I am wasting alot of grid, just to have a small cavity). So I was wondering, is there any example to interact between two DMDA grids? I am using petsc to solve the poisson equation so if I can just create two set of grid (say DA_grid1 and DA_grid2) and have a interface between them, my problem would be alot more easier.<br>
><br>
> Thanks a lot in advance.<br>
><br>
> Somdeb<br>
<br>
</div></div></blockquote></div><br></div>