[Dune] GridView from Grid and IndexSet.

Martin Nolte nolte at mathematik.uni-freiburg.de
Thu Aug 14 10:18:16 CEST 2008


Hi Jö, hi Robert,

I don't think it too easy to write such a class. The problem is that the index
set does not provide the intersection iterators (and will not provide the
iterators, soon).

You can try to find out via template programming, if you are dealing with a
level index set or a leaf index set. Once you have this knowledge, you could
write you grid view. Obviously, this does not make sense, because once you have
this information you can ask the grid directly.

In my opinion, the class Robert suggested should only be implemented if
INDEXSET_HAS_ITERATORS is defined and should not implement the intersection
iterators. This grid view can then be used whereever an indexset was used
previously, e.g., in the VTK writer. It should then be an easy task.

Cheers,

Martin


Robert Kloefkorn wrote:
> Hi Jö!
> 
>  > Is there an easy way to get a GridView given a Grid and an IndexSet?
> 
> I guess you have to write a class holding the two references and 
> implementing the GridView Interface (see dune-grid/common/gridview.hh)
> 
> Up to now there is no such class. But is would be very good to have such 
> a thing also in dune-grid.
> 
> Regards,
> 
> Robert
> 

-- 
Martin Nolte <nolte at mathematik.uni-freiburg.de>

Universität Freiburg                                   phone: +49-761-203-5642
Abteilung für angewandte Mathematik                    fax:   +49-761-203-5632
Hermann-Herder-Straße 10
79104 Freiburg, Germany





More information about the Dune mailing list