[Dune] passing functions as arguments
Christian Engwer
christian.engwer at uni-muenster.de
Mon Aug 11 13:19:09 CEST 2014
> On Mon, Aug 11, 2014 at 10:31:36AM +0200, Christian Engwer wrote:
> > we have an interface class for functions in dune-common. I didn't
> > have a look whether we have example as well. In any case I'd suggest
> > to use this interface as it allows many other people to use it
> > without modifying their code.
>
> I kind of have the feeling that this does not work with switching the
> function at runtime.
Hi Markus,
a) The first questions suggested to me that run-time exchangability is
not an issue here and that everything can be defined at compile
time.
b) If you have to change the funtions dynamically you can pass a
reference to Dune::VirtualFunction which is an abstract base class
implementing the Dune::Function interface. Now everything goes
through the virtual function table...
Christian
More information about the Dune
mailing list