[SCM] Packaging for dune-grid: a toolbox for solving PDEs -- grid interface branch, master, updated. debian/2.2.svn8198-1

Ansgar Burchardt ansgar at debian.org
Sun Jun 3 11:12:30 UTC 2012


The following commit has been merged in the master branch:
commit 154075f9c1d2caf39ddda2e680f7f35261da018d
Author: Ansgar Burchardt <ansgar at debian.org>
Date:   Fri Jun 1 21:12:26 2012 +0200

    Apply upstream patch for FS #1107 (r8201).

diff --git a/debian/patches/refinement-test-failure-r8201.patch b/debian/patches/refinement-test-failure-r8201.patch
new file mode 100644
index 0000000..1a2dfc9
--- /dev/null
+++ b/debian/patches/refinement-test-failure-r8201.patch
@@ -0,0 +1,150 @@
+Author: sander
+Date: 2012-05-31 12:17:39 +0200 (Thu, 31 May 2012)
+New Revision: 8201
+
+Modified:
+   branches/release-2.2/dune/grid/common/refinement/prismtriangulation.cc
+   branches/release-2.2/dune/grid/common/refinement/pyramidtriangulation.cc
+Log:
+Fix coordinate transformations for pyramid and prism refinement.
+
+This is basically patch 8199 from the trunk, hand-merged into
+the release branch.  It fixes FS#1107.
+
+Thanks to Jonathan Youett for the patch.
+
+--- a/dune/grid/common/refinement/prismtriangulation.cc
++++ b/dune/grid/common/refinement/prismtriangulation.cc
+@@ -35,11 +35,8 @@
+       //  Utilities
+       //
+ 
+-      using Simplex::factorial;
+-      using Simplex::binomial;
+       using Simplex::getPermutation;
+       using Simplex::referenceToKuhn;
+-      using Simplex::kuhnToReference;
+ 
+       // ////////////////////////////////////
+       //
+@@ -50,21 +47,29 @@
+       template<int dimension, class CoordType, int codimension>
+       class RefinementIteratorSpecial;
+ 
+-      
+-      //need coordinate transformation so that i can use the permutations with index 0 , 1 , 2 to triangulate the prism
+-                template<int dimension, class CoordType> FieldVector<CoordType, dimension> transformCoordinate(//! Point to transform
+-                                FieldVector<CoordType, dimension> point) {
+-                        FieldVector<CoordType, dimension> transform;
+-                        transform[0]=point[2];
+-                        transform[1]=point[0]-point[2];
+-                        transform[2]=point[1];
+-                        return transform;
+-                }
+-      
+-      
+-      
++      /* 
++       * The permutations 0,2 and 3 of the Kuhn-decomposition of a cube into simplices form a prism. 
++       * The resulting prism is not oriented the same as the reference prism and so the Kuhn-coordinates 
++       * have to be transformed using the method below.
++       */
++       template<int dimension, class CoordType> FieldVector<CoordType, dimension> transformCoordinate(FieldVector<CoordType, dimension> point) 
++       {
++           FieldVector<CoordType, dimension> transform;
++           transform[0]=point[1];
++           transform[1]=1-point[0];
++           transform[2]=point[2];
++           return transform;
++       }
++
++
+ 
+ 
++       /** \brief Implementation of the refinement of a prism into simplices.
++        *
++        * Note that the virtual vertices of two intersecting simplices might have copies, i.e.
++        * by running over all vertices using the VertexIterator you might run over some twice. 
++        *
++       */
+       template<int dimension_, class CoordType> 
+       class RefinementImp {
+                 public:
+@@ -215,8 +220,9 @@
+       RefinementIteratorSpecial<dimension, CoordType, dimension>::
+       coords() const
+       {
+-          return transformCoordinate(referenceToKuhn(backend.coords(),
+-                                                                getPermutation<dimension>(kuhnIndex)));
++        // while the kuhnIndex runs from 0,1,2 the actual permutations we need are 0,2,3
++        return transformCoordinate(referenceToKuhn(backend.coords(),
++                                                                getPermutation<dimension>((kuhnIndex+2)%4)));
+         
+       }
+ 
+@@ -316,8 +322,8 @@
+         const typename BackendIterator::Geometry &bgeo = backend.geometry();
+         Dune::array<CoordVector, dimension+1> corners;
+         for(int i = 0; i <= dimension; ++i)
+-          corners[i] = referenceToKuhn(bgeo.corner(i),
+-                                       getPermutation<dimension>(kuhnIndex));
++          corners[i] = transformCoordinate(referenceToKuhn(bgeo.corner(i),
++                                       getPermutation<dimension>((kuhnIndex+2)%4)));
+ 
+         return Geometry(GenericGeometry::Geometry
+                         <dimension, dimension, Refinement>
+--- a/dune/grid/common/refinement/pyramidtriangulation.cc
++++ b/dune/grid/common/refinement/pyramidtriangulation.cc
+@@ -35,11 +35,8 @@
+             //  Utilities
+             //
+ 
+-            using Simplex::factorial;
+-            using Simplex::binomial;
+             using Simplex::getPermutation;
+             using Simplex::referenceToKuhn;
+-            using Simplex::kuhnToReference;
+ 
+             // ////////////////////////////////////
+             //
+@@ -50,16 +47,26 @@
+             template<int dimension, class CoordType, int codimension>
+             class RefinementIteratorSpecial;
+       
+-            //need coordinate transformation so that i can use the permutations with index 0 , 1 , 2 to triangulate the pyramid
++            /* 
++             * The permutations 0 and 1 of the Kuhn-decomposition of a cube into simplices form a pyramid. 
++             * The resulting pyramid is not oriented the same as the reference pyramid and so the Kuhn-coordinates 
++             * have to be transformed using the method below.
++            */
+             template<int dimension, class CoordType> FieldVector<CoordType, dimension> transformCoordinate(//! Point to transform
+                 FieldVector<CoordType, dimension> point) {
+                 FieldVector<CoordType, dimension> transform;
+-                transform[0]=point[0]-point[2];
+-                transform[1]=point[1]-point[2];
++                transform[0]=1-point[0];
++                transform[1]=1-point[1];
+                 transform[2]=point[2];
+                 return transform;
+             }
+ 
++            /** \brief Implementation of the refinement of a pyramid into simplices.
++             *
++             * Note that the virtual vertices of two intersecting simplices might have copies, i.e.
++             * by running over all vertices using the VertexIterator you might run over some twice. 
++             *
++            */
+             template<int dimension_, class CoordType> 
+             class RefinementImp {
+             public:
+@@ -319,8 +326,8 @@
+                 Dune::array<CoordVector, dimension+1> corners;
+                 for(int i = 0; i <= dimension; ++i)
+                     corners[i] =
+-                        referenceToKuhn(bgeo.corner(i),
+-                                        getPermutation<dimension>(kuhnIndex));
++                        transformCoordinate(referenceToKuhn(bgeo.corner(i),
++                                        getPermutation<dimension>(kuhnIndex)));
+ 
+                 return Geometry(GenericGeometry::Geometry
+                                 <dimension, dimension, Refinement>
diff --git a/debian/patches/series b/debian/patches/series
index 6233441..8ddb676 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ soname.patch
 disable-alberta3d-test.patch
 install-grids-as-doc.patch
 do-not-install-amiramesh-grids.patch
+refinement-test-failure-r8201.patch

-- 
Packaging for dune-grid: a toolbox for solving PDEs -- grid interface



More information about the debian-science-commits mailing list