[Dune] [Dune-Commit] dune-localfunctions r1051 - in trunk/dune/localfunctions: . orthonormal raviartthomas test utility

Oliver Sander sander at mi.fu-berlin.de
Mon Apr 23 07:24:38 CEST 2012


Hi Christoph,

>
> Modified: trunk/dune/localfunctions/lagrange.hh
> ===================================================================
> --- trunk/dune/localfunctions/lagrange.hh	2012-04-13 16:17:36 UTC (rev 1050)
> +++ trunk/dune/localfunctions/lagrange.hh	2012-04-22 19:27:43 UTC (rev 1051)
> @@ -53,9 +53,15 @@
>
>       /** \todo Please doc me !
>        */
> -    LagrangeLocalFiniteElement ( unsigned int topologyId, unsigned int order )
> +    LagrangeLocalFiniteElement ( unsigned int topologyId, unsigned int order ) DUNE_UNUSED
>       : Base( topologyId, order )
>       {}

I suppose you meant DUNE_DEPRECATED instead of DUNE_UNUSED?

best,
Oliver


> +
> +    /** \todo Please doc me !
> +     */
> +    LagrangeLocalFiniteElement ( const GeometryType&gt, unsigned int order )
> +    : Base( gt, order )
> +    {}
>     };
>   }
>
>
> Modified: trunk/dune/localfunctions/orthonormal/test.cc
> ===================================================================
> --- trunk/dune/localfunctions/orthonormal/test.cc	2012-04-13 16:17:36 UTC (rev 1050)
> +++ trunk/dune/localfunctions/orthonormal/test.cc	2012-04-22 19:27:43 UTC (rev 1051)
> @@ -1,5 +1,6 @@
>   #include<config.h>
>
> +#include<dune/geometry/type.hh>
>   #include<dune/geometry/quadraturerules/gaussquadrature.hh>
>
>   #include<dune/localfunctions/utility/field.hh>
> @@ -75,12 +76,14 @@
>   template<unsigned int dimension>
>   bool test(unsigned int topologyId, unsigned int order)
>   {
> +  Dune::GeometryType gt(topologyId, dimension);
> +
>     bool ret = true;
>     for (unsigned int o=order;o<=order;--o)
>     {
>       std::cout<<  "Testing "<<  topologyId<<  " in dimension "<<  dimension<<  " with order "<<  o<<  std::endl;
>       typedef Dune::OrthonormalBasisFactory<dimension,StorageField,ComputeField>  BasisFactory;
> -    const typename BasisFactory::Object&basis = *BasisFactory::create(topologyId,o);
> +    const typename BasisFactory::Object&basis = *BasisFactory::create(gt, o);
>
>       const unsigned int size = basis.size( );
>
> @@ -93,7 +96,7 @@
>       // typedef typename Dune::GenericGeometry::GaussQuadratureProvider<dimension,double,ComputeField>  QuadratureProvider;
>       typedef typename Dune::GenericGeometry::GaussQuadratureProvider<dimension,double,double>  QuadratureProvider;
>       typedef typename QuadratureProvider::Object Quadrature;
> -    const Quadrature&quadrature = *QuadratureProvider::create(topologyId,2*order+1);
> +    const Quadrature&quadrature = *QuadratureProvider::create(gt, 2*order+1);
>       const unsigned int quadratureSize = quadrature.size();
>       for( unsigned int qi = 0; qi<  quadratureSize; ++qi )
>       {
>
> Modified: trunk/dune/localfunctions/orthonormal.hh
> ===================================================================
> --- trunk/dune/localfunctions/orthonormal.hh	2012-04-13 16:17:36 UTC (rev 1050)
> +++ trunk/dune/localfunctions/orthonormal.hh	2012-04-22 19:27:43 UTC (rev 1051)
> @@ -39,9 +39,15 @@
>       /** \todo Please doc me !
>        */
>       OrthonormalLocalFiniteElement ( unsigned int topologyId,
> -                                    unsigned int order )
> +                                    unsigned int order ) DUNE_DEPRECATED
>       : Base(topologyId,order)
>       {}
> +
> +    /** \todo Please doc me !
> +     */
> +    OrthonormalLocalFiniteElement ( const GeometryType&gt, unsigned int order )
> +    : Base(gt, order)
> +    {}
>     };
>
>   }
>
> Modified: trunk/dune/localfunctions/raviartthomas/interpolation.hh
> ===================================================================
> --- trunk/dune/localfunctions/raviartthomas/interpolation.hh	2012-04-13 16:17:36 UTC (rev 1050)
> +++ trunk/dune/localfunctions/raviartthomas/interpolation.hh	2012-04-22 19:27:43 UTC (rev 1051)
> @@ -296,7 +296,7 @@
>           testBasisVal.resize(builder_.testFaceBasis(f)->size());
>
>           const Mapping&mapping = refElement.template mapping<  1>( f );
> -        const Dune::GeometryType subGeoType( mapping.topologyId(), dimension-1 );
> +        const Dune::GeometryType subGeoType( mapping.type().id(), dimension-1 );
>           const typename FaceQuadratureProvider::Object *faceQuad = FaceQuadratureProvider::create( subGeoType, 2*order_+2 );
>
>           const unsigned int quadratureSize = faceQuad->size();
>
> Modified: trunk/dune/localfunctions/test/testgenericfem.cc
> ===================================================================
> --- trunk/dune/localfunctions/test/testgenericfem.cc	2012-04-13 16:17:36 UTC (rev 1050)
> +++ trunk/dune/localfunctions/test/testgenericfem.cc	2012-04-22 19:27:43 UTC (rev 1051)
> @@ -39,7 +39,7 @@
>       {
>         std::cout<<  "order : "<<  order<<  std::endl;
>         Dune::LagrangeLocalFiniteElement<Dune::EquidistantPointSet,3,double,double>
> -        lagrangeSimplex(0,order);
> +        lagrangeSimplex(Dune::GeometryType(Dune::GeometryType::simplex, 3), order);
>         success&= testFE(lagrangeSimplex);
>       }
>       std::cout<<  "Testing LagrangeLocalFiniteElement<EquidistantPointSet>  on 2d"
> @@ -48,7 +48,7 @@
>       {
>         std::cout<<  "order : "<<  order<<  std::endl;
>         Dune::LagrangeLocalFiniteElement<Dune::EquidistantPointSet,2,double,double>
> -        lagrangeCube(3,order);
> +        lagrangeCube(Dune::GeometryType(Dune::GeometryType::cube, 2), order);
>         success&= testFE(lagrangeCube);
>       }
>   #if HAVE_GMP
> @@ -81,7 +81,7 @@
>       {
>         std::cout<<  "order : "<<  order<<  std::endl;
>         typedef Dune::LagrangeLocalFiniteElement<Dune::EquidistantPointSet,3,double,double>  FE;
> -      Dune::DGLocalFiniteElement<FE>  dglagrangeCube(7,order);
> +      Dune::DGLocalFiniteElement<FE>  dglagrangeCube(Dune::GeometryType(Dune::GeometryType::cube, 3), order);
>         success&= testFE(dglagrangeCube);
>       }
>       std::cout<<  "Testing L2LagrangeLocalFiniteElement<EquidistantPointSet>  on 3d"
> @@ -90,7 +90,7 @@
>       {
>         std::cout<<  "order : "<<  order<<  std::endl;
>         typedef Dune::LagrangeLocalFiniteElement<Dune::EquidistantPointSet,3,double,double>  FE;
> -      Dune::L2LocalFiniteElement<FE>  dglagrangeCube(7,order);
> +      Dune::L2LocalFiniteElement<FE>  dglagrangeCube(Dune::GeometryType(Dune::GeometryType::cube, 3), order);
>         success&= testFE(dglagrangeCube);
>       }
>   #if HAVE_GMP
> @@ -111,7 +111,7 @@
>       {
>         std::cout<<  "order : "<<  order<<  std::endl;
>         Dune::OrthonormalLocalFiniteElement<3,double,double>
> -        onbPrism(5,order);
> +        onbPrism(Dune::GeometryType(Dune::GeometryType::prism, 3), order);
>         success&= testFE(onbPrism);
>       }
>       std::cout<<  "Testing RaviartThomasFiniteElement on 3d"
> @@ -120,7 +120,7 @@
>       {
>         std::cout<<  "order : "<<  order<<  std::endl;
>         Dune::RaviartThomasLocalFiniteElement<3,double,double>
> -        lagrangeCube(0,order);
> +        lagrangeCube(Dune::GeometryType(Dune::GeometryType::simplex, 3), order);
>         success&= testFE(lagrangeCube);
>       }
>       return success ? 0:1;
>
> Modified: trunk/dune/localfunctions/test/virtualshapefunctiontest.cc
> ===================================================================
> --- trunk/dune/localfunctions/test/virtualshapefunctiontest.cc	2012-04-13 16:17:36 UTC (rev 1050)
> +++ trunk/dune/localfunctions/test/virtualshapefunctiontest.cc	2012-04-22 19:27:43 UTC (rev 1051)
> @@ -156,7 +156,7 @@
>       typedef Dune::FixedOrderLocalBasisTraits<LBTraits,1>::Traits C1LBTraits;
>       typedef Dune::FixedOrderLocalBasisTraits<LBTraits,2>::Traits C2LBTraits;
>
> -    const Dune::P0LocalFiniteElement<double, double, 2>  p0FE(Dune::GeometryType::cube);
> +    const Dune::P0LocalFiniteElement<double, double, 2>  p0FE(Dune::GeometryType(Dune::GeometryType::cube, 2));
>       const Dune::LocalFiniteElementVirtualImp<Dune::P0LocalFiniteElement<double, double, 2>  >  p0VFE(p0FE);
>       testLocalFiniteElement<C0LBTraits>(&p0VFE);
>
>
> Modified: trunk/dune/localfunctions/utility/localfiniteelement.hh
> ===================================================================
> --- trunk/dune/localfunctions/utility/localfiniteelement.hh	2012-04-13 16:17:36 UTC (rev 1050)
> +++ trunk/dune/localfunctions/utility/localfiniteelement.hh	2012-04-22 19:27:43 UTC (rev 1051)
> @@ -54,6 +54,7 @@
>         GenericGeometry::IfTopology<  FiniteElement::template Maker, dimDomain>::apply( topologyId_, key_, finiteElement_ );
>       }
>
> +    /** \todo Please doc me */
>       GenericLocalFiniteElement ( const GenericLocalFiniteElement&other )
>       : topologyId_( other.topologyId_ ),
>         key_( other.key_ ),
> @@ -167,9 +168,15 @@
>
>       /** \todo Please doc me !
>        */
> -    DGLocalFiniteElement ( unsigned int topologyId, const typename Base::Key&key  )
> +    DGLocalFiniteElement ( unsigned int topologyId, const typename Base::Key&key  ) DUNE_DEPRECATED
>       : Base( topologyId, key )
>       {}
> +
> +    /** \todo Please doc me !
> +     */
> +    DGLocalFiniteElement ( const GeometryType&gt, const typename Base::Key&key  )
> +    : Base( gt, key )
> +    {}
>     };
>     /**
>      * @brief Takes the basis factory from a given
> @@ -192,9 +199,15 @@
>
>       /** \todo Please doc me !
>        */
> -    L2LocalFiniteElement ( unsigned int topologyId, const typename Base::Key&key  )
> +    L2LocalFiniteElement ( unsigned int topologyId, const typename Base::Key&key  ) DUNE_DEPRECATED
>       : Base( topologyId, key )
>       {}
> +
> +    /** \todo Please doc me !
> +     */
> +    L2LocalFiniteElement ( const GeometryType&gt, const typename Base::Key&key  )
> +    : Base( gt, key )
> +    {}
>     };
>   }
>
>
>
> _______________________________________________
> 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