<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-04-03 23:58 GMT+02:00 Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-"></span><div>There are no tutorials, and almost no documentation.</div></div></div></div></blockquote><div> </div><div>Uhh, I'm not sure whether it makes sense for me to use PETSc then.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> The best thing to look at is TS ex11. This solves a bunch of different equations</div><div>(advection, shallow water, Euler) with a "pointwise" Riemann solver. Feel free to ask questions about it. </div></div></div></div></blockquote><div><br></div><div>We have never talked about Riemann solvers in our CFD course, and I don't understand what's going on in ex11.<br></div><div>However, if you could answer a few of my questions, you'll give me a good start with PETSc. For the simple poisson problem that I am trying to implement, I have to discretize div(k grad u) integrated over each FV cell, where k is the known diffusivity, and u is the vector to solve for. The cell integral is approximated as the sum of the fluxes (k grad u) in each face centroid multiplied by each surface area vector. In principle, I have all necessary information available in the DMPlex to assemble the FV matrix for  div(k grad u), assuming an orthogonal grid for the beginning.<br>But I thought that the gradient coefficients should be available in the PETScFVFaceGeom.grad elements of the faceGeometry vector after using the methods<br><pre><a href="https://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/DMPLEX/DMPlexComputeGeometryFVM.html#DMPlexComputeGeometryFVM">DMPlexComputeGeometryFVM</a>(<a href="https://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/DM/DM.html#DM">DM</a> dm, <a href="https://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Vec/Vec.html#Vec">Vec</a> *cellgeom, <a href="https://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Vec/Vec.html#Vec">Vec</a> *facegeom) and<br><a href="https://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/DMPLEX/DMPlexComputeGradientFVM.html#DMPlexComputeGradientFVM">DMPlexComputeGradientFVM</a>(<a href="https://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/DM/DM.html#DM">DM</a> dm, <a href="https://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/DM/PetscFV.html#PetscFV">PetscFV</a> fvm, <a href="https://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/Vec/Vec.html#Vec">Vec</a> faceGeometry, <a href="https://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/Vec/Vec.html#Vec">Vec</a> cellGeometry, <a href="https://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/DM/DM.html#DM">DM</a> *dmGrad)<br></pre></div><div>But, while these calls fill in the cell and face centroids, volumes and normals, the PETScFVFaceGeom.grad elements of the faceGeometry vector are all zero. Am I misunderstanding the purpose of DMPlexComputeGradientFVM?<br><br></div><div>(My second question is more general about the PETSc installation. When I configure PETSc with "--prefix=/somewhere --download-triangle --download-parmetis" etc., these extra libraries are built correctly during the make step, but they are not copied to /somewhere during the "make install" step. Also the pkg-config files don't include the details about the extra libraries. Is it intended that one has to manually correct the install directory, or am I missing something during the configuration or installation steps?)<br><br></div><div>If I ever get this poisson problem implemented, you're welcome to share it as another FVM example. But I am afraid, I'll have a few more questions before I can come up with something useful.<br><br></div><div>Thanks<br></div><div>Ingo<br></div><div><br></div></div><br></div></div><div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br> <table style="border-top:1px solid #d3d4de">
        <tr>
      <td style="width:55px;padding-top:18px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" width="46" height="29" style="width: 46px; height: 29px;"></a></td>
                <td style="width:470px;padding-top:17px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Virenfrei. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank" style="color:#4453ea">www.avast.com</a>            </td>
        </tr>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div>