<div dir="ltr">


        
        
        
        


<p class="" style="margin-bottom:0.35cm;line-height:115%">Thanks
Barry. I think I didn’t put the question properly.</p><p class="" style="margin-bottom:0.35cm;line-height:115%">I
want to generate a 3D non uniform grid. I went through the archieves
and read about DMSetCoordinates. As I have large No. of grid points,
it is difficult to assign coordinates manually.</p>
<p class="" style="margin-bottom:0.35cm;line-height:115%"><br>Thanks,

</p><p class="" style="margin-bottom:0.35cm;line-height:115%">Praveen</p>

</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 3, 2016 at 12:21 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"><span class=""><br>
> On Mar 2, 2016, at 9:01 AM, praveen kumar <<a href="mailto:praveenpetsc@gmail.com">praveenpetsc@gmail.com</a>> wrote:<br>
><br>
> Dear all,<br>
><br>
> I am employing PETSc for DD in a serial fortran code and I would be using the solver from serial code itself. In my programme there is subroutine which reads an input file for the grids.  I have two questions:<br>
><br>
><br>
><br>
> 1.  The input file contains : No. of segments in each direction, Length of each segment, Grid expansion ratio for each segment, dx(min) and dx(max) (min and max size of sub-division for each segment),<br>
<br>
</span>   I don't understand what this grid expansion ratio means.<br>
<span class=""><br>
> No. of uniform sub-divisions in each segment. Will I be able to include all these details in DMDAcreate3D?<br>
<br>
</span>   The DMDACreate3d() only defines the topology of the mesh (number of mesh points in each direction etc), not the geometry. If you want to provide geometry information (i.e. length of grid segments) then you use DMDAGetCoordinateArray() to set the local values. See DMDAVecGetArray for the form of the "coordinates" array.<br>
<span class=""><br>
>  Is there any example? If no, then is there any way to retain the input file section and still use PETSc?<br>
<br>
</span>   Should be possible but you will need to do a little programming and poking around to use all the information.<br>
<span class="HOEnZb"><font color="#888888"><br>
  Barry<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
><br>
><br>
> 2. Moreover application requires that, I call the Grid subroutine after some fixed number of iterations.<br>
><br>
><br>
><br>
> Would you suggest how to fix the above two?<br>
><br>
><br>
><br>
> Thanks,<br>
><br>
> Praveen<br>
><br>
<br>
</div></div></blockquote></div><br></div>