[Dune] Dune dual mesh

Simon Praetorius praetori at msx.tu-dresden.de
Fri Aug 30 08:45:57 CEST 2019


Hi,

Some time ago I worked on a DEC (discrete exterior calculus)
discretization and used Dune grids as my primal grids. There, you can
calculate Laplacians of 0-forms (on vertices) or of 2-forms (on
2d-elements), upon others. I have also followed the approach to not
explicitly calculate a dual mesh, since each dual entity is simply
associated with a primal entity. For the discretization of a Laplacian,
one just needs geometric information (and some iteration of neighboring
entities).

There is a dune module

> https://gitlab.mn.tu-dresden.de/spraetor/dune-dec

implementing this approach with some other tools for DEC
discretizations. There might even be an example and a so called
"Operator" directly implementing the Laplacian on dual cells. The module
is not connected to any other discretization module in dune, like
PDELab, dune-fem or DuMuX, but uses just the core modules and for some
special cases the dune-functions module. Currently this module is
restricted to 2d meshes, but in principle can be extended to 3d.

Best,
Simon

Am 28.08.19 um 09:26 schrieb Gregor Corbin:
> Hi Bartosz,
>
> I also had to deal with dual meshes in my application, but in the
> reverse situation, that is, I put dual cell averages on the primal
> vertices. For this i precompute a virtual dual mesh with all the info i
> need.
>
> The downside of this approach is that it requires to abuse local
> operators and grid function spaces quite a lot(in PDELab), which makes
> the code very unintuitive; for example fluxes over dual faces have to be
> accumulated in a primal volume integral. 
>
> I think Christoph's recommendation of a preprocessing step may be the
> cleaner way to go. Nevertheless, if you are interested I can send you
> the code (which is only implemented for tensor-product grids).
>
> Cheers,
>
> Gregor
>
> Am 27.08.19 um 23:49 schrieb Christoph Grüninger:
>> Hello Bartosz,
>> as far as I know, there is no code available to generate a dual mesh.
>>
>> There is some staggered grid code inside DuMuX, which does calculations
>> on a virtual dual mesh which is calculated on the fly within the local
>> operator. Not sure, whether this would be an idea regarding your problem.
>>
>> Have you tried to find or write some preprocessing code which does the
>> calculation for you? It shouldn't be too hard to have some Python code
>> generating you a dual mesh.
>>
>> Bye
>> Christoph
>>
>> Am 27.08.19 um 15:01 schrieb Bartosz:
>>> Hello,
>>>
>>> My name is Bartosz Bartmanski and I am a PhD student at University of
>>> Oxford.
>>>
>>> I'm working on stochastic simulations of reaction-diffusion systems and
>>> I'm trying to use Dune to get a discretisation of the Laplacian operator
>>> for any given mesh. However, my simulations require the Laplacian to be
>>> derived from the centers of the given mesh and so I was wondering there
>>> is a way to process a given Gmsh generated mesh to a dual mesh.
>>>
>>> Thank you for any help!
>>>
>>> Best regards,
>>>
>>> Bartosz Bartmanski
>>>
>>>
>>> _______________________________________________
>>> Dune mailing list
>>> Dune at lists.dune-project.org
>>> https://lists.dune-project.org/mailman/listinfo/dune
>
> _______________________________________________
> Dune mailing list
> Dune at lists.dune-project.org
> https://lists.dune-project.org/mailman/listinfo/dune
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20190830/1ab861cb/attachment.htm>


More information about the Dune mailing list