<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<div>Hi Andreas, <br>
<br>
Thanks for the response and it seems to be exactly what I've been looking for. <br>
<br>
If I'm allowed to ask one last question:<br>
Could you maybe tell me, which interface the class, containing the data function, should fit in? I tried several ones (I know it needs to contain a method called localFunction) but unfortunately I didn't get it to work.
<br>
<br>
I tried to pass a DomainType- and a RangeType-Reference to this function to store that data in the RangeType-Reference, but an Entity was expected. For some reasons it also didn't work, if I passed an Entity, so I'm a bit confused know.
<br>
<br>
Best, <br>
Justus <br>
<br>
-------- Originalnachricht --------<br>
Betreff: Re: [Dune] Store Data in grid cells<br>
Von: Andreas Dedner <br>
An: "Schock, Justus" ,dune-fem@dune-project.org<br>
Cc: <br>
<br>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hi Justus.<br>
I just found your original email - I missed it the first time round.<br>
Here you actually explain in some detail what you are planning to do.<br>
For material properties I would probably still suggest to use the<br>
FiniteVolume space together with the dune-fem discrete functions. Then<br>
you can benefit from automatic prolongation/restriction of the data<br>
during refinement for example and as I already pointed out things are<br>
then more "aus einem Guss".<br>
Perhaps the right starting point in that case is<br>
  02.intro-2/source/introscheme.hh<br>
Replace the<br>
   LagrangeDiscreteFunctionSpace<br>
with the<br>
   FiniteVolumeDiscreteFunctionSpace<br>
and in the solve method use the line<br>
   Dune::Fem::interpolate( function_, solution_ );<br>
to initialize the discrete function with the values you want to store on<br>
each cell.<br>
<br>
Does that look like it would do the trick for you?<br>
Andreas<br>
<br>
On 25/03/16 00:50, Schock, Justus wrote:<br>
> Dear Duners,<br>
> <br>
> <br>
> I want to use DUNE for solving PDEs (just like the Poisson-Equation or<br>
> the Diffusion-Equation).<br>
> <br>
> <br>
> This is why I want to store some data (like concentration etc.) directly<br>
> in the cells of the grid.<br>
> <br>
> <br>
> I even tried using Mappers (as explained in chapter 6 of the How-To) and<br>
> tried to write something very similar to the elementdata.hh.<br>
> <br>
> â€‹Unfortunately it did not work as expected and I dont't know if it has<br>
> been the wrong idea in general or only a wrong implementation.<br>
> <br>
> <br>
> Furthermore I texperimented a bit with the DGF, trying to pass the cell<br>
> data directly in the file, the grid is constructed from.<br>
> <br>
> <br>
> Could anyone just give me a hint or some explanation/link/example how<br>
> this should be done?<br>
> <br>
> <br>
> Best,<br>
> Justus<br>
> <br>
> <br>
> <br>
> _______________________________________________<br>
> Dune mailing list<br>
> Dune@dune-project.org<br>
> <a href="http://lists.dune-project.org/mailman/listinfo/dune">http://lists.dune-project.org/mailman/listinfo/dune</a><br>
> <br>
</div>
</span></font>
</body>
</html>