[Dune] [Dune-Commit] dune-localfunctions r943 - trunk/dune/localfunctions/test

Oliver Sander sander at mi.fu-berlin.de
Sun Jan 2 11:28:10 CET 2011


Hi Jö!
In UGGrid I used Geometry<BasicGeometry> to get a fully interface-
compliant geometry without a grid.  Is there something wrong with
that approach?  If so, we should update the tests to find the problem.
Otherwise your MockGeometry may not be necessary.

Best,
Oliver

Am 01.01.2011 05:03, schrieb joe at dune-project.org:
> Author: joe
> Date: 2011-01-01 05:03:34 +0100 (Sat, 01 Jan 2011)
> New Revision: 943
>
> Modified:
>     trunk/dune/localfunctions/test/test-edges0.5.cc
>     trunk/dune/localfunctions/test/test-pk2d.cc
>     trunk/dune/localfunctions/test/test-q1.cc
>     trunk/dune/localfunctions/test/test-q22d.cc
> Log:
> Replace uses of BasicGeometry with MockGeometry, which is closer to
> Dune::Geometry.
>
> Modified: trunk/dune/localfunctions/test/test-edges0.5.cc
> ===================================================================
> --- trunk/dune/localfunctions/test/test-edges0.5.cc	2011-01-01 04:03:31 UTC (rev 942)
> +++ trunk/dune/localfunctions/test/test-edges0.5.cc	2011-01-01 04:03:34 UTC (rev 943)
> @@ -13,8 +13,7 @@
>   #include<dune/common/fvector.hh>
>   #include<dune/common/geometrytype.hh>
>
> -#include<dune/grid/genericgeometry/geometry.hh>
> -#include<dune/grid/genericgeometry/geometrytraits.hh>
> +#include<dune/grid/utility/mockgeometry.hh>
>   #include<dune/grid/utility/vertexorder.hh>
>
>   #include<dune/localfunctions/whitney/edges0.5.hh>
> @@ -41,9 +40,7 @@
>         corners[0][0] = -.5; corners[0][1] = -.5;
>         corners[1][0] =  .5; corners[1][1] = -.5;
>         corners[2][0] = 0  ; corners[2][1] =  .5;
> -      typedef Dune::GenericGeometry::BasicGeometry<
> -        2, Dune::GenericGeometry::DefaultGeometryTraits<double, 2, 2>
> ->  Geometry;
> +      typedef Dune::MockGeometry<double, 2, 2>  Geometry;
>         Geometry geo(gt, corners);
>
>         std::size_t vertexIds[] = {0, 1, 2};
> @@ -71,9 +68,7 @@
>         corners[1][0] =  .5; corners[1][1] = -.5; corners[1][2] = -.5;
>         corners[2][0] = 0  ; corners[2][1] =  .5; corners[2][2] = -.5;
>         corners[3][0] = 0  ; corners[3][1] =  0 ; corners[3][2] =  .5;
> -      typedef Dune::GenericGeometry::BasicGeometry<
> -        3, Dune::GenericGeometry::DefaultGeometryTraits<double, 3, 3>
> ->  Geometry;
> +      typedef Dune::MockGeometry<double, 3, 3>  Geometry;
>         Geometry geo(gt, corners);
>
>         std::size_t vertexIds[] = {0, 1, 2, 3};
>
> Modified: trunk/dune/localfunctions/test/test-pk2d.cc
> ===================================================================
> --- trunk/dune/localfunctions/test/test-pk2d.cc	2011-01-01 04:03:31 UTC (rev 942)
> +++ trunk/dune/localfunctions/test/test-pk2d.cc	2011-01-01 04:03:34 UTC (rev 943)
> @@ -14,8 +14,7 @@
>   #include<dune/common/fvector.hh>
>   #include<dune/common/geometrytype.hh>
>
> -#include<dune/grid/genericgeometry/geometry.hh>
> -#include<dune/grid/genericgeometry/geometrytraits.hh>
> +#include<dune/grid/utility/mockgeometry.hh>
>   #include<dune/grid/utility/vertexorder.hh>
>
>   #include<dune/localfunctions/lagrange/pk2d.hh>
> @@ -40,9 +39,7 @@
>       corners[0][0] = -.5; corners[0][1] = -.5;
>       corners[1][0] =  .5; corners[1][1] = -.5;
>       corners[2][0] = 0  ; corners[2][1] =  .5;
> -    typedef Dune::GenericGeometry::BasicGeometry<
> -      2, Dune::GenericGeometry::DefaultGeometryTraits<double, 2, 2>
> ->  Geometry;
> +    typedef Dune::MockGeometry<double, 2, 2>  Geometry;
>       Geometry geo(gt, corners);
>
>       std::size_t vertexIds[] = {0, 1, 2};
>
> Modified: trunk/dune/localfunctions/test/test-q1.cc
> ===================================================================
> --- trunk/dune/localfunctions/test/test-q1.cc	2011-01-01 04:03:31 UTC (rev 942)
> +++ trunk/dune/localfunctions/test/test-q1.cc	2011-01-01 04:03:34 UTC (rev 943)
> @@ -13,8 +13,7 @@
>   #include<dune/common/fvector.hh>
>   #include<dune/common/geometrytype.hh>
>
> -#include<dune/grid/genericgeometry/geometry.hh>
> -#include<dune/grid/genericgeometry/geometrytraits.hh>
> +#include<dune/grid/utility/mockgeometry.hh>
>
>   #include<dune/localfunctions/lagrange/q1.hh>
>
> @@ -39,9 +38,7 @@
>         Dune::FieldVector<double, 1>  corners[2];
>         corners[0][0] = -.5;
>         corners[1][0] =  .5;
> -      typedef Dune::GenericGeometry::BasicGeometry<
> -        1, Dune::GenericGeometry::DefaultGeometryTraits<double, 1, 1>
> ->  Geometry;
> +      typedef Dune::MockGeometry<double, 1, 1>  Geometry;
>         Geometry geo(gt, corners);
>
>         Dune::Q1FiniteElementFactory<Geometry, double>  feFactory;
> @@ -65,9 +62,7 @@
>         corners[1][0] = 0  ; corners[1][1] = -.5;
>         corners[2][0] =  .5; corners[2][1] = 0;
>         corners[3][0] = 0  ; corners[3][1] =  .5;
> -      typedef Dune::GenericGeometry::BasicGeometry<
> -        2, Dune::GenericGeometry::DefaultGeometryTraits<double, 2, 2>
> ->  Geometry;
> +      typedef Dune::MockGeometry<double, 2, 2>  Geometry;
>         Geometry geo(gt, corners);
>
>         Dune::Q1FiniteElementFactory<Geometry, double>  feFactory;
> @@ -95,9 +90,7 @@
>         corners[5][0] =  .7; corners[5][1] = -.6; corners[5][2] =  .5;
>         corners[6][0] = -.4; corners[6][1] =  .3; corners[6][2] =  .7;
>         corners[7][0] =  .6; corners[7][1] =  .5; corners[7][2] =  .4;
> -      typedef Dune::GenericGeometry::BasicGeometry<
> -        3, Dune::GenericGeometry::DefaultGeometryTraits<double, 3, 3>
> ->  Geometry;
> +      typedef Dune::MockGeometry<double, 3, 3>  Geometry;
>         Geometry geo(gt, corners);
>
>         Dune::Q1FiniteElementFactory<Geometry, double>  feFactory;
>
> Modified: trunk/dune/localfunctions/test/test-q22d.cc
> ===================================================================
> --- trunk/dune/localfunctions/test/test-q22d.cc	2011-01-01 04:03:31 UTC (rev 942)
> +++ trunk/dune/localfunctions/test/test-q22d.cc	2011-01-01 04:03:34 UTC (rev 943)
> @@ -13,8 +13,7 @@
>   #include<dune/common/fvector.hh>
>   #include<dune/common/geometrytype.hh>
>
> -#include<dune/grid/genericgeometry/geometry.hh>
> -#include<dune/grid/genericgeometry/geometrytraits.hh>
> +#include<dune/grid/utility/mockgeometry.hh>
>
>   #include<dune/localfunctions/lagrange/q22d.hh>
>
> @@ -40,9 +39,7 @@
>         corners[1][0] = 0  ; corners[1][1] = -.5;
>         corners[2][0] =  .5; corners[2][1] = 0;
>         corners[3][0] = 0  ; corners[3][1] =  .5;
> -      typedef Dune::GenericGeometry::BasicGeometry<
> -        2, Dune::GenericGeometry::DefaultGeometryTraits<double, 2, 2>
> ->  Geometry;
> +      typedef Dune::MockGeometry<double, 2, 2>  Geometry;
>         Geometry geo(gt, corners);
>
>         Dune::Q22DFiniteElementFactory<Geometry, double>  feFactory;
>
>
> _______________________________________________
> Dune-Commit mailing list
> Dune-Commit at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-commit
>    





More information about the Dune mailing list