# [petsc-users] examples of DMPlex*FVM methods

Matthew Knepley knepley at gmail.com
Wed Apr 5 11:56:46 CDT 2017

```On Wed, Apr 5, 2017 at 11:50 AM, Ingo Gaertner <ingogaertner.tus at gmail.com>
wrote:

> Hi Jed,
>
> 2017-04-04 22:18 GMT+02:00 Jed Brown <jed at jedbrown.org>:
>
>> Ingo Gaertner <ingogaertner.tus at gmail.com> writes:
>>
>> > 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.
>>
>> Note that ex11 solves hyperbolic conservation laws, but you are solving
>> an elliptic equation.
>>
>
> I begin to understand. Petscs FVM methods don't provide a FVM library that
> can be used to implement the FV control volume approach (see Ferziger) for
> general CFD problems? They are around just because they have been used to
> tackle one or two specific problems, is this correct?
> I thought they could be used similar to the OpenFvm or OpenFoam libraries
> which seem to solve Poisson, Navier-Stokes, Euler and other problems. If
> such methods have not been prepared for Petsc, I'll just follow Ferzigers
> book and start my work on a lower level than I thought would be necessary.
> More work, more fun :)
>

Yes, that is correct.

As a side note, I think using FV to solve an elliptic equation should be a
felony. Continuous FEM is excellent for this, whereas FV needs
a variety of twisted hacks and is always worse in terms of computation and
accuracy. Hyperbolic problems are what FV is designed for
and I don't think I would ever support it for anything but that.

Thanks,

Matt

> > (My second question is more general about the PETSc installation. When I
>> during
>> > the make step, but they are not copied to /somewhere during the "make
>> > install" step.
>>
>> Where are they put during configure?
>>
>
> My bad, Petsc installation works as expected. But the build system that I
> am using is doing something weird. I'll have to find out, what's going
> wrong there, but it is not related to Petsc.
>
> Thank you!
> Ingo
>
>
>
> www.avast.com
>

--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their