[petsc-users] examples of DMPlex*FVM methods

Ingo Gaertner ingogaertner.tus at gmail.com
Tue Apr 4 12:18:00 CDT 2017


2017-04-03 23:58 GMT+02:00 Matthew Knepley <knepley at gmail.com>:

> There are no tutorials, and almost no documentation.
>

Uhh, I'm not sure whether it makes sense for me to use PETSc then.


> The best thing to look at is TS ex11. This solves a bunch of different
> equations
> (advection, shallow water, Euler) with a "pointwise" Riemann solver. Feel
> free to ask questions about it.
>

We have never talked about Riemann solvers in our CFD course, and I don't
understand what's going on in ex11.
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.
But I thought that the gradient coefficients should be available in the
PETScFVFaceGeom.grad elements of the faceGeometry vector after using the
methods

DMPlexComputeGeometryFVM
<https://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/DMPLEX/DMPlexComputeGeometryFVM.html#DMPlexComputeGeometryFVM>(DM
<https://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/DM/DM.html#DM>
dm, Vec <https://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Vec/Vec.html#Vec>
*cellgeom, Vec <https://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Vec/Vec.html#Vec>
*facegeom) and
DMPlexComputeGradientFVM
<https://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/DMPLEX/DMPlexComputeGradientFVM.html#DMPlexComputeGradientFVM>(DM
<https://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/DM/DM.html#DM>
dm, PetscFV <https://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/DM/PetscFV.html#PetscFV>
fvm, Vec <https://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/Vec/Vec.html#Vec>
faceGeometry, Vec
<https://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/Vec/Vec.html#Vec>
cellGeometry, DM
<https://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/DM/DM.html#DM>
*dmGrad)

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?

(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?)

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.

Thanks
Ingo



<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virenfrei.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170404/c3e3e00d/attachment.html>


More information about the petsc-users mailing list