[Dune] geometry grid and host entity
Christoph_Gersbacher
gersbach at mathematik.uni-freiburg.de
Fri Dec 20 11:22:09 CET 2013
Hi Marco,
to access the underlying host grid entity use the HostGridAccess structure:
#include <dune/grid/utility/hostgridaccess.hh>
template<class HostGrid, int codim>
void illustrate(const GeometryGrid<HostGrid>::Codim<codim>::Entity
&entity)
{
typedef GeometryGrid<HostGrid> Grid;
typedef HostGridAccess<Grid>::Codim<codim>::HostEntity HostEntity;
const HostEntity &hostEntity =
HostGridAccess<Grid>::hostEntity(entity);
}
If you have configured your DUNE installation with the
--enable-experimental-grid-extensions
option, you can also write:
entity.impl().hostEntity();
(In experimental mode, the impl()-method is present on all DUNE
interface facade classes, see e. g. <dune/grid/common/entity.hh>; the
method will give you access to the implementation object wrapped inside
a facade class)
Cheers,
Christoph
On 12/20/2013 10:14 AM, Marco Cisternino wrote:
> I wonder if I can ask a geometry grid entity for its relative entity on the host grid. If yes, how?
> Thanks.
> Marco
>
> --
> -----------------------------------------------
> Marco Cisternino, PhD
> OPTIMAD Engineering s.r.l.
> Via Giacinto Collegno 18
> 10143 Torino - Italy
> www.optimad.it
> marco.cisternino at optimad.it
> +39 011 19719782
> -----------------------------------------------
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
--
Christoph Gersbacher<christoph.gersbacher at mathematik.uni-freiburg.de>
<mailto:christoph.gersbacher at mathematik.uni-freiburg.de>
Abteilung für Angewandte Mathematik
Albert-Ludwigs-Universität Freiburg
Hermann-Herder-Str. 10
D-79104 Freiburg im Breisgau
Tel.: +49 (0)761 / 203 5645
Fax: +49 (0)761 / 203 5632
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20131220/44de5b04/attachment.htm>
More information about the Dune
mailing list