[petsc-users] Semi-coarsening for GMG using DMDA?
Matthew Knepley
knepley at gmail.com
Sat Mar 22 09:31:12 CDT 2025
On Thu, Mar 20, 2025 at 12:09 PM Joe Alexandersen via petsc-users <
petsc-users at mcs.anl.gov> wrote:
> Great, thanks for the input so far. We will wait for Matt's response
> soonish.
>
Looking at the code, as Barry says, it should work. Please let us know if
it does not.
You can also do this with Plex, as Mark says. The drawback here is that I
do not have code
to determine that this kind of refinement is nested. Therefore it will fall
back to the slow code
for constructing arbitrary interpolators. If you really wanted this, we
could improve the interpolator
code to be fast for this kind of nesting.
Thanks,
Matt
> Sincerely,
>
> Joe Alexandersen
> Associate Professor
> DFF Sapere Aude Research Leader
>
> The Faculty of Engineering
> Institute of Mechanical and Electrical Engineering
> SDU Mechanical Engineering
>
> T +45 65 50 74 65
> M +45 93 50 72 44
>
> joal at sdu.dk
> https://urldefense.us/v3/__http://www.sdu.dk/ansat/joal__;!!G_uCfscf7eWS!cacecPogIX0oMUXWnjWaHZ7dJFfObkYjqmStlNjP3kCbpcRSU1p7oCURf7NF9Zx80rIwseka_1xx3YSVnMqM$
> <https://urldefense.us/v3/__http://www.sdu.dk/ansat/joal__;!!G_uCfscf7eWS!aMq_eBTTAvLdy-GtpWdAVq8zqDaObi_eL0EKi7yFbh6VUSQCx-pDonMSd9Rejkpr3DBMyE15NaaOKv14zQ$>
>
> University of Southern Denmark
> Campusvej 55
> DK-5230 Odense M
> https://urldefense.us/v3/__http://www.sdu.dk__;!!G_uCfscf7eWS!cacecPogIX0oMUXWnjWaHZ7dJFfObkYjqmStlNjP3kCbpcRSU1p7oCURf7NF9Zx80rIwseka_1xx3QPJTHXE$
> <https://urldefense.us/v3/__http://www.sdu.dk__;!!G_uCfscf7eWS!aMq_eBTTAvLdy-GtpWdAVq8zqDaObi_eL0EKi7yFbh6VUSQCx-pDonMSd9Rejkpr3DBMyE15NaYjcKBeNw$>
>
> Sent from Outlook for Android
> <https://urldefense.us/v3/__https://aka.ms/AAb9ysg__;!!G_uCfscf7eWS!aMq_eBTTAvLdy-GtpWdAVq8zqDaObi_eL0EKi7yFbh6VUSQCx-pDonMSd9Rejkpr3DBMyE15NaYUzarulQ$>
>
> ------------------------------
> *From:* Mark Adams <mfadams at lbl.gov>
> *Sent:* Thursday, March 20, 2025 5:00:31 pm
> *To:* Barry Smith <bsmith at petsc.dev>
> *Cc:* Joe Alexandersen <joal at sdu.dk>; petsc-users at mcs.anl.gov <
> petsc-users at mcs.anl.gov>
> *Subject:* Re: [petsc-users] Semi-coarsening for GMG using DMDA?
>
> You don't often get email from mfadams at lbl.gov. Learn why this is
> important
> <https://urldefense.us/v3/__https://aka.ms/LearnAboutSenderIdentification__;!!G_uCfscf7eWS!aMq_eBTTAvLdy-GtpWdAVq8zqDaObi_eL0EKi7yFbh6VUSQCx-pDonMSd9Rejkpr3DBMyE15NaasFl50jQ$>
> We have worked on semi coarsening in DMPlex, but it is not finished and we
> are not working on it now.
>
> I'm not sure about how easy it would be in DMDA, but Barry is suggesting
> that it is doable.
>
> We need to wait for Matt and he is on travel so his response may
> be delayed.
>
> Mark
>
> On Thu, Mar 20, 2025 at 11:34 AM Barry Smith <bsmith at petsc.dev> wrote:
>
>>
>> In theory you can do as you propose. In the context below uniform
>> refinement" only means that the coordinates of the DMDA are ignored so each
>> refinement. The interpolation is fine woth different refinements in the
>> different coordinate directions.
>>
>> Barry
>>
>>
>> On Mar 20, 2025, at 5:56 AM, Joe Alexandersen via petsc-users <
>> petsc-users at mcs.anl.gov> wrote:
>>
>> Dear PETSc developers,
>>
>> We are working with a code that uses regular meshes (DMDA) and geometric
>> multigrid. We would like to go from uniform coarsening/refinement to
>> semi-coarsening/refinement, due to anisotropy in our underlying equations.
>> We have tried to figure out if we can do this using built-in functions of
>> PETSc, but it is unclear to us whether we can get it done relatively easily.
>>
>> It seems that we can go from the coarsest grid and refine differently in
>> each direction using DMDASetRefinementFactor and then use DMRefine to
>> define the finer levels. However, from the doc page for
>> DMCreateInterpolation, it states that it only works for "uniform
>> refinement" which to me seems to indicate it will not work with different
>> refinement in each direction. But on the other hand, it states that it
>> should work if using DMRefine, which I assume used the information from
>> DMDASetRefinementFactor upon creation?
>>
>> So our questions are: is there are feasible and relatively simple way to
>> do semi-coarsening/refinement of DMDAs for geometric multigrid hierarchies?
>> Would the above work?
>>
>> Thanks in advance!
>>
>> Sincerely,
>> Joe Alexandersen
>> University of Southern Denmark
>>
>>
>>
>
--
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://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!cacecPogIX0oMUXWnjWaHZ7dJFfObkYjqmStlNjP3kCbpcRSU1p7oCURf7NF9Zx80rIwseka_1xx3Rrvue7x$ <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!cacecPogIX0oMUXWnjWaHZ7dJFfObkYjqmStlNjP3kCbpcRSU1p7oCURf7NF9Zx80rIwseka_1xx3SzbE9he$ >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20250322/bcb09c57/attachment.html>
More information about the petsc-users
mailing list