#597 Add basic interfaces with and without virtual methods for functions/mappings
Metadata
| Property | Value |
|---|---|
| Reported by | Carsten Gräser (graeser@math.fu-berlin.de) |
| Reported at | Sep 13, 2009 19:43 |
| Type | Feature Request |
| Version | Git (pre2.4) [autotools] |
| Operating System | Unspecified / All |
| Last edited by | Oliver Sander (oliver.sander@tu-dresden.de) |
| Last edited at | Nov 24, 2009 17:35 |
| Closed by | Oliver Sander (oliver.sander@tu-dresden.de) |
| Closed at | Nov 24, 2009 17:35 |
| Closed in version | Unknown |
| Resolution | Fixed |
| Comment | Discussion settled on the meeting |
Description
While there are several places (BoundarySegment, interpolate() in dune-localfunctions, various discretization modules) where mappings are used there is now common interface/base class for this purpose. Currently there are almost all combinations of eval()/evaluate()/operator(), virtual/non-virtual and return value/call by reference used.
I suggest to introduce a simple base classes with and without virtual functions to provide a common interface. The place for this should be dune-common and it could look like
template <class X, class Y> class FunctionBase { public: Y evaluate(const X& x); };
teplate <class X,class Y> class VirtualFunctionBase :public FunctionBase<X,Y> { public: virtual Y evaluate(const X& x); };