From ff4ba46607561c3993b1d679bb26f9db99565ebe Mon Sep 17 00:00:00 2001 From: bangerth Date: Wed, 30 Jun 2010 20:41:53 +0000 Subject: [PATCH] Take over patch 21420 from mainline. git-svn-id: https://svn.dealii.org/branches/releases/Branch-6-3@21421 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/fe/fe_values.h | 54 +++++++++++++++++++++++++- deal.II/doc/news/changes.h | 10 +++++ 2 files changed, 63 insertions(+), 1 deletion(-) diff --git a/deal.II/deal.II/include/fe/fe_values.h b/deal.II/deal.II/include/fe/fe_values.h index e0d00fe664..41a8dc7a5f 100644 --- a/deal.II/deal.II/include/fe/fe_values.h +++ b/deal.II/deal.II/include/fe/fe_values.h @@ -54,6 +54,58 @@ template class Vector; template class BlockVector; +namespace internal +{ + /** + * A class whose specialization is + * used to define what type the + * curl of a vector valued function + * corresponds to. + */ + template + struct CurlType; + + /** + * A class whose specialization is + * used to define what type the + * curl of a vector valued function + * corresponds to. + * + * In 1d, the curl is a scalar. + */ + template <> + struct CurlType<1>{ + typedef Tensor<1,1> type; + }; + + /** + * A class whose specialization is + * used to define what type the + * curl of a vector valued function + * corresponds to. + * + * In 2d, the curl is a scalar. + */ + template <> + struct CurlType<2>{ + typedef Tensor<1,1> type; + }; + + /** + * A class whose specialization is + * used to define what type the + * curl of a vector valued function + * corresponds to. + * + * In 3d, the curl is a vector. + */ + template <> + struct CurlType<3>{ + typedef Tensor<1,3> type; + }; +} + + /** * A namespace in which we declare "extractors", i.e. classes that when used * as subscripts in operator[] expressions on FEValues, FEFaceValues, and @@ -510,7 +562,7 @@ namespace FEValuesViews * spacedim=3 it is a * Tensor@<1, dim@>. */ - typedef Tensor<1, (spacedim == 3)? 3 : 1> curl_type; + typedef typename internal::CurlType::type curl_type; /** * A typedef for the type of second diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 44c2cdd3e0..c1ef366600 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -38,6 +38,16 @@ inconvenience this causes.

General

    +
  1. +

    Fixed: GCC version 4.0.1 had a bug that prevented it from compiling + release 6.3.0 because it apparently had an infinite loop allocating + memory when compiling fe_values.cc in optimized mode. This + had been fixed in GCC 4.0.2, but some versions of Mac OS X still use + this GCC version in their Xcode environment. +
    + (WB 2010/06/30) +

    +
  2. Fixed: Configuring with an external BOOST version did not work when using shared libraries since the test ran in the wrong order with respect -- 2.39.5