[Dune] Local node numbering in Dune
Jö Fahlke
jorrit at jorrit.de
Fri Apr 10 22:27:50 CEST 2015
Am Fri, 10. Apr 2015, 14:09:09 +0100 schrieb Ganesh Diwan:
> Date: Fri, 10 Apr 2015 14:09:09 +0100
> From: Ganesh Diwan <gcdiwan83 at gmail.com>
> To: Oliver Sander <sander at igpm.rwth-aachen.de>, DUNE Liste
> <dune at dune-project.org>
> Subject: Re: [Dune] Local node numbering in Dune
> X-No-Auth: unauthenticated sender
> X-No-Relay: not in my network
> X-Envelope-From: <gcdiwan83 at gmail.com>
>
> Hi Oliver
>
> When I loop through the element(s), I see that Dune returns element faces
> that are in conflict with what the link above says. To be specific I get
> my face 2 as Dune reference element face 0,
> my face 0 as Dune reference element face 1,
> my face 3 as Dune reference element face 2, and
> my face 1 as Dune reference element face 3,
>
> Clearly I am doing something wrong!
I'm sorry, you appear to have included the wrong version of MeshTraversal in
your mail. At least I cannot see how it could have produced the output above,
since it does not contain the string "my face".
(In case I misunderstood and MeshTraversal was not meant to produce that
output, please clarify how you obtained the numbers after "my face" and "Dune
reference element face".)
Regards,
Jö.
> I have:
>
> typedef Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming> GridTypeALU;
> std::auto_ptr<GridTypeALU> mygrid( GmshReader<GridTypeALU>::read(
> "./grids/hhgex.msh", true, true ) );
> MeshTraversal (*mygrid); //
>
> and then I have MeshTraversal as:
>
> template<class G>
> void MeshTraversal(G& grid) {
> //first we extract the dimensions of the grid
>
> const int dim = G::dimension;
> std::cout << "dimension of the grid is: " << dim << std::endl;
> const int dimworld = G::dimensionworld;
> typedef typename G::ctype ct;
> typedef typename G::LeafGridView GridView;
>
> typedef typename GridView::template Codim<0>::Iterator LeafIterator;
> typedef typename GridView::IntersectionIterator IntersectionIterator;
>
> GridView gridView = grid.leafView();
> // get grid view on leaf part
>
> LeafIterator endit = gridView.template end<0>();
>
> int count = 0;
> //
> for (LeafIterator it = gridView.template begin<0>(); it != endit; ++it)
> {
>
> count++;
> Dune::GeometryType gt = it->type();
> //
> std::cout << "visiting element " << count << gt << std::endl;
>
> IntersectionIterator isend = gridView.iend(*it);
>
> int countface = 0;
> for (IntersectionIterator is = gridView.ibegin(*it); is != isend;
> ++is) {
> countface++;
> Dune::GeometryType gfacet = is->type();
> std::cout << "visiting face " << countface << gfacet <<
> std::endl;
> std::cout << "node 1 for face" << countface << " is "
> << is->geometry().corner(0) << std::endl;
> std::cout << "node 2 for face" << countface << " is "
> << is->geometry().corner(1) << std::endl;
> //
> }
> }
> std::cin.get();
> }
>
>
>
> On Wed, Apr 8, 2015 at 3:57 PM, Ganesh Diwan <gcdiwan83 at gmail.com> wrote:
>
> > Thankyou!
> >
> > Ganesh
> >
> > On Wed, Apr 8, 2015 at 3:56 PM, Oliver Sander <sander at igpm.rwth-aachen.de>
> > wrote:
> >
> >> Am 08.04.2015 um 16:50 schrieb Ganesh Diwan:
> >> > Dear List
> >> >
> >> > It appears that after reading the grid from a Gmsh format file inside
> >> Dune,
> >> > the local dofs 2 and 3 i.e. node number 3 and 4 are swapped. This is
> >> inside
> >> > dune-grid//dune/grid/io/file/gmshreader.hh
> >> >
> >> > Is there a specific reason this is done? Is there a way to tell Dune to
> >> use
> >> > the same node numbering as in Gmsh file and not to alter it?
> >>
> >> Hi Ganesh,
> >> Dune has one fixed numbering for the local node numbers of all reference
> >> elements
> >> (see
> >> http://www.dune-project.org/doc/doxygen/dune-geometry-html/group___geometry_reference_elements.html
> >> )
> >>
> >> These numberings differ from the ones used by gmsh, and hence the gmsh
> >> reader
> >> needs to do some node swapping.
> >>
> >> Best,
> >> Oliver
> >>
> >> >
> >> > Thankyou
> >> > Ganesh
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > 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
--
Jorrit (Jö) Fahlke, Institute for Computational und Applied Mathematics,
University of Münster, Orleans-Ring 10, D-48149 Münster
Tel: +49 251 83 35146 Fax: +49 251 83 32729
Interpunktion, Orthographie und Grammatik der Email ist frei erfunden.
Eine Übereinstimmung mit aktuellen oder ehemaligen Regeln wäre rein
zufällig und ist nicht beabsichtigt.
-------------- 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/20150410/6395a5d5/attachment.sig>
More information about the Dune
mailing list