[Dune] questions about ElementID_to_physical_entity

Alexander Schlaich schlaich at icp.uni-stuttgart.de
Wed Apr 13 11:54:35 CEST 2011


Hi Jö ,


thanks for your advice.

Using insert_boundary_segments = true works fine.
Could please explain to me shortly what exactly this option does and why 
it works?

Best,

Alex



--- Original Message ---

From:     Jö Fahlke <jorrit at jorrit.de>
To:         Alexander Schlaich <schlaich at icp.uni-stuttgart.de>
CC:        dune at dune-project.org
Date:     Tue, 12 Apr 2011 21:35:17 +0200
Subject: Re: [Dune] questions about ElementID_to_physical_entity


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


-- 
-------------------------------------------------------
Alexander Schlaich
-------------------------------------------------------
Institut für Computerphysik
Universität Stuttgart
Pfaffenwaldring 27
D-70569 Stuttgart

Tel: +49-711 685-60458
Fax: +49-711 685-63658

e-mail: schlaich at icp.uni-stuttgart.de

http://www.icp.uni-stuttgart.de/





More information about the Dune mailing list