[Dune] Problem with compiling grid.globalIdSet()
Aleksejs Fomins
aleksejs.fomins at lspr.ch
Thu Feb 26 12:34:43 CET 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dear Markus and Christoph,
Thank you for your advice. This was indeed the problem.
When I specified "unsigned int" explicitly as the indexType in the CurvIndexSet, everything compiled no problem.
At the moment I am ok with this solution, but I completely agree with Markus
1) indexType is a templated type. If you want it to be "unsigned int" always, don't make it templated
2) many grids create their own gridfamily, explicitly specifying the template parameter indexType to their bidding
3) However, the generic GridTraits forces the grid implementor to use "unsigned int" for indexType.
I agree that this is a bug, because it does not really forbid me from using arbitrary index type, it just makes it harder to do.
Solution is rather simple - add extra template argument to Dune::GridTraits, which would specify IndexType. IdType is already passed this way.
I will submit bug report next week, unless somebody believes that this is the expected behaviour.
Best,
Aleksejs
On 26/02/15 11:30, Markus Blatt wrote:
> On Thu, Feb 26, 2015 at 10:18:09AM +0100, Christoph_Gersbacher wrote:
>> Hi Aleksejs,
>>
>> the forward declaration you are missing can be found in line 360 of
>> dune/grid/common/grid.hh:
>>
>> template< class GridImp, class IndexSetImp,
>> class IndexTypeImp = unsigned int,
>> class TypesImp = std::vector< GeometryType > >
>> class IndexSet;
>>
>> If you are not happy with the default values just explicitly state
>> the optional third and fourth template parameters.
>>
>
> Does not seem to be possible as in the GridTraits line 1426 we do:
>
>
> typedef IndexSet<const GridImp,LevelIndexSetImp> LevelIndexSet;
> typedef IndexSet<const GridImp,LeafIndexSetImp> LeafIndexSet;
> typedef IdSet<const GridImp,GlobalIdSetImp,GIDType> GlobalIdSet;
> typedef IdSet<const GridImp,LocalIdSetImp,LIDType> LocalIdSet;
>
> Markus
>
>
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAEBAgAGBQJU7wTTAAoJEDkNM7UOEwMZMHMP/2Aa+j0Ap4Mf9VoMKwbis6bQ
Beb3wxnU9zJ2IXF0ouf53uFxVD+x2sZML2uB9JhhbrfJF457O48uXWAYoISTyUYn
uOtNsoaFo+eDieSkUdk/PytnGfYX6Roc/qxhwLBOpIQILiHOWyX85zLGVOm19kKw
d7O354rPy2zniiVq5ZDqrsIJc6FsHK8ggRiDM/oDamlQ/sNoHUEraFg+FUuvLW5o
zmrw0HtuEy2yZ5vPMCDl6SI57bwmBfln20bctuW2U6T17j3tfjNO8UkyZ2MQmvYC
lpiL3fVGL9PYKSsAjbrhyLmqlHxTenzx4Y2vhBiB5BbVrI+rM2+uTy7KxmKGutHA
6yijAE8GphmKLL9Fb4iuEDTQJw/PfksbRraHADd5ejMzFhvx3+w/60MYLWOdEcBK
c7kiZ6eAN72+FAVmvliwrfZ9pRHZAuL2HnP88xpXLPkzAbaPhnlQU4HEOPd597jW
FH7AiosjFpZY/W/wMCNx8xvI4DUsM3lTAfocKjIAdwlT494OlmsVlV+aq2LBBk/i
vfD79GcUmMjmqYR1gavRJcM8v5yWkObnUSrKXLFsWwX4GImgB3zzBAHhHysiAhvw
HWgTogCzeJpMsSlcemdeVzwB6s2DvjdWqt5kblT9/fLT+UtIC2ujM5zxbp8c755Q
Gs++MkbSLnZxEiIkO9nC
=v8Ch
-----END PGP SIGNATURE-----
More information about the Dune
mailing list