<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="auto">Great, thanks for the input so far. We will wait for Matt's response soonish.</div>
<div id="ms-outlook-mobile-body-separator-line" dir="auto"><br>
</div>
<div dir="auto" id="ms-outlook-mobile-signature">
<div dir="auto"><span style="font-size:12pt">Sincerely,</span><br>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">Joe Alexandersen</div>
<div dir="auto">Associate Professor</div>
<div dir="auto">DFF Sapere Aude Research Leader</div>
<div dir="auto"><br>
</div>
<div dir="auto">The Faculty of Engineering</div>
<div dir="auto">Institute of Mechanical and Electrical Engineering</div>
<div dir="auto">SDU Mechanical Engineering</div>
<div dir="auto"><br>
</div>
<div dir="auto">T <span style="font-size:12pt">+45 65 50 74 65</span></div>
<div dir="auto">M <span style="font-size:12pt">+45 93 50 72 44</span></div>
<div dir="auto"><br>
</div>
<div dir="auto">joal@sdu.dk</div>
<div dir="auto"><a href="https://urldefense.us/v3/__http://www.sdu.dk/ansat/joal__;!!G_uCfscf7eWS!aMq_eBTTAvLdy-GtpWdAVq8zqDaObi_eL0EKi7yFbh6VUSQCx-pDonMSd9Rejkpr3DBMyE15NaaOKv14zQ$">www.sdu.dk/ansat/joal</a></div>
<div dir="auto"><br>
</div>
<div dir="auto">University of Southern Denmark</div>
<div dir="auto">Campusvej 55</div>
<div dir="auto">DK-5230 Odense M</div>
<div dir="auto"><a href="https://urldefense.us/v3/__http://www.sdu.dk__;!!G_uCfscf7eWS!aMq_eBTTAvLdy-GtpWdAVq8zqDaObi_eL0EKi7yFbh6VUSQCx-pDonMSd9Rejkpr3DBMyE15NaYjcKBeNw$">www.sdu.dk</a></div>
<div dir="auto"><br>
</div>
<div>Sent from <a href="https://urldefense.us/v3/__https://aka.ms/AAb9ysg__;!!G_uCfscf7eWS!aMq_eBTTAvLdy-GtpWdAVq8zqDaObi_eL0EKi7yFbh6VUSQCx-pDonMSd9Rejkpr3DBMyE15NaYUzarulQ$">Outlook for Android</a></div>
</div>
<div dir="auto" id="mail-editor-reference-message-container"><br>
<hr style="display:inline-block;width:98%">
<div id="divRplyFwdMsg" style="font-size: 11pt;"><strong>From:</strong> Mark Adams <mfadams@lbl.gov><br>
<strong>Sent:</strong> Thursday, March 20, 2025 5:00:31 pm<br>
<strong>To:</strong> Barry Smith <bsmith@petsc.dev><br>
<strong>Cc:</strong> Joe Alexandersen <joal@sdu.dk>; petsc-users@mcs.anl.gov <petsc-users@mcs.anl.gov><br>
<strong>Subject:</strong> Re: [petsc-users] Semi-coarsening for GMG using DMDA?<br>
</div>
<br>
<table border="0" cellspacing="0" cellpadding="0" width="100%" align="left" style="background-image: revert !important; background-position: revert !important; background-size: revert !important; background-repeat: revert !important; background-attachment: revert !important; background-origin: revert !important; background-clip: revert !important; bottom: revert !important; direction: revert !important; font-size: revert !important; height: revert !important; letter-spacing: revert !important; line-height: revert !important; margin: revert !important; opacity: revert !important; order: revert !important; outline: revert !important; overflow: revert !important; padding: revert !important; position: revert !important; tab-size: revert !important; text-align: revert !important; text-indent: revert !important; text-orientation: revert !important; text-overflow: revert !important; text-transform: revert !important; top: revert !important; vertical-align: revert !important; visibility: revert !important; white-space: revert !important; word-break: revert !important; word-spacing: revert !important; writing-mode: revert !important; zoom: revert !important; border: 0px !important; display: table !important; width: 100% !important; table-layout: fixed !important; float: none !important; border-spacing: 0px !important; color: revert; background-color: revert;">
<tbody style="background-image: revert !important; background-position: revert !important; background-size: revert !important; background-repeat: revert !important; background-attachment: revert !important; background-origin: revert !important; background-clip: revert !important; border: revert !important; bottom: revert !important; direction: revert !important; font-size: revert !important; height: revert !important; letter-spacing: revert !important; line-height: revert !important; margin: revert !important; opacity: revert !important; order: revert !important; outline: revert !important; overflow: revert !important; padding: revert !important; position: revert !important; tab-size: revert !important; table-layout: revert !important; text-align: revert !important; text-indent: revert !important; text-orientation: revert !important; text-overflow: revert !important; text-transform: revert !important; top: revert !important; vertical-align: revert !important; visibility: revert !important; white-space: revert !important; width: revert !important; word-break: revert !important; word-spacing: revert !important; writing-mode: revert !important; zoom: revert !important; display: block !important; color: revert; background-color: revert;">
<tr style="background-image: revert !important; background-position: revert !important; background-size: revert !important; background-repeat: revert !important; background-attachment: revert !important; background-origin: revert !important; background-clip: revert !important; border: revert !important; bottom: revert !important; direction: revert !important; display: revert !important; font-size: revert !important; height: revert !important; letter-spacing: revert !important; line-height: revert !important; margin: revert !important; opacity: revert !important; order: revert !important; outline: revert !important; overflow: revert !important; padding: revert !important; position: revert !important; tab-size: revert !important; table-layout: revert !important; text-align: revert !important; text-indent: revert !important; text-orientation: revert !important; text-overflow: revert !important; text-transform: revert !important; top: revert !important; vertical-align: revert !important; visibility: revert !important; white-space: revert !important; width: revert !important; word-break: revert !important; word-spacing: revert !important; writing-mode: revert !important; zoom: revert !important; color: revert; background-color: revert;">
<td valign="middle" width="1px" cellpadding="7px 2px 7px 2px" style="background-image: revert !important; background-position: revert !important; background-size: revert !important; background-repeat: revert !important; background-attachment: revert !important; background-origin: revert !important; background-clip: revert !important; border: revert !important; bottom: revert !important; direction: revert !important; display: revert !important; font-size: revert !important; height: revert !important; letter-spacing: revert !important; line-height: revert !important; margin: revert !important; opacity: revert !important; order: revert !important; outline: revert !important; overflow: revert !important; position: revert !important; tab-size: revert !important; table-layout: revert !important; text-align: revert !important; text-indent: revert !important; text-orientation: revert !important; text-overflow: revert !important; text-transform: revert !important; top: revert !important; vertical-align: revert !important; visibility: revert !important; white-space: revert !important; word-break: revert !important; word-spacing: revert !important; writing-mode: revert !important; zoom: revert !important; padding: 7px 2px !important; width: 0px !important; color: revert; background-color: rgb(166, 166, 166);">
</td>
<td valign="middle" width="100%" cellpadding="7px 5px 7px 15px" style="background-image: revert !important; background-position: revert !important; background-size: revert !important; background-repeat: revert !important; background-attachment: revert !important; background-origin: revert !important; background-clip: revert !important; border: revert !important; bottom: revert !important; direction: revert !important; display: revert !important; height: revert !important; letter-spacing: revert !important; line-height: revert !important; margin: revert !important; opacity: revert !important; order: revert !important; outline: revert !important; overflow: revert !important; position: revert !important; tab-size: revert !important; table-layout: revert !important; text-indent: revert !important; text-orientation: revert !important; text-overflow: revert !important; text-transform: revert !important; top: revert !important; vertical-align: revert !important; visibility: revert !important; white-space: revert !important; word-break: revert !important; word-spacing: revert !important; writing-mode: revert !important; zoom: revert !important; width: 100% !important; padding: 7px 5px 7px 15px !important; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif !important; font-size: 12px !important; font-weight: normal !important; text-align: left !important; overflow-wrap: break-word !important; color: rgb(33, 33, 33); background-color: rgb(234, 234, 234);">
<div style="background-image: revert !important; background-position: revert !important; background-size: revert !important; background-repeat: revert !important; background-attachment: revert !important; background-origin: revert !important; background-clip: revert !important; border: revert !important; bottom: revert !important; direction: revert !important; display: revert !important; font-size: revert !important; height: revert !important; letter-spacing: revert !important; line-height: revert !important; margin: revert !important; opacity: revert !important; order: revert !important; outline: revert !important; overflow: revert !important; padding: revert !important; position: revert !important; tab-size: revert !important; table-layout: revert !important; text-align: revert !important; text-indent: revert !important; text-orientation: revert !important; text-overflow: revert !important; text-transform: revert !important; top: revert !important; vertical-align: revert !important; visibility: revert !important; white-space: revert !important; width: revert !important; word-break: revert !important; word-spacing: revert !important; writing-mode: revert !important; zoom: revert !important; color: revert; background-color: revert;">
You don't often get email from mfadams@lbl.gov. <a href="https://urldefense.us/v3/__https://aka.ms/LearnAboutSenderIdentification__;!!G_uCfscf7eWS!aMq_eBTTAvLdy-GtpWdAVq8zqDaObi_eL0EKi7yFbh6VUSQCx-pDonMSd9Rejkpr3DBMyE15NaasFl50jQ$" style="background-image: revert !important; background-position: revert !important; background-size: revert !important; background-repeat: revert !important; background-attachment: revert !important; background-origin: revert !important; background-clip: revert !important; direction: revert !important; display: revert !important; font-size: revert !important; opacity: revert !important; visibility: revert !important; color: revert; background-color: revert;">
Learn why this is important</a> </div>
</td>
<td valign="middle" align="left" width="75px" cellpadding="7px 5px 7px 5px" style="background-image: revert !important; background-position: revert !important; background-size: revert !important; background-repeat: revert !important; background-attachment: revert !important; background-origin: revert !important; background-clip: revert !important; border: revert !important; bottom: revert !important; direction: revert !important; display: revert !important; height: revert !important; letter-spacing: revert !important; line-height: revert !important; margin: revert !important; opacity: revert !important; order: revert !important; outline: revert !important; overflow: revert !important; position: revert !important; tab-size: revert !important; table-layout: revert !important; text-indent: revert !important; text-orientation: revert !important; text-overflow: revert !important; text-transform: revert !important; top: revert !important; vertical-align: revert !important; visibility: revert !important; white-space: revert !important; word-break: revert !important; word-spacing: revert !important; writing-mode: revert !important; zoom: revert !important; width: 75px !important; padding: 7px 5px !important; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif !important; font-size: 12px !important; font-weight: normal !important; text-align: left !important; overflow-wrap: break-word !important; color: rgb(33, 33, 33); background-color: rgb(234, 234, 234);">
</td>
</tr>
</tbody>
</table>
<div>
<div dir="ltr">We have worked on semi coarsening in DMPlex, but it is not finished and we are not working on it now.
<div><br>
</div>
<div>I'm not sure about how easy it would be in DMDA, but Barry is suggesting that it is doable.</div>
<div><br>
</div>
<div>We need to wait for Matt and he is on travel so his response may be delayed.</div>
<div><br>
</div>
<div>Mark</div>
</div>
<br>
<div class="gmail_quote gmail_quote_container">
<div dir="ltr" class="gmail_attr">On Thu, Mar 20, 2025 at 11:34 AM Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div>
<div><br>
</div>
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.
<div><br>
</div>
<div> Barry</div>
<div><br id="m_-8071402959755348940lineBreakAtBeginningOfMessage">
<div><br>
<blockquote type="cite">
<div>On Mar 20, 2025, at 5:56 AM, Joe Alexandersen via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:</div>
<br>
<div>
<div style="font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
Dear PETSc developers,</div>
<div style="font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
<br>
</div>
<div style="font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
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.</div>
<div style="font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
<br>
</div>
<div style="font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
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?</div>
<div style="font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
<br>
</div>
<div style="font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
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?</div>
<div style="font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
<br>
</div>
<div style="font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
Thanks in advance!</div>
<div style="font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
<br>
</div>
<div style="font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
Sincerely,</div>
<div style="font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
Joe Alexandersen</div>
<div style="font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt">
University of Southern Denmark</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
</div>
<br>
</div>
</body>
</html>