[Dune] Reference tetrahedron, again
Adrian Burri
burriad at mathematik.uni-freiburg.de
Thu Jul 21 18:02:30 CEST 2005
Hi Peter,
indeed the ReferenceElements are the replacement for the
ReferenceTopologySet.
Adi
Peter Bastian wrote:
>Hi,
>
>what is the class ReferenceTopologySet for anyway? I thought, on the
>last dune meeting we decided that the reference elements are those that
>are in the class ReferenceElement. This class contains a superset of the
>information in ReferenceTopologySet and is implemented for more cases.
>
>-- Peter
>
>
>Adrian Burri schrieb:
>
>
>>Well, I think the point is that there is no "correct" ordering, so we're
>>completely free to choose it to our liking. I don't have a clue where
>>the numbering convention in ReferenceTopologySet comes from, but I think
>>it is nice for two reasons:
>>- I used it in my implementation and don't need to change anything if we
>>stick to it
>>- the orientation of all faces is the same (inward pointing normal)
>>
>>I think it is not up to me to decide whether this is the best possible
>>choice, but if noone has any objections against it, I would declare it
>>as the Dune standard.
>>
>>Cheers
>>
>>Adi
>>
>>P.S. An algorithmic definition of the numbering is this: Given the three
>>face vertices, start with the smallest available index and choose the
>>rest so that the orientation of all faces is the same (inward pointing,
>>in this case).
>>
>>Sreejith Pulloor Kuttanikkad wrote:
>>
>>
>>
>>>On Thu, Jul 21, 2005 at 02:35:29PM +0200, Adrian Burri wrote:
>>>
>>>
>>>
>>>
>>>>Hi,
>>>>
>>>>the Dune-homepage says nothing about the numbering of the vertices on
>>>>faces, but as you can see from the attached program and output, the
>>>>numbering in the ReferenceSimplex changed from the way it was in the
>>>>ReferenceTopologySet. Can we stick to the way it was in the
>>>>ReferenceTopologySet? (I use this numbering convention heavily in
>>>>ALU3dGrid and would like to leave it as is...)
>>>>
>>>>
>>>>
>>>
>>>Infact I had no idea how the numbering of the vertices on faces done
>>>(basic rule on local numbering of vertices on faces) and thats why the
>>>mismatch. could you please explain the basic rule of the numbering
>>>convention you following so that i could correct them.
>>>
>>>sreejith
>>>
>>>
>>>
>>>
>>>
>>>>Ciao
>>>>
>>>>Adi
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>>//- System includes
>>>>#include <iostream>
>>>>
>>>>//- Dune includes
>>>>#include <dune/grid/common/reftopology.hh>
>>>>#include <dune/grid/common/referenceelements.hh>
>>>>
>>>>using namespace Dune;
>>>>
>>>>int main() {
>>>> int n;
>>>> const int* faceIdx;
>>>>
>>>> const int nFacesTet = 4;
>>>> const int nFacesHexa = 6;
>>>>
>>>> std::cout << "Test tetrahedra:" << std::endl;
>>>> std::cout << "----------------" << std::endl;
>>>>
>>>> ReferenceSimplexContainer<double, 3> simplexContainer;
>>>> const ReferenceSimplex<double, 3>& referenceTetrahedron =
>>>>simplexContainer(tetrahedron);
>>>>
>>>> for (int face = 0; face < nFacesTet; ++face) {
>>>> ReferenceTopologySet::getSubEntities<1,3>(tetrahedron, face,
>>>>faceIdx, n);
>>>> std::cout << "Face " << face << ":" << std::endl;
>>>> std::cout << "(ReferenceTopologySet) "
>>>> << "{ " << faceIdx[0] << ", " << faceIdx[1]
>>>> << ", " << faceIdx[2] << " }" << std::endl;
>>>>
>>>> std::cout << "(ReferenceSimplex) "
>>>> << "{ " << referenceTetrahedron.subentity(face, 1, 0, 3)
>>>> << ", " << referenceTetrahedron.subentity(face, 1, 1, 3)
>>>> << ", " << referenceTetrahedron.subentity(face, 1, 2, 3)
>>>> << " }" << std::endl;
>>>> }
>>>>
>>>> std::cout << std::endl;
>>>> std::cout << "Test hexahedra:" << std::endl;
>>>> std::cout << "---------------" << std::endl;
>>>>
>>>> ReferenceCubeContainer<double, 3> cubeContainer;
>>>> const ReferenceCube<double, 3>& referenceCube =
>>>> cubeContainer(cube);
>>>>
>>>> for (int face = 0; face < nFacesHexa; ++face) {
>>>> ReferenceTopologySet::getSubEntities<1,3>(hexahedron, face,
>>>>faceIdx, n);
>>>>
>>>> std::cout << "Face " << face << ":" << std::endl;
>>>> std::cout << "(ReferenceTopologySet) "
>>>> << "{ " << faceIdx[0] << ", " << faceIdx[1]
>>>> << ", " << faceIdx[2] << " }" << std::endl;
>>>>
>>>> std::cout << "(ReferenceCube) "
>>>> << "{ " << referenceCube.subentity(face, 1, 0, 3)
>>>> << ", " << referenceCube.subentity(face, 1, 1, 3)
>>>> << ", " << referenceCube.subentity(face, 1, 2, 3)
>>>> << " }" << std::endl;
>>>> }
>>>>}
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>>Test tetrahedra:
>>>>----------------
>>>>Face 0:
>>>>(ReferenceTopologySet) { 1, 3, 2 }
>>>>(ReferenceSimplex) { 1, 2, 3 }
>>>>Face 1:
>>>>(ReferenceTopologySet) { 0, 2, 3 }
>>>>(ReferenceSimplex) { 2, 0, 3 }
>>>>Face 2:
>>>>(ReferenceTopologySet) { 0, 3, 1 }
>>>>(ReferenceSimplex) { 0, 1, 3 }
>>>>Face 3:
>>>>(ReferenceTopologySet) { 0, 1, 2 }
>>>>(ReferenceSimplex) { 0, 1, 2 }
>>>>Test hexahedra:
>>>>---------------
>>>>Face 0:
>>>>(ReferenceTopologySet) { 0, 2, 4 }
>>>>(ReferenceCube) { 0, 2, 4 }
>>>>Face 1:
>>>>(ReferenceTopologySet) { 1, 3, 5 }
>>>>(ReferenceCube) { 1, 3, 5 }
>>>>Face 2:
>>>>(ReferenceTopologySet) { 0, 1, 4 }
>>>>(ReferenceCube) { 0, 1, 4 }
>>>>Face 3:
>>>>(ReferenceTopologySet) { 2, 3, 6 }
>>>>(ReferenceCube) { 2, 3, 6 }
>>>>Face 4:
>>>>(ReferenceTopologySet) { 0, 1, 2 }
>>>>(ReferenceCube) { 0, 1, 2 }
>>>>Face 5:
>>>>(ReferenceTopologySet) { 4, 5, 6 }
>>>>(ReferenceCube) { 4, 5, 6 }
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>>_______________________________________________
>>>>Dune mailing list
>>>>Dune at hal.iwr.uni-heidelberg.de
>>>>http://hal.iwr.uni-heidelberg.de/cgi-bin/mailman/listinfo/dune
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
>>_______________________________________________
>>Dune mailing list
>>Dune at hal.iwr.uni-heidelberg.de
>>http://hal.iwr.uni-heidelberg.de/cgi-bin/mailman/listinfo/dune
>>
>>
>>
>>
>
>
>
More information about the Dune
mailing list