<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi,</p>
    <p>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).</p>
    <p>There is a dune module</p>
    <p>> <a class="moz-txt-link-freetext" href="https://gitlab.mn.tu-dresden.de/spraetor/dune-dec">https://gitlab.mn.tu-dresden.de/spraetor/dune-dec</a></p>
    <p>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.<br>
    </p>
    <p>Best,<br>
      Simon<br>
    </p>
    <div class="moz-cite-prefix">Am 28.08.19 um 09:26 schrieb Gregor
      Corbin:<br>
    </div>
    <blockquote type="cite"
      cite="mid:0e8fd680-cb0b-ab01-8faa-35e08239e3b5@mathematik.uni-kl.de">
      <pre class="moz-quote-pre" wrap="">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:
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">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:
</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">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
<a class="moz-txt-link-abbreviated" href="mailto:Dune@lists.dune-project.org">Dune@lists.dune-project.org</a>
<a class="moz-txt-link-freetext" href="https://lists.dune-project.org/mailman/listinfo/dune">https://lists.dune-project.org/mailman/listinfo/dune</a>
</pre>
        </blockquote>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Dune mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Dune@lists.dune-project.org">Dune@lists.dune-project.org</a>
<a class="moz-txt-link-freetext" href="https://lists.dune-project.org/mailman/listinfo/dune">https://lists.dune-project.org/mailman/listinfo/dune</a></pre>
    </blockquote>
  </body>
</html>