<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_39310">Dear Matthew, </div><div id="yui_3_16_0_1_1468641671620_39310"><br></div><div id="yui_3_16_0_1_1468641671620_39310" dir="ltr"> I would like to place the FormJacobian statement in ex25.c in such a way that I can view </div><div id="yui_3_16_0_1_1468641671620_39310" dir="ltr">the result on the different levels. Can you please point me to an example? </div><div id="yui_3_16_0_1_1468641671620_39310" dir="ltr"><br></div><div id="yui_3_16_0_1_1468641671620_39310" 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 id="yui_3_16_0_1_1468641671620_39310" dir="ltr">hooks attached to the different MG levels. I appreciate more pointers here as well. </div><div id="yui_3_16_0_1_1468641671620_39310" dir="ltr"><br></div><div id="yui_3_16_0_1_1468641671620_39310" dir="ltr"> Thanks, Domenico. </div><div id="yui_3_16_0_1_1468641671620_39310"><br></div><div id="yui_3_16_0_1_1468641671620_39310"><br></div><div id="yui_3_16_0_1_1468641671620_39310"><b id="yui_3_16_0_1_1468641671620_39455" style="font-family: Arial;">From:</b><span style="font-family: Arial; font-size: small;" id="yui_3_16_0_1_1468641671620_39466"> Matthew Knepley <knepley@gmail.com></span><br></div><div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" id="yui_3_16_0_1_1468641671620_39330" style="display: block;"><div style="font-family: times new roman, new york, times, serif; font-size: 16px;" id="yui_3_16_0_1_1468641671620_39328"><div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_1_1468641671620_39326"><div dir="ltr" id="yui_3_16_0_1_1468641671620_39324"><font size="2" face="Arial" id="yui_3_16_0_1_1468641671620_39323"> <b id="yui_3_16_0_1_1468641671620_39465"><span style="font-weight: bold;" id="yui_3_16_0_1_1468641671620_39464">To:</span></b> domenico lahaye <domenico_lahaye@yahoo.com> <br><b><span style="font-weight: bold;">Cc:</span></b> PETSc Users List <petsc-users@mcs.anl.gov><br> <b><span style="font-weight: bold;">Sent:</span></b> Monday, July 18, 2016 8:16 AM<br> <b id="yui_3_16_0_1_1468641671620_39454"><span style="font-weight: bold;" id="yui_3_16_0_1_1468641671620_39453">Subject:</span></b> Re: [petsc-users] Regarding ksp ex42 - Citations<br> </font> </div> <div class="y_msg_container" id="yui_3_16_0_1_1468641671620_39336"><br><div id="yiv2032610232"><div id="yui_3_16_0_1_1468641671620_39335"><div dir="ltr" id="yui_3_16_0_1_1468641671620_39334"><div class="yiv2032610232gmail_extra" id="yui_3_16_0_1_1468641671620_39333"><div class="yiv2032610232gmail_quote" id="yui_3_16_0_1_1468641671620_39332">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 class="yiv2032610232gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;" id="yui_3_16_0_1_1468641671620_39331"><div id="yui_3_16_0_1_1468641671620_39342"><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_39341"><div id="yui_3_16_0_1_1468641671620_39340"><div id="yui_3_16_0_1_1468641671620_39339"><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_39338"><div id="yui_3_16_0_1_1468641671620_39343"><span id="yui_3_16_0_1_1468641671620_39344">Thanks for all the pointers. </span></div><div id="yui_3_16_0_1_1468641671620_39337"><span><br clear="none"></span></div><div dir="ltr" id="yui_3_16_0_1_1468641671620_39346"><span id="yui_3_16_0_1_1468641671620_39345">I am happy to switch to </span><span style="font-family:HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;">ksp/examples/tutorials/ex25.c in a first instance as you suggest.</span></div><div dir="ltr" id="yui_3_16_0_1_1468641671620_39452"><span style="font-family:HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"><br clear="none"></span></div><div dir="ltr" id="yui_3_16_0_1_1468641671620_39450"><span style="font-family:HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;" id="yui_3_16_0_1_1468641671620_39451"> 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" id="yui_3_16_0_1_1468641671620_39449"> like to modify these operators and define a multigrid cycle with the modified operators. </div><div dir="ltr" id="yui_3_16_0_1_1468641671620_39417"><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 id="yui_3_16_0_1_1468641671620_39375"><br clear="none"></div><div id="yui_3_16_0_1_1468641671620_39374">If you are not using -pc_mg_galerkin, then the FormJacobian is called separately on each level to rediscretize the operator.</div><div id="yui_3_16_0_1_1468641671620_39376">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 id="yui_3_16_0_1_1468641671620_39377">attach different contexts to each MG level. Do you need this?</div><div id="yui_3_16_0_1_1468641671620_39378"><br clear="none"></div><div id="yui_3_16_0_1_1468641671620_39379"> Thanks,</div><div id="yui_3_16_0_1_1468641671620_39380"><br clear="none"></div><div id="yui_3_16_0_1_1468641671620_39381"> Matt</div><div id="yui_3_16_0_1_1468641671620_39382"> <br></div><blockquote class="yiv2032610232gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;" id="yui_3_16_0_1_1468641671620_39389"><div id="yui_3_16_0_1_1468641671620_39388"><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_39387"><div><div><div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:16px;"><div dir="ltr">Thanks, Domenico. </div><div dir="ltr"><br clear="none"></div><div><br clear="none"></div><div></div></div></div></div><div id="yui_3_16_0_1_1468641671620_39386"> <div style="font-family:times new roman, new york, times, serif;font-size:16px;" id="yui_3_16_0_1_1468641671620_39385"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;" id="yui_3_16_0_1_1468641671620_39384"> <div dir="ltr" id="yui_3_16_0_1_1468641671620_39383"> <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 class="yiv2032610232HOEnZb"><font color="#888888">
</font></span></div></div></blockquote></div><span class="yiv2032610232HOEnZb"><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="yiv2032610232yqt2768162917" id="yiv2032610232yqtfd56620"><div>
</div></div></div></div></div></div><div class="yiv2032610232yqt2768162917" id="yiv2032610232yqtfd78377"><br clear="none"><br clear="none"></div></div><div class="yiv2032610232yqt2768162917" id="yiv2032610232yqtfd40915"> </div></div><div class="yiv2032610232yqt2768162917" id="yiv2032610232yqtfd20678"> </div></div><div class="yiv2032610232yqt2768162917" id="yiv2032610232yqtfd48365"> </div></div></div></div></blockquote></div><div class="yiv2032610232yqt2768162917" id="yiv2032610232yqtfd42288"><br clear="none"><br clear="all"><div><br clear="none"></div>-- <br clear="none"><div class="yiv2032610232gmail_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><br></div> </div> </div> </div></div></body></html>