<html><head></head><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:16px"><div id="yui_3_16_0_1_1468641671620_47864">That is wonderful. <br></div><div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" id="yui_3_16_0_1_1468641671620_47901" style="display: block;"><div style="font-family: times new roman, new york, times, serif; font-size: 16px;" id="yui_3_16_0_1_1468641671620_47900"><div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_1_1468641671620_47899"><div class="y_msg_container" id="yui_3_16_0_1_1468641671620_47898"><div id="yiv8797662287"><div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:16px;" id="yui_3_16_0_1_1468641671620_47897"><div id="yiv8797662287yui_3_16_0_1_1468641671620_44789"><br clear="none"></div><div id="yiv8797662287yui_3_16_0_1_1468641671620_44789">Given however that is a subsequent stage I would like to manipulate the grid </div><div dir="ltr" id="yiv8797662287yui_3_16_0_1_1468641671620_44789">hierarchy in my code, I would like to know what the equivalent function calls </div><div dir="ltr" id="yiv8797662287yui_3_16_0_1_1468641671620_44789">are (at least in my limited understanding). </div><div dir="ltr" id="yiv8797662287yui_3_16_0_1_1468641671620_44789"><br clear="none"></div><div dir="ltr" id="yiv8797662287yui_3_16_0_1_1468641671620_44789">I saw that snes/ex58.c has a FormJacobian using DMDA. I am looking for </div><div dir="ltr" id="yiv8797662287yui_3_16_0_1_1468641671620_44789">something similar that *gets* the Jacobian (instead on forming it) on the </div><div dir="ltr" id="yiv8797662287yui_3_16_0_1_1468641671620_44789">different levels (instead of on the finest level only). </div><div dir="ltr" id="yiv8797662287yui_3_16_0_1_1468641671620_44789"><br clear="none"></div><div dir="ltr" id="yiv8797662287yui_3_16_0_1_1468641671620_44789">Thanks again, Domenico. </div><div dir="ltr" id="yiv8797662287yui_3_16_0_1_1468641671620_44789"><br clear="none"></div><div class="yiv8797662287qtdSeparateBR" id="yui_3_16_0_1_1468641671620_47935"><br clear="none"></div><div class="yiv8797662287yqt0611469846" id="yiv8797662287yqt78932"><div class="yiv8797662287yahoo_quoted" id="yiv8797662287yui_3_16_0_1_1468641671620_44795" style="display: block;"> <div id="yiv8797662287yui_3_16_0_1_1468641671620_44794" style="font-family:times new roman, new york, times, serif;font-size:16px;"> <div id="yiv8797662287yui_3_16_0_1_1468641671620_44793" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div dir="ltr" id="yiv8797662287yui_3_16_0_1_1468641671620_44792"> <font id="yiv8797662287yui_3_16_0_1_1468641671620_44791" size="2" face="Arial"> </font><hr id="yiv8797662287yui_3_16_0_1_1468641671620_45533" size="1"> <b id="yiv8797662287yui_3_16_0_1_1468641671620_44976"><span id="yiv8797662287yui_3_16_0_1_1468641671620_44975" style="font-weight:bold;">From:</span></b> Matthew Knepley <knepley@gmail.com><br clear="none"> <b><span style="font-weight:bold;">To:</span></b> domenico lahaye <domenico_lahaye@yahoo.com> <br clear="none"><b id="yiv8797662287yui_3_16_0_1_1468641671620_45722"><span id="yiv8797662287yui_3_16_0_1_1468641671620_45721" style="font-weight:bold;">Cc:</span></b> PETSc Users List <petsc-users@mcs.anl.gov><br clear="none"> <b><span style="font-weight:bold;">Sent:</span></b> Monday, July 18, 2016 9:11 AM<br clear="none"> <b><span style="font-weight:bold;">Subject:</span></b> Re: [petsc-users] Regarding ksp ex42 - Citations<br clear="none"> </div> <div class="yiv8797662287y_msg_container" id="yiv8797662287yui_3_16_0_1_1468641671620_45703"><br clear="none"><div id="yiv8797662287"><div id="yiv8797662287yui_3_16_0_1_1468641671620_45702"><div dir="ltr" id="yiv8797662287yui_3_16_0_1_1468641671620_45701"><div class="yiv8797662287gmail_extra" id="yiv8797662287yui_3_16_0_1_1468641671620_45700"><div class="yiv8797662287gmail_quote" id="yiv8797662287yui_3_16_0_1_1468641671620_45699">On Mon, Jul 18, 2016 at 1:41 AM, domenico lahaye <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:domenico_lahaye@yahoo.com" target="_blank" href="mailto:domenico_lahaye@yahoo.com">domenico_lahaye@yahoo.com</a>></span> wrote:<br clear="none"><blockquote class="yiv8797662287gmail_quote" id="yiv8797662287yui_3_16_0_1_1468641671620_45698" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex;"><div id="yiv8797662287yui_3_16_0_1_1468641671620_45706"><div id="yiv8797662287yui_3_16_0_1_1468641671620_45705" style="color:rgb(0,0,0);"><div id="yiv8797662287yui_3_16_0_1_1468641671620_45715">Dear Matthew, </div><div id="yiv8797662287yui_3_16_0_1_1468641671620_45704"><br clear="none"></div><div dir="ltr"> I would like to place the FormJacobian statement in ex25.c in such a way that I can view </div><div dir="ltr">the result on the different levels. Can you please point me to an example? </div></div></div></blockquote><div><br clear="none"></div><div>You can use options to do this. For any KSP solve, you can use</div><div><br clear="none"></div><div> -ksp_view_mat draw</div><div><br clear="none"></div><div>for whatever viewer you want. In the mg cycle, you can use</div><div><br clear="none"></div><div> -mg_level_2_ksp_view_mat draw</div><div><br clear="none"></div><div>or for all levels</div><div><br clear="none"></div><div> -mg_levels_ksp_view_mat draw</div><div><br clear="none"></div><blockquote class="yiv8797662287gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex;"><div><div style="color:rgb(0,0,0);"><div dir="ltr"> I would like to do above with Galerkin coarsening as well. So yes, I do expect that I will need the </div><div dir="ltr">hooks attached to the different MG levels. I appreciate more pointers here as well. </div></div></div></blockquote><div><br clear="none"></div><div>The above should work with either method.</div><div><br clear="none"></div><div> Thanks,</div><div><br clear="none"></div><div> Matt</div><div> </div><blockquote class="yiv8797662287gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex;"><div><div style="color:rgb(0,0,0);"><div dir="ltr"> Thanks, Domenico. </div><div><br clear="none"></div><div><br clear="none"></div><div><b style="font-family:Arial;">From:</b><span style="font-family:Arial;font-size:small;"> Matthew Knepley <<a rel="nofollow" shape="rect" ymailto="mailto:knepley@gmail.com" target="_blank" href="mailto:knepley@gmail.com">knepley@gmail.com</a>></span><br clear="none"></div><div><br clear="none"><br clear="none"></div><div style="display:block;"><div style=""><div style="font-family:HelveticaNeue,;"><div dir="ltr"><font size="2" face="Arial"> <b><span style="font-weight:bold;">To:</span></b> domenico lahaye <<a rel="nofollow" shape="rect" ymailto="mailto:domenico_lahaye@yahoo.com" target="_blank" href="mailto:domenico_lahaye@yahoo.com">domenico_lahaye@yahoo.com</a>> <br clear="none"><b><span style="font-weight:bold;">Cc:</span></b> PETSc Users List <<a rel="nofollow" shape="rect" ymailto="mailto:petsc-users@mcs.anl.gov" target="_blank" href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>><br clear="none"> <b><span style="font-weight:bold;">Sent:</span></b> Monday, July 18, 2016 8:16 AM</font><div><div class="yiv8797662287h5"><br clear="none"> <b><span style="font-weight:bold;">Subject:</span></b> Re: [petsc-users] Regarding ksp ex42 - Citations<br clear="none"> </div></div> </div><div><div class="yiv8797662287h5"> <div><br clear="none"><div><div><div dir="ltr"><div><div>On Mon, Jul 18, 2016 at 12:59 AM, domenico lahaye <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:domenico_lahaye@yahoo.com" target="_blank" href="mailto:domenico_lahaye@yahoo.com">domenico_lahaye@yahoo.com</a>></span> wrote:<br clear="none"><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex;"><div><div style="color:rgb(0,0,0);"><div><div><div style="color:rgb(0,0,0);"><div><span>Thanks for all the pointers. </span></div><div><span><br clear="none"></span></div><div dir="ltr"><span>I am happy to switch to </span><span style="font-family:HelveticaNeue,;">ksp/examples/tutorials/ex25.c in a first instance as you suggest.</span></div><div dir="ltr"><span style="font-family:HelveticaNeue,;"><br clear="none"></span></div><div dir="ltr"><span style="font-family:HelveticaNeue,;"> I am still stuck with the same issue as before though. I am trying to extract the hierarchy </span></div><div dir="ltr"> of coarser grid matrices and the intergrid transfer operators from the DMDA data structure. I would </div><div dir="ltr"> like to modify these operators and define a multigrid cycle with the modified operators. </div><div dir="ltr"><br clear="none"></div><div dir="ltr"> Given A^h (Helmholtz) and M^h (shifted Laplace), I would like to define a multigrid cycle involving </div><div dir="ltr"> both A^H and M^H. Can I rely on the multilevel DMDA structure to construct A^H and M^H for me </div><div dir="ltr"> in a set-up phase, plug them into a user-defined context, and plug them back out in a solve phase? </div></div></div></div></div></div></blockquote><div><br clear="none"></div><div>If you are not using -pc_mg_galerkin, then the FormJacobian is called separately on each level to rediscretize the operator.</div><div>The only thing that changes is the DMDA that is passed to the call. If you need more information, there are hooks to</div><div>attach different contexts to each MG level. Do you need this?</div><div><br clear="none"></div><div> Thanks,</div><div><br clear="none"></div><div> Matt</div><div> <br clear="none"></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex;"><div><div style="color:rgb(0,0,0);"><div><div><div style="color:rgb(0,0,0);"><div dir="ltr">Thanks, Domenico. </div><div dir="ltr"><br clear="none"></div><div><br clear="none"></div><div></div></div></div></div><div> <div style=""> <div style="font-family:HelveticaNeue,;"> <div dir="ltr"> <font size="2" face="Arial"> </font><hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Matthew Knepley <<a rel="nofollow" shape="rect" ymailto="mailto:knepley@gmail.com" target="_blank" href="mailto:knepley@gmail.com">knepley@gmail.com</a>><br clear="none"> <b><span style="font-weight:bold;">To:</span></b> Barry Smith <<a rel="nofollow" shape="rect" ymailto="mailto:bsmith@mcs.anl.gov" target="_blank" href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> <br clear="none"><b><span style="font-weight:bold;">Cc:</span></b> domenico lahaye <<a rel="nofollow" shape="rect" ymailto="mailto:domenico_lahaye@yahoo.com" target="_blank" href="mailto:domenico_lahaye@yahoo.com">domenico_lahaye@yahoo.com</a>>; "<a rel="nofollow" shape="rect" ymailto="mailto:petsc-users@mcs.anl.gov" target="_blank" href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>" <<a rel="nofollow" shape="rect" ymailto="mailto:petsc-users@mcs.anl.gov" target="_blank" href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>><br clear="none"> <b><span style="font-weight:bold;">Sent:</span></b> Sunday, July 17, 2016 2:29 PM<br clear="none"> <b><span style="font-weight:bold;">Subject:</span></b> Re: [petsc-users] Regarding ksp ex42 - Citations<br clear="none"> </div> <div><br clear="none"><div><div><div dir="ltr"><div><div>On Sat, Jul 16, 2016 at 10:11 PM, Barry Smith <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:bsmith@mcs.anl.gov" target="_blank" href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br clear="none"><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex;"><span><br clear="none">
> On Jul 14, 2016, at 12:21 PM, domenico lahaye <<a rel="nofollow" shape="rect" ymailto="mailto:domenico_lahaye@yahoo.com" target="_blank" href="mailto:domenico_lahaye@yahoo.com">domenico_lahaye@yahoo.com</a>> wrote:<br clear="none">
><br clear="none">
</span><div><div>> Dear PETSc team,<br clear="none">
><br clear="none">
> 1) I am looking into ks/examples/tutorials/ex42.c I am still new to the DMDA structure<br clear="none">
> and likely not giving it as much time as it deserves. However, I do not see immediately<br clear="none">
> what function is responsible for calling PCMGSetSmoother and PCMGSetResidual.<br clear="none">
><br clear="none">
> I tried to call PCMGGetCoarseSolve(pc, &kcpc) and subsequently<br clear="none">
> KSPGetOperators (kspc, ... ) to check how the coarse grid operator is defined<br clear="none">
> after calling DMCoarsenHierarchy, but that failed.<br clear="none">
><br clear="none">
> I am solving Helmholtz with shifted Laplace, and managed to exploit DMDA to perform<br clear="none">
> a multigrid solve on the preconditioner. In a next stage I want to implement the deflation<br clear="none">
> using DMDA as well.<br clear="none">
><br clear="none">
> 2) On <a rel="nofollow" shape="rect" target="_blank" href="http://www.mcs.anl.gov/petsc/documentation/referencing.html">http://www.mcs.anl.gov/petsc/documentation/referencing.html</a> I see<br clear="none">
><br clear="none">
> @Misc{petsc-web-page,<br clear="none">
> author = {Satish Balay and Shrirang Abhyankar and Mark~F. Adams and Jed Brown and Peter Brune<br clear="none">
> and Kris Buschelman and Lisandro Dalcin and Victor Eijkhout and William~D. Gropp<br clear="none">
> and Dinesh Kaushik and Matthew~G. Knepley<br clear="none">
> and Lois Curfman McInnes and Karl Rupp and Barry~F. Smith<br clear="none">
> and Stefano Zampini and Hong Zhang and Hong Zhang},<br clear="none">
> title = {{PETS}c {W}eb page},<br clear="none">
> url = {<a rel="nofollow" shape="rect" target="_blank" href="http://www.mcs.anl.gov/petsc">http://www.mcs.anl.gov/petsc</a>},<br clear="none">
> howpublished = {\url{<a rel="nofollow" shape="rect" target="_blank" href="http://www.mcs.anl.gov/petsc%7D">http://www.mcs.anl.gov/petsc}</a>},<br clear="none">
> year = {2016}<br clear="none">
> }<br clear="none">
><br clear="none">
><br clear="none">
><br clear="none">
> Is the last author mentioned twice intentionally?<br clear="none">
><br clear="none">
> 3) On <a rel="nofollow" shape="rect" target="_blank" href="http://www.mcs.anl.gov/petsc/publications/petscapps-bib.html#OpenFOAM%202.2.1">http://www.mcs.anl.gov/petsc/publications/petscapps-bib.html#OpenFOAM%202.2.1</a> I see<br clear="none">
><br clear="none">
> @misc{OpenFOAM<br clear="none">
> ,<br clear="none">
><br clear="none">
><br clear="none">
> title = "OpenFOAM",<br clear="none">
><br clear="none">
> howpublished = "\url{<a rel="nofollow" shape="rect" target="_blank" href="http://www.openfoam.com/">http://www.openfoam.com</a>}",<br clear="none">
><br clear="none">
> url = {<a rel="nofollow" shape="rect" target="_blank" href="http://www.openfoam.com/">http://www.openfoam.com</a>},<br clear="none">
><br clear="none">
> note = "OpenFOAM is a free, open source CFD software package. It allows PETSc linear algebra and solvers to be used underneath.",<br clear="none">
><br clear="none">
> key = "OpenFOAM 2.2.1"<br clear="none">
><br clear="none">
> }<br clear="none">
><br clear="none">
><br clear="none">
> Do you have more information on the use of PETSc within OpenFoam?<br clear="none">
<br clear="none">
</div></div> Very good question. It seems that this citation is wrong or no longer valid; I have removed it from the PETSc repository. I could find no mention of PETSc usage in the OpenFoam and its third party packages. I think we should not have been listing this citation.</blockquote><div><br clear="none"></div><div>This suggests that people are using it with OpenFOAM: <a rel="nofollow" shape="rect" target="_blank" href="http://powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/PatersonNuTTS2009.pdf">http://powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/PatersonNuTTS2009.pdf</a></div><div><br clear="none"></div><div>In fact, they use PETSc in the dynamic overset grid implementation for OpenFOAM, which I think is an approved extension:</div><div><br clear="none"></div><div> <a rel="nofollow" shape="rect" target="_blank" href="http://web.student.chalmers.se/groups/ofw5/Abstracts/DavidBogerAbstractOFW5.pdf">http://web.student.chalmers.se/groups/ofw5/Abstracts/DavidBogerAbstractOFW5.pdf</a></div><div><div><br clear="none"></div><div> Matt</div><div> </div></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex;"><div><span><font color="#888888"><br clear="none">
Barry<br clear="none">
</font></span></div><div><div><div><br clear="none">
><br clear="none">
> 4) @matt in response to a question he raised in Vienna<br clear="none">
><br clear="none">
> MIPSE is a BEM solver. Details are on:<br clear="none">
> <a rel="nofollow" shape="rect" target="_blank" href="http://www.g2elab.grenoble-inp.fr/plateforms/mipse-modeling-of-interconnected-power-systems-632862.kjsp?RH=G2ELAB_R-MAGE">http://www.g2elab.grenoble-inp.fr/plateforms/mipse-modeling-of-interconnected-power-systems-632862.kjsp?RH=G2ELAB_R-MAGE</a><br clear="none">
><br clear="none">
> Cheers, Domenico Lahaye.</div><br clear="none">
><br clear="none">
<br clear="none"><span><font color="#888888">
</font></span></div></div></blockquote></div><span><font color="#888888"><br clear="none"><br clear="all"></font></span><div><br clear="none"></div>-- <br clear="none"><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 clear="none">-- Norbert Wiener</div><div class="yiv8797662287yqt1759445504" id="yiv8797662287yqtfd59186"><div><div>
</div></div></div></div></div></div></div><div class="yiv8797662287yqt1759445504" id="yiv8797662287yqtfd42706"><div><br clear="none"><br clear="none"></div></div></div><div class="yiv8797662287yqt1759445504" id="yiv8797662287yqtfd35368"><div> </div></div></div><div class="yiv8797662287yqt1759445504" id="yiv8797662287yqtfd11689"><div> </div></div></div><div class="yiv8797662287yqt1759445504" id="yiv8797662287yqtfd65340"><div> </div></div></div></div></div></blockquote></div><div class="yiv8797662287yqt1759445504" id="yiv8797662287yqtfd02200"><div><br clear="none"><br clear="all"><div><br clear="none"></div>-- <br clear="none"><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 clear="none">-- Norbert Wiener</div>
</div></div></div></div></div></div><div class="yiv8797662287yqt1759445504" id="yiv8797662287yqtfd64944"><br clear="none"><br clear="none"></div></div><div class="yiv8797662287yqt1759445504" id="yiv8797662287yqtfd31905"> </div></div></div></div><div class="yiv8797662287yqt1759445504" id="yiv8797662287yqtfd22532"> </div></div><div class="yiv8797662287yqt1759445504" id="yiv8797662287yqtfd61422"> </div></div></div></div></blockquote></div><div class="yiv8797662287yqt1759445504" id="yiv8797662287yqtfd00066"><br clear="none"><br clear="all"><div><br clear="none"></div>-- <br clear="none"><div class="yiv8797662287gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br clear="none">-- Norbert Wiener</div>
</div></div></div></div></div><br clear="none"><br clear="none"></div> </div> </div> </div></div></div></div><br><br></div> </div> </div> </div></div></body></html>