]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Take over patch 21420 from mainline.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 30 Jun 2010 20:41:53 +0000 (20:41 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 30 Jun 2010 20:41:53 +0000 (20:41 +0000)
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
deal.II/doc/news/changes.h

index e0d00fe664678eedadc85f6e597952cefc83edd3..41a8dc7a5f78072e3158ddd292414dc3cefaa2d5 100644 (file)
@@ -54,6 +54,58 @@ template <typename Number> class Vector;
 template <typename Number> class BlockVector;
 
 
+namespace internal
+{
+                                  /**
+                                   * A class whose specialization is
+                                   * used to define what type the
+                                   * curl of a vector valued function
+                                   * corresponds to.
+                                   */
+  template <int dim>
+  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
                                        * <code>spacedim=3</code> it is a
                                        * <code>Tensor@<1, dim@></code>.
                                        */
-      typedef Tensor<1, (spacedim == 3)? 3 : 1>     curl_type;
+      typedef typename internal::CurlType<spacedim>::type   curl_type;
 
                                       /**
                                        * A typedef for the type of second
index 44c2cdd3e0cfa5c67926f7eb495dbdea33605b8f..c1ef366600fb16216e65d2a5487f8023249b89ee 100644 (file)
@@ -38,6 +38,16 @@ inconvenience this causes.
 <h3>General</h3>
 
 <ol>
+  <li>
+  <p>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 <code>fe_values.cc</code> 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.
+  <br>
+  (WB 2010/06/30)
+  </p>  
+
   <li>
   <p>Fixed: Configuring with an external BOOST version did not work when
   using shared libraries since the test ran in the wrong order with respect

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.