[Dune] entity.geometry() is inaccessible
Aleksejs Fomins
aleksejs.fomins at lspr.ch
Fri Feb 13 09:16:26 CET 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Glory to you, Jö. I made a big mistake there.
Thanks,
Aleksejs
On 12/02/15 18:22, Jö Fahlke wrote:
> Am Thu, 12. Feb 2015, 16:18:21 +0100 schrieb Aleksejs Fomins:
>> Dear Dune,
>>
>> I have another bug that I do not seem to know how to fix
>>
>> I have 3 entity members class CurvEntityBase<...> - Contains
>> methods available to all codimensions
>>
>> class CurvEntity<codim, ...> : CurvEntityBase<codim, ...> -
>> actual entity class which has 0 own members, and only
>> initializes CurvEntityBase
>
> Not sure whether this is just an artifact of how you explained
> this, but that should be either
>
> class CurvEntity<codim, ...> : public CurvEntityBase<codim, ...>
>
> or
>
> struct CurvEntity<codim, ...> : CurvEntityBase<codim, ...>
>
> Otherwise you're deriving privately.
>
> Makeing CurvilinearGrid a friend of CurvEntityBase does not help
> either, because it is the Dune::Entity facade class that is trying
> to call geometry, not the grid.
>
> Regards, Jö.
>
>> class CurvEntity<0, ...> : CurvEntityBase<0, ...> -
>> specialization for codim=0 entities, has extra members
>>
>>
>> When the GridCheck attempts to call a realEntity.geometry() or
>> realEntity.level(), I get the error
>>
>>
>> /home/fomins/gitwork/hades-github-lspr-ag/dune-curvilineargrid/dune/curvilineargrid/curvilineargrid/entity.hh:126:13:
>>
>>
error: ‘Dune::CurvGrid::CurvEntityBase<codim, dim, Grid>::Geometry
>> Dune::CurvGrid::CurvEntityBase<codim, dim, Grid>::geometry()
>> const [with int codim = 0; int dim = 3; Grid = const
>> Dune::CurvilinearGrid<3, 3, double>;
>> Dune::CurvGrid::CurvEntityBase<codim, dim, Grid>::Geometry =
>> Dune::Geometry<3, 3, const Dune::CurvilinearGrid<3, 3, double>,
>> Dune::CurvGrid::CurvGeometry>]’ is inaccessible Geometry geometry
>> () const { return
>> Geometry(GeometryImpl(gridbase_.entityGeometry<codim>(*gridbaseIndexIterator_)));
>>
>>
}
>> ^ In file included from
>> /home/fomins/gitwork/hades-github-lspr-ag/dune-grid/dune/grid/common/grid.hh:1403:0,
>>
>>
from
>> /home/fomins/gitwork/hades-github-lspr-ag/dune-curvilineargrid/dune/curvilineargrid/curvilineargrid/grid.hh:8,
>>
>>
from
>> /home/fomins/gitwork/hades-github-lspr-ag/dune-curvilineargrid/dune/curvilineargrid/test/test-curvgrid.cc:12:
>>
>>
/home/fomins/gitwork/hades-github-lspr-ag/dune-grid/dune/grid/common/entity.hh:326:61:
>> error: within this context Geometry geometry () const { return
>> realEntity.geometry(); }
>>
>>
>>
>>
>> note that geometry() and level() are public member functions of
>> CurvEntityBase, and CurvilinearGrid has this class as friend.
>>
>> Any suggestions?
>>
>> Aleksejs
>>
>> _______________________________________________ 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)
iQIcBAEBAgAGBQJU3bLaAAoJEDkNM7UOEwMZb2IQAOOe6Xb3JcfIFcXAimLENEU2
MwtSU9E4B9xiIdvG18v+2D7wd0hDoPpblMVW7FKo/hsAgBSWA/W3vXSStDj24Gbu
0kkM9uTuRZ0b+tW6mViN6UJ116ClDrUnV0VUslVY1C67yjWEU0Q+XGxGBppFrx0K
/536RTm6Ie6+Orpb+M3aix/mlieInGXaLWSV81TeA1aNaMHZVbo0SOGvmfKVIuY4
KfgohMYvh5LSp4nF94Le3QHAAbfEF0VnnFhjo23rrkju0+2h6Rp+EaWwZhtWu4Ol
SkhgGj6pumO1afeCq1937FmXitokM45Vy46Z25/1+98PNWw6yphJyIyw2d1W+r/4
hTIdWnMbM66cVR9Te6L2W6l8YyvC/Utkb4AK5UlSM+mJw085HlArwiA2fiZKSroh
N+XhfwXzThCyK/I7xVgDu/5cc9emd8UkgK89tnFRs2E90RQpvxD4qaFo+uQ3XszR
2hwEExBCCLv5Ou5KsH3DzxywLUL/moKZZJxafhtTtYrLUxXZT6IaSi30IwLp1RRF
BRWIzKom1chd11iRUL4sAitY4lT1V7RBryvsssCM5b7HCxtnImONpXU/PpOZ7GgF
hhFDUwvj1u/9QOG/RSSTDU38CXjsQtzPFuU9szjlsc9WtlylAT3/dG2h9+edpxYl
a46Pi+caQB1XwnojWKZ1
=iZEw
-----END PGP SIGNATURE-----
More information about the Dune
mailing list