<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, May 23, 2016 at 12:23 PM, Nestor Cerpa Gilvonio <span dir="ltr"><<a href="mailto:ncerpagi@umn.edu" target="_blank">ncerpagi@umn.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Thank you for the response. <div>However, I am unsure what you mean by “to handle discretization themselves”. Would you recommend (or is it possible) to still use PetscFE/PetscQuadrature functions and then use this data to evaluate residual and jacobian using SNESSet…(), or is it better to just use our own pieces of code for all of this ?</div></div></blockquote><div><br></div><div>I mean they use DMPlex to handle topolgoy/geometry and PetscSection to handle parallel data layout. However,</div><div>they do not use PetscFE/FV or PetscDS, instead managing the discretization and assembly themselves.</div><div><br></div><div>You could easily use PetscFE/Quad and your own assembly loop (its fairly easy to look at mine). I would recommend</div><div>the local version SNESSetFunctionLocal().</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><span class=""><div>Thanks,</div><div> </div><div>Nestor</div><div><br></div><div><br></div><div>---------------------------------------------------</div><div>---------------------------------------------------</div><div><br></div><div>Nestor Cerpa Gilvonio</div></span><div>Postdoctoral researcher</div><span class=""><div><br></div><div>Department of Earth Sciences</div><div>University of Minnesota</div><div>310 Pillsbury Drive SE</div><div>Minnepolis, MN 55455</div><div><div><br></div></div><div>E-mail :<span> </span><a href="mailto:ncerpagi@umn.edu" target="_blank">ncerpagi@umn.edu</a></div></span></div><br style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div></div></div></div></div></div>
</div><div><div class="h5">
<br><div><blockquote type="cite"><div>On May 22, 2016, at 7:06 AM, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:</div><br><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_extra"><div class="gmail_quote">On Sun, May 22, 2016 at 2:08 AM, Nestor Cerpa<span> </span><span dir="ltr"><<a href="mailto:ncerpagi@umn.edu" target="_blank">ncerpagi@umn.edu</a>></span><span> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">Hello, <div><br></div><div>I am trying to use PetscDSSetResidual and PetscDSSetJacobian in a simple fortran code but they seem to be missing in the include files (petsc-master). I get this error message : </div></div></blockquote><div><br></div><div>They are not there. Taking function pointers from Fortran is complex, and I do not understand the new</div><div>framework that Jed put in place to do this. It is used, for example in SNESSetFunction(). I would be</div><div>happy to integrate code if you have time to implement it, but right now I am pressed for time.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><i>Undefined symbols for architecture x86_64:</i></div><div><i> <span> </span>"_petscdssetresidual_", referenced from:</i></div><div><i>     <span> </span>_MAIN__ in Poisson.o</i></div><div><i>ld: symbol(s) not found for architecture x86_64</i></div><div><i>collect2: error: ld returned 1 exit status</i></div><div><i>make: [Poisson] Error 1 (ignored)</i></div><div><i>/bin/rm -f -f Poisson.o</i></div></div><div><br></div><div>I am also wondering if there are snes examples like ex12 or ex62 in fortran?</div></div></blockquote><div><br></div><div>Everyone using Plex in Fortran has so far preferred to handle the discretization themselves. I hope</div><div>that changes, but as you note I will have to get the pointwise function support in there first.</div><div><br></div><div> <span> </span>Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Thanks, </div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Nestor<br><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">---------------------------------------------------</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">---------------------------------------------------</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Nestor Cerpa Gilvonio</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Postdoctoral research associate</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Department of Earth Sciences</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">University of Minnesota</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">310 Pillsbury Drive SE</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Minnepolis, MN 55455</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">E-mail : <a href="mailto:cerpa003@umn.edu" target="_blank">ncerpagi@umn.edu</a></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div></div><br></div></div></blockquote></div><br><br clear="all"><div><br></div>--<span> </span><br><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>-- Norbert Wiener</div></div></div></div></blockquote></div><br></div></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_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>-- Norbert Wiener</div>
</div></div>