[Dune] Small one about dune grid

Carsten Gräser graeser at math.fu-berlin.de
Tue Sep 7 10:54:37 CEST 2010


Am 07.09.2010 01:27, schrieb Carsten Gräser:
> Hi,
> 
> Am 06.09.2010 22:53, schrieb Aleksejs Fomins:
>> Dear Dune,
>>
>> I have another little question:
>> Say I have an ElementPointer and a local face number within that element.
>> Is there a simple way to get the local numbers of corners of this face.
>> The local numbers must be with respect to the ELEMENT. (meaning I want 3 numbers out of possible 4)
> 
> in principle such information is available via the subEntity
> method of the reference elements. If you have an ElementPointer
> ep, a local facet index i within ep and a local vertex index ii
> within the i-th facet of ep. The you can obtain the local index j
> of the vertex within ep by the following:
> 
> const Dune::GenericReferenceElement<double,dim>& refElement
>     = Dune::GenericReferenceElements<double, dim>::general(ep.type());
> 
> int j = refElement.subEntity(i, 1, ii, dim);
> 
> Unfortunately the local index i above does in general not coincide
> with the local index of the corresponding vertex within the face
> as entity of codimension 1. Hence the subEntity method of the
> reference elements do not coincide with the subEntity method of
> Entity<0,...>. For example you will in general have
> 
> ep->geometry().corner(refElement.subEntity(i,codim,ii,dim))
>     != e->subEntity(i,codim).geometry().corner(ii)
>
Just another note on this:
If you really have an Entity<1> that is a subentity of an
Entity<0> there is currently no topological way to get
the local index of vertex it the Entity<1> in the Entit<0>.

In this case you have to compare coordinates. This is really
a gap in the interface.

Regards

Carsten

> This is due to the fact that you can not have embeddings
> of a codim!=0 entity that conform with all elements it is
> contained in. However you can still use the subEntity
> method of the reference element to enumerate all vertices
> of a given face.
> 
> Regards
> 
> Carsten
> 
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune


-- 
----------------------------------------------------------------------
Carsten Gräser           | phone: +49-30 / 838-75349
Freie Universität Berlin | fax  : +49-30 / 838-54977
Institut für Mathematik  | email: graeser at math.fu-berlin.de
Arnimallee 6             |
14195 Berlin, Germany    | URL  : http://page.mi.fu-berlin.de/graeser
----------------------------------------------------------------------




More information about the Dune mailing list