[petsc-users] Using DMDA for a block-structured grid approach

Matthew Knepley knepley at gmail.com
Mon Jun 26 11:05:07 CDT 2023


On Mon, Jun 26, 2023 at 11:44 AM Srikanth Sathyanarayana <srcs at mpcdf.mpg.de>
wrote:

> Dear PETSc developers,
>
>
> I am currently working on a Gyrokinetic code where I essentially have to
> implement a block structured grid approach in one of the subdomains of
> the phase space coordinates. I have attached one such example in the x -
> v_parallel subdomains where I go from a full grid to a grid based on 4
> blocks (divided along x direction) which is still Cartesian but
> misaligned across blocks (the grid is a very coarse representation). So
> the idea is to basically create a library for the existing solver and
> try to implement the block structured grid approach which mainly
> involves some sort of interpolation between the blocks to align the points.
>
>
> I came up with an idea to implement this using DMDA. I looked into the
> old threads where you have suggested using DMComposite in order to
> tackle such problems although a clear path for the interpolation between
> the DM's was not clarified. Nonetheless, my main questions were:
>
> 1. Do you still suggest using DMComposite to approach this problem.
>

Maybe


> 2. Is there a way to use DMDA where the user provides the allocation? My
> main problem is that I am not allowed to change the solvers data structure
>

I do not understand this question.


> 3. I looked into VecCreateMPIWithArray for the user provided allocation,
> however I am not very sure if this Vector can be used with the DMDA
> operations.
>

It is unlikely.


> Overall, I request you to please let me know what you think of this
> approach (using DMDA) and I would be grateful if you could suggest me
> any alternatives.
>

Can you give a short argument for your approach? For example, why would I
want
to use a multi-block approach instead of just using a single block? To save
on storage?
On computing? How much will you save? Why would I not want an unstructured
grid
covering the same area? Why would I not use structured-adaptive refinement
(octree)?

  Thanks,

     Matt


> Thanks and regards,
>
> Srikanth
>


-- 
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

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230626/aa10d96d/attachment.html>


More information about the petsc-users mailing list