[Dune] questions about ElementID_to_physical_entity

Jö Fahlke jorrit at jorrit.de
Tue Apr 12 21:35:17 CEST 2011


Am Tue, 12. Apr 2011, 18:43:18 +0200 schrieb Alexander Schlaich:
> typedef Dune::ALUSimplexGrid<dimgrid,2> GridType;
> Dune::GridFactory<GridType> factory;
> 
> // read my gmsh file
> Dune::GmshReader<GridType> gmshreader;
> gmshreader.read(factory, sysParams.get_meshfile(), boundaryIndexToEntity,
> 	elementIndexToEntity, true, false);
> 
> ...
> (no modifications to the grid, especially no refine() or loadBalance() is
> done)
> ...
> 
> int physgroup_index = pg[factory.insertionIndex(i.intersection())];
> std::cout << "Set boundary type" << physgroup_index << " at " <<
> 	i.geometry().center() << std::endl;

I'm mystified.  All I can do is provide you with some leads for debugging:

 * try with insert_boundary_segments = true (last parameter of
   gmshreader.read())

 * check that pg is really boundaryIndexToEntity (and not, for instance
   elementIndexToEntity)

 * if pg is a reference (or pointer) to the real vector, check that the real
   vector hasn't been freed or gone out-of-scope by the time you access it via
   pg

 * run your program with valgrind (MPI will usually produce some false
   positives with valgrid, ignore them or compile your program without MPI to
   avoid them).

Bye,
Jö.

-- 
Den Slogan "Wer Deutschland nicht liebt, soll Deutschland verlassen!"
kommentierte eine Kellnerin in einem Restaurant unter den Linden mit:
"Sind die bekloppt?  Wer soll denn dann noch arbeiten gehen?"
-- aus http://de.indymedia.org/2007/08/191280.shtml
-------------- 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/20110412/3cdbe34b/attachment.sig>


More information about the Dune mailing list