[Dune] Gmsh reader and boundary Ids

Aleksejs Fomins aleksejs.fomins at lspr.ch
Tue Apr 14 18:06:29 CEST 2015


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

Dear Marco,

I have dealt with GMSHReader for quite a bit in the last months.
 GMSH
I think the problem is that GMSHReader knows nothing about the grid, so it keeps its own index of the boundaryIDs, which is in fact the order they appear in the GMSH file. As of now I have not noticed much pattern in the boundary segment index provided by individual grids. It need not match the boundary segment index of GMSHReader at least because some grids (eg ALUGrid) do not require you to insert all of the boundary segments to construct the grid. So I can foresee that this functionality would require to adapt all grid managers, although the adaptation itself could be quite small.

P.S. In the curvilinear grid we are currently developing, it will be possible to extract the PhysicalID from the intersection, as it will be stored inside the grid after reading GMSH.

Cheers,
Aleksejs




On 14/04/15 17:17, Agnese, Marco wrote:
> Hello Duners,
> I am reading a mesh doing
> 
> Dune::GmshReader<GridType>::read(gridFactory,fileName,boundaryPhysicalIDs,elementsPhysicalIDs); 
> 
> If I want to extract the ID of an intersection I need to do 
> 
> boundaryPhysicalIDs[gridFactory.insertionIndex(intersection)] 
> 
> while, looking at the documentation, it seems natural to do 
> 
> boundaryPhysicalIDs[intersection.boundarySegmentIndex()];
> 
> It wouldn't be better to reorder inside the gmsh reader the boundaryPhysicalIDs in order to be consistent with the boundary segment index? 
> I know that the reorder takes only 5 lines of code but it would be more user friendly to have it done internally. 
> 
> Maybe I am missing the purpose to have a vector ordered following the insertion index.
> 
> Cheers,
> Marco. 
> _______________________________________________
> 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)

iQIcBAEBAgAGBQJVLTsFAAoJEDkNM7UOEwMZ9p4QAOw9OQNzPv/D3H6GrzmcarJp
rVWBtUv0QQNVuTpq5WhFlkf8MwLzH76vt+KlGR5Zgf7dqL3OassXthtK4F/3tXxV
Y7D5RK7xnBEkHRwKETTDVVi10f/wyd59ebKYdfpiLpNjposlCH/1385Qn2xo8jbL
2DVaoYC3B5su9cHNk36fH2WIBP0o+rK9bz9gMASl1GNB1aSEaTzAUOXVpUWudsfD
svirOy9BXKC+SVxwLwLJsHOq0+8j3Y+yp9N9UqA0x/RVl+FpLgJzOCXxh09/8ZGR
hGGQJurb0ssQ8Gqqv7kZIyR7MLGHlxD9yeEPX3wPgXtACziEUW6MenV5UmPiyLoz
AUn1dWp3/VUaztemunBUjFyUaWnmAEmR2YwobBHxLORIqFjVMip/6/EGlZLyNWNv
1HsKoEIy03Pt/rl0THIz2+xcxOelo+VFaArUrM6j3+R1cn4Z/PC3FPIVaEk80uYL
krPwqc+IMWnrNhvHbEy8ZkzK9B04RQKCOijvcLfiv82XdIDYtqXtcshbq5fcQZ7n
hsytdk9yzkaqc9cGgVyL3laHqe8foTH5I+QGiahYw2N/a70KPL9U0ZLZ6lX1oMRy
rYHre9oD6SZwbhmVtCGF+z4qJP1Kl0Ts+zDZaeywq3fF9vuthoSMBT4oQ8wcYPwb
9QJKQ9WqquNDKhcQSst7
=T8/4
-----END PGP SIGNATURE-----




More information about the Dune mailing list