[Dune] Local Refinement in a DUNE Grid

Carsten Gräser graeser at math.fu-berlin.de
Wed Jan 5 17:01:55 CET 2011


Am 05.01.2011 16:48, schrieb S. Swayamjyoti:
> Is it possible to give a conditional statement for refinement based on the
> geometric position of the grid elements for reminement?
> 
> e.g   if ( 40 < x < 50 && 10 < y < 30)
>           {
>             refine mesh!
>           }
> where x and y are the grid vectors in x and y direction. Can someone please
> tell me how do I find x and y, i.e how can I use geometric parameters
> related to the grid in my code. Does it come from the class GeometryType ?

The GeometryType describes the 'type of the geometry' of an entity.
More precisely it tells you which reference element is associated
with the entity. In general the Geometry object associated toan entity
is essentially a map of the reference element to the entity
(see also the Dune Grid Paper I).

Assuming that you mean some global coordinate by 'grid vector' you
should have a look of the methods Entity::geometry() and Geometry::corners()
that provide the global coordinate of the vertices.

Best,
Carsten




More information about the Dune mailing list