[Dune] DGFParser interface
Markus Blatt
mblatt at hal.iwr.uni-heidelberg.de
Tue Jul 25 15:36:51 CEST 2006
On Mon, Jul 24, 2006 at 04:56:26PM +0200, Robert Kloefkorn wrote:
> Hi all,
>
> i would suggest to handle this problem like this:
>
> The class GridPtr<GridType> is derived from GridType and the
> specialisations call the right constructor and they already do in the
> specialised generate method. Then GridPtr<GridType> is of the type
> GridType and can be treated as GridType.
>
> This in an easy way to add a constructor common for all grids, taking
> the DGF file.
As I already pointed out in my other email, I do not consider this a
good idea as it might break code using template specialization :
If GridPointer is a Grid the user might use as a grid and if you
template<G>
struct FancyAlgorithm{
void operator(G& grid){
useslowdefault();
}
}
and optimized specializations for some grids, the user will always use
the slow default implementation and wonder why DUNE sucks so much ...
Cheers,
Markus
--
DUNE -- The Distributed And Unified Numerics Environment
<http://www.dune-project.org>
More information about the Dune
mailing list