<div dir="ltr"><div dir="ltr">On Mon, Jun 26, 2023 at 11:44 AM Srikanth Sathyanarayana <<a href="mailto:srcs@mpcdf.mpg.de">srcs@mpcdf.mpg.de</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear PETSc developers,<br>
<br>
<br>
I am currently working on a Gyrokinetic code where I essentially have to <br>
implement a block structured grid approach in one of the subdomains of <br>
the phase space coordinates. I have attached one such example in the x - <br>
v_parallel subdomains where I go from a full grid to a grid based on 4 <br>
blocks (divided along x direction) which is still Cartesian but <br>
misaligned across blocks (the grid is a very coarse representation). So <br>
the idea is to basically create a library for the existing solver and <br>
try to implement the block structured grid approach which mainly <br>
involves some sort of interpolation between the blocks to align the points.<br>
<br>
<br>
I came up with an idea to implement this using DMDA. I looked into the <br>
old threads where you have suggested using DMComposite in order to <br>
tackle such problems although a clear path for the interpolation between <br>
the DM's was not clarified. Nonetheless, my main questions were:<br>
<br>
1. Do you still suggest using DMComposite to approach this problem.<br></blockquote><div><br></div><div>Maybe</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
2. Is there a way to use DMDA where the user provides the allocation? My <br>
main problem is that I am not allowed to change the solvers data structure<br></blockquote><div><br></div><div>I do not understand this question.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
3. I looked into VecCreateMPIWithArray for the user provided allocation, <br>
however I am not very sure if this Vector can be used with the DMDA <br>
operations.<br></blockquote><div><br></div><div>It is unlikely.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Overall, I request you to please let me know what you think of this <br>
approach (using DMDA) and I would be grateful if you could suggest me <br>
any alternatives.<br></blockquote><div><br></div><div>Can you give a short argument for your approach? For example, why would I want</div><div>to use a multi-block approach instead of just using a single block? To save on storage?</div><div>On computing? How much will you save? Why would I not want an unstructured grid</div><div>covering the same area? Why would I not use structured-adaptive refinement (octree)?</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thanks and regards,<br>
<br>
Srikanth<br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>