[Dune] geometry grid and host entity

Marco Cisternino marco.cisternino at optimad.it
Fri Dec 20 11:51:15 CET 2013


Thank you so much Christoph! 
I'd need just another hint: 
I built my geometry grid on ALU3D, and I cached the nodes of that grid in a persistentcontainer<Hostgrid,Value> as in cachedcoordfunction.hh. If loop on the geometry grid elements, asking geometries for codim 0 entity and intersections everything works fine, but if I ask geometry for codim 1 entity (faces) the compiler goes crazy! I rewrote the algorithm that uses those calls to faces geometries, but I can't understand why. I know it is a little bit generic, but I would like to understand if I can ask codim 1 geometry using something like cachedcoordfunction.hh. If you think it is possible, something's wrong in my code, otherwise I stop using faces in this framework. 
Thanks again for all your support. 

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 
----------------------------------------------- 

----- Messaggio originale -----

Da: "Christoph_Gersbacher" <gersbach at mathematik.uni-freiburg.de> 
A: dune at dune-project.org, "Marco Cisternino" <marco.cisternino at optimad.it> 
Inviato: Venerdì, 20 dicembre 2013 11:22:09 
Oggetto: Re: [Dune] geometry grid and host entity 


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); 
} 



<blockquote>

</blockquote>
If you have configured your DUNE installation with the 

<blockquote>
--enable-experimental-grid-extensions 

</blockquote>
option, you can also write: 

<blockquote>
entity.impl().hostEntity(); 

</blockquote>
(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: 

<blockquote>
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 
</blockquote>



-- 
Christoph Gersbacher <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/b9fd3ba3/attachment.htm>


More information about the Dune mailing list