[dune-pdelab] Add data to grid boundary

dhaefner at iup.uni-heidelberg.de dhaefner at iup.uni-heidelberg.de
Sun Feb 14 14:36:21 CET 2016


(forgot to send this to the mailing list at first)

Hey Christian,

thank you for your reply. I should have been more specific, sorry.

We want to implement hysteresis when switching between boundary conditions
dependent on the current value of the PDE solution at this cell. So, if
there currently is a Neumann boundary condition, the condition for
switching to a Dirichlet condition is different than for a switch
vice-versa. For this purpose, we need to store the current boundary
condition for each boundary segment. When refining the grid, the child
elements could just inherit this value from their father element - there
is no need for higher resolution. But of course this value will change for
some elements during each time step if the switching criterion is met.

You can have a look at our grid creation function at

http://pastebin.com/Xe717avD

We are using the UG grid manager (template parameter GridType is
Dune::UGGrid<dim>).

Thanks for the support!

Dion


> Dear Dion,
>
> On Fri, Feb 12, 2016 at 06:58:53PM +0100, Dion Häfner wrote:
>> Dear PDElab developers,
>>
>> in my module, I want to store some boolean value for each boundary face,
>> which should be inherited by child elements when using adaptive grid
>> refinement. I thought of implementing it using a float which is either
>> .0 or 1.0, interpolating it to the new grid using PDElab::interpolate,
>> and rounding to the nearest integer to get a binary value again.
>
> the things are much simpler.
>
> You can immediately associate your data with boundary-segments. These
> are the coarse mesh boundary intersections. Each boundary intersection
> can report its boundary segment index. This index is automatically
> inherited from coarse meshes. How this index is created is
> implementation specific. In order you give you better advice, it would
> be good to know ab bit more about your code. In particular, what type
> of grid implementation you use and how you setup your mesh.
>
>> The problem is, that I cannot calculate this value directly from
>> position, but only from the history of a cell. Is there a built-in way
>> to interpolate from discrete values instead of a function? And which
>> type of container could I use, so I can easily reference the value for
>> each boundary face?
>
> OK, now things sound different again. From your above description it
> read as if you don't want higher resolution with refinement, but now
> it sounds as if you want the opposite.
>
> Perhaps you have to explain a bit more in detail...
>
> Best
> Christian
>







More information about the dune-pdelab mailing list