[dune-pdelab] Add data to grid boundary
Christian Engwer
christian.engwer at uni-muenster.de
Sun Feb 14 00:03:57 CET 2016
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