<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Greetings, <div class=""><br class=""></div><div class="">I have been trying to add on to the functionality of the adaptive grid solver featured in the ts/tutorials/ex11.c. </div><div class=""><br class=""></div><div class="">I noticed that there is not an option to set the initial, minimum or maximum refinement levels in the <span style="color: rgb(74, 92, 110); font-family: Menlo; font-size: 9pt; background-color: rgb(255, 255, 255);" class="">adaptToleranceFVM()</span><font color="#000000" class=""> function where the grid adaption operation takes place. When I use the function DMForestSetMaximumRefinement(…), I am returned with the error saying that the 'DM has already been set up'. </font></div><div class=""><font color="#000000" class=""><br class=""></font></div><div class=""><font color="#000000" class="">As a result, I looked into the DMForest tests and tutorials. I found that in dm/impls/forest/tests/ex2.c, various DMForests functions are being used. Nevertheless, the flow of operations of the grid adaption process is a bit different. In the test file, three DM objects are used :<b class=""><i class=""> Base DM - PreForest DM - PostForest DM</i></b>. Parameters such as the initial, and minimum refinement levels are assigned to the PreForest DM before it is set up. But in </font><span style="font-size: 9pt; color: rgb(74, 92, 110); font-family: Menlo; background-color: rgb(255, 255, 255);" class="">adaptToleranceFVM()</span><font color="#000000" class=""> in ex11.c, only 2 DM objects are used and hence these <span style="caret-color: rgb(0, 0, 0);" class="">parameters</span> cannot be assigned (i.e., the objects used are <b class=""><i class="">plex</i></b> and <b class=""><i class="">adaptedDM</i></b>). </font></div><div class=""><font color="#000000" class=""><br class=""></font></div><div class=""><font color="#000000" class="">I tried to replicate the </font><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><i style="font-weight: bold;" class="">Base DM - PreForest DM - PostForest DM </i><span style="font-style: normal;" class="">structure in </span></span><span style="caret-color: rgb(74, 92, 110); color: rgb(74, 92, 110); font-family: Menlo; background-color: rgb(255, 255, 255);" class="">adaptToleranceFVM()</span><font color="#000000" class=""> . However, I am returned with a multitude of errors. I do not include the error statements as I suspect that there is a fundamental problem with my adaption routine and a specific error won’t indicate the bigger problem. </font></div><div class=""><font color="#000000" class=""><br class=""></font></div><div class=""><font color="#000000" class="">In order to not be verbose in the email, I have included the GitHub link of the code that I have been working on. You can find the </font><span style="caret-color: rgb(74, 92, 110); color: rgb(74, 92, 110); font-family: Menlo; background-color: rgb(255, 255, 255);" class="">adaptToleranceFVM()</span><font color="#000000" class=""> in lines 1542 to 1739. I’d very much appreciate any feedback or suggestions on this segment. </font></div><div class=""><font color="#000000" class=""><br class=""></font></div><div class=""><font color="#000000" class=""><b class=""><i class="">Github Link : </i></b></font><span style="caret-color: rgb(36, 41, 46); color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; background-color: rgb(255, 255, 255);" class=""><a href="https://github.com/mukkund1996/petsc/blob/cbcf8824f12d1159c0f5dc84d028a4869a2a0594/amr/ex11_adapt_param.c#L1542" class="">https://github.com/mukkund1996/petsc/blob/cbcf8824f12d1159c0f5dc84d028a4869a2a0594/amr/ex11_adapt_param.c#L1542</a></span></div><div class=""><br class=""></div><div class="">Thank you in advanced.</div><div class=""><font color="#000000" class=""><b class=""><i class=""><br class=""></i></b></font></div><div class=""><font color="#000000" class="">Regards, </font></div><div class=""><font color="#000000" class=""><br class=""></font></div><div class=""><font color="#000000" class="">Mukkund Sunjii </font></div><div class=""><font color="#000000" class=""><br class=""></font></div><div class=""><br class=""></div></body></html>