[Dune] entity.geometry() is inaccessible

Jö Fahlke jorrit at jorrit.de
Thu Feb 12 18:22:40 CET 2015


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

-- 
Jorrit (Jö) Fahlke, Institute for Computational und Applied Mathematics,
University of Münster, Orleans-Ring 10, D-48149 Münster
Tel: +49 251 83 35146 Fax: +49 251 83 32729

Der Horizont vieler Menschen ist ein Kreis mit Radius Null - und das
nennen sie ihren Standpunkt.
-- A. Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20150212/38b37f9a/attachment.sig>


More information about the Dune mailing list