[Dune] [Dune-Commit] dune-localfunctions r828 - in trunk/dune/localfunctions: common lagrange test

Carsten Gräser graeser at math.fu-berlin.de
Fri Feb 12 13:08:40 CET 2010


Am 10.02.2010 16:23, schrieb mdroh_01 at dune-project.org:
> Author: mdroh_01
> Date: 2010-02-10 16:23:07 +0100 (Wed, 10 Feb 2010)
> New Revision: 828
> 
> Modified:
>    trunk/dune/localfunctions/common/virtualinterface.hh
>    trunk/dune/localfunctions/lagrange/interpolation.hh
>    trunk/dune/localfunctions/test/lagrangeshapefunctiontest.cc
> Log:
> make compile with icc 10.1
> 
> Attention: I think, that because of this patch the virtual interface is not
> complete when compiled with the intel compiler.
Hi,
this would indeed be very ugly. By specifying the base interface with
appropiate order in the template interpolate method we could avoid
the 'using' statement (see attached patch). However, then you can only use

  basis.template evaluate<order>(d,x,y);

and not (at least with gcc-4.4)

  basis.evaluate(d,x,y);

Perhaps we can explicitly specialize the interface template for
e.g. order 0,...,5.

Regards

Carsten

> 
> Modified: trunk/dune/localfunctions/common/virtualinterface.hh
> ===================================================================
> --- trunk/dune/localfunctions/common/virtualinterface.hh	2010-02-10 13:54:07 UTC (rev 827)
> +++ trunk/dune/localfunctions/common/virtualinterface.hh	2010-02-10 15:23:07 UTC (rev 828)
> @@ -211,7 +211,11 @@
>      using BaseInterface::order;
>      using BaseInterface::evaluateFunction;
>      using BaseInterface::evaluateJacobian;;
> +    /* Unfortunately, the intel compiler cannot use the different evaluate
> +     * methods with varying argument lists. :-( */
> +#ifndef __INTEL_COMPILER
>      using BaseInterface::evaluate;
> +#endif
>    };
>  
>  
> 
> Modified: trunk/dune/localfunctions/lagrange/interpolation.hh
> ===================================================================
> --- trunk/dune/localfunctions/lagrange/interpolation.hh	2010-02-10 13:54:07 UTC (rev 827)
> +++ trunk/dune/localfunctions/lagrange/interpolation.hh	2010-02-10 15:23:07 UTC (rev 828)
> @@ -90,6 +90,8 @@
>      typedef typename LagrangePointSetFactory::Key Key;
>      typedef const LocalLagrangeInterpolation< LP,dim,F > Object;
>      typedef LagrangeInterpolationFactory<LP,dim,F> Factory;
> +
> +    static const unsigned int dimension = dim;
>    };
>  
>    template< template <class,unsigned int> class LP,
> 
> Modified: trunk/dune/localfunctions/test/lagrangeshapefunctiontest.cc
> ===================================================================
> --- trunk/dune/localfunctions/test/lagrangeshapefunctiontest.cc	2010-02-10 13:54:07 UTC (rev 827)
> +++ trunk/dune/localfunctions/test/lagrangeshapefunctiontest.cc	2010-02-10 15:23:07 UTC (rev 828)
> @@ -134,7 +134,9 @@
>  
>  int main (int argc, char *argv[]) try
>  {
> +#if (!defined __INTEL_COMPILER || __INTEL_COMPILER >= 1010)
>      feenableexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
> +#endif
>  
>      P1LocalFiniteElement<double,double,1> p11d;
>      testPk(p11d);
> 
> 
> _______________________________________________
> Dune-Commit mailing list
> Dune-Commit at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-commit


-- 
----------------------------------------------------------------------
Carsten Gräser           | phone: +49-30 / 838-75349
Freie Universität Berlin | fax  : +49-30 / 838-54977
Institut für Mathematik  | email: graeser at math.fu-berlin.de
Arnimallee 6             |
14195 Berlin, Germany    | URL  : http://page.mi.fu-berlin.de/graeser
----------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: virtualinterface.hh.patch
Type: text/x-patch
Size: 1231 bytes
Desc: not available
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20100212/559ec06b/attachment.bin>


More information about the Dune mailing list