[Dune] DGF format and local ordering of vertices

Oliver Sander sander at mi.fu-berlin.de
Fri Sep 28 07:31:30 CEST 2012


Hi Andrea,
FoamGrid preserves the element orientations as well.
cheers,
Oliver

Am 28.09.2012 00:43, schrieb Sacconi, Andrea:
> Hi all,
>
> Andreas is right, I want the surface normal for each element, since it explicitly appears in one of my equations.
> As far as I know, it's not possible to use any DUNE command to calculate it, so I implemented it by hand, using the cross product between edges, as Andreas has already perfectly figured out.
> But you'll agree that, if you took one of the six faces of a cube, and looking at that face from outside, you saw some triangles with a clockwise orientation for their three corners and some others with a counter-clockwise one, it would mean big troubles, won't you?
>
> Tomorrow I'll try to see what happens. I'll let you know.
> By the way, the problem arose in using GMSH for generating a mesh for the "crust" of the unit cube. It's a borderless object, made of intrinsically 2D elements embedded in R^3; for the unit cube testing the orientation is trivial (the normal has all components equal to 0 but one, that can be either 1 or -1). For more weird geometries, as far as I know, there is no way of knowing. But for my case, a cube could be a good starting point.
>
> Best,
>
> Andrea
> __________________________________________________________
>
> Andrea Sacconi
> PhD student, Applied Mathematics
> AMMP Section, Department of Mathematics, Imperial College London,
> London SW7 2AZ, UK
> a.sacconi11 at imperial.ac.uk
>
> ________________________________________
> From: dune-bounces+a.sacconi11=imperial.ac.uk at dune-project.org [dune-bounces+a.sacconi11=imperial.ac.uk at dune-project.org] on behalf of Dedner, Andreas [A.S.Dedner at warwick.ac.uk]
> Sent: 27 September 2012 20:27
> To: Martin Nolte; dune at dune-project.org
> Subject: Re: [Dune] DGF format and local ordering of vertices
>
> I was assuming Andrea wanted the surface normal - assuming a closed orientable surface the
> outer normal does make sense and can be obtained using cross product of edges - if orientation
> is preserved that is.
> ________________________________________
> From: dune-bounces+a.s.dedner=warwick.ac.uk at dune-project.org [dune-bounces+a.s.dedner=warwick.ac.uk at dune-project.org] on behalf of Martin Nolte [nolte at mathematik.uni-freiburg.de]
> Sent: 27 September 2012 20:14
> To: dune at dune-project.org
> Subject: Re: [Dune] DGF format and local ordering of vertices
>
> As Andreas already pointed out, there is no such guarantee and requiring such a
> thing will break some grid managers (e.g., AlbertaGrid or ALUGrid). Moreover, in
> the case of a hypersurface, the term orientation does not even make sense.
>
> What do you want this information for? If you just want the (covariant) normal,
> you can obtain them from the intersections. If you can come up with a situation
> where a face normal is needed independent of the intersection, let us know.
>
> Best,
>
> Martin
>
> On 09/27/2012 06:10 PM, Sacconi, Andrea wrote:
>> Hi everyone,
>>
>> I'd like to ask you a question about the Dune Grid Format (DGF) and the ordering
>> of the corners in an element of the mesh.
>>
>> Suppose I put my vertices and my simplices in a dgf file, and then I use it to
>> feed the grid constructor (Alberta, ALUGRID, whatever).
>> In the online documentation about the DGF, under the field "Simplex", I read
>> that "no ordering of local vertices is required".
>> In my particular case, however, I do need a special ordering, since I'm dealing
>> with hypersurfaces. To set an example: if you have the unit cube as initial
>> geometry, I need that, looking from outside, all the triangles have corners
>> counter-clockwise oriented s.t. the unit normal points outward. I do need that
>> this ordering (used in .dgf file) is preserved!
>>
>> Is there any way of knowing whether this important information is preserved?
>> Otherwise, the computation of the normal to each triangle could lead to weird
>> results (strong nonsymmetric time-dependent behaviour for initial symmetric
>> configurations).
>>
>> Thanks for your help!
>>
>> Andrea
>> __________________________________________________________
>>
>> Andrea Sacconi
>> PhD student, Applied Mathematics
>> AMMP Section, Department of Mathematics, Imperial College London,
>> London SW7 2AZ, UK
>> a.sacconi11 at imperial.ac.uk
>>
>>
>> _______________________________________________
>> Dune mailing list
>> Dune at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune
>
> --
> Dr. Martin Nolte<nolte at mathematik.uni-freiburg.de>
>
> Universität Freiburg                                   phone: +49-761-203-5630
> Abteilung für angewandte Mathematik                    fax:   +49-761-203-5632
> Hermann-Herder-Straße 10
> 79104 Freiburg, Germany
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
>
>
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune




More information about the Dune mailing list