[Dune] entity.geometry() is inaccessible

Aleksejs Fomins aleksejs.fomins at lspr.ch
Thu Feb 12 16:18:21 CET 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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

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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBAgAGBQJU3MQ9AAoJEDkNM7UOEwMZxPoQAJ4DWAGQsnFprYgw5yeW3WDZ
Po5fGBcvJWmzkyZutTmMW6CeWEtQr4jVdYNqYBvSD1RjPxiaJ22DFpOvzEZyzZmJ
5h+S1UKDhvm4ItDTHt/eWyqxKsOag9j3r4ST3PFdPxq61smlJa+tI9bNXjkfjNW1
bzboIliRab1LoMvy3OaTrG2Vxc12Q/LzePt0jKZPDgq4RGEkgWVoScdcnaWH1glm
l5YC0JWhRRHZanOmm+zlaXvCMUGBsmk9FsTXucWqSkHgBFAExsL3MljYUD3OPrhl
6fKOUhD0Q2ACtXxb3WPZI0k15tWfSrWmWTgABnwqkAGRJjA7f/v2t+FU9y5uYEUv
3hM7SOg2Eir5Q4YGUCYhVYCTCShrxdpEVqMXbW0Xcg+W1YThSeh1PsRNMwtSfys3
A+Ha6cuLUPvzL8ERvaUnOwjKSswFVhjk4suiQoCbyAuLFnm1mnQKnjQkHn6MKNyS
b8aP26Biz+pNQUD2b42gjRVfwI9lOK81yyUN34TSCOY6mWWNffYb/9Q5pmeqDary
prsHYa9tHxam3fbbvC2AjlTrYA1dFhs64sr1ZURi2PuoIeGL/YNfC+k8I5L0i4y1
YvVFntpKWNTuLR3y8r2ojaB7XeZs5zbY04vQRbOB3c4/Y202OVFOYzEDtiOUjJBl
pTtzoRxF8nc1hqKrGgef
=YoiC
-----END PGP SIGNATURE-----




More information about the Dune mailing list