]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Ensure that FEValuesExtractors objects are copyable.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 17 Dec 2008 11:47:09 +0000 (11:47 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 17 Dec 2008 11:47:09 +0000 (11:47 +0000)
git-svn-id: https://svn.dealii.org/trunk@17968 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/fe_values.h
deal.II/doc/news/changes.h
tests/deal.II/Makefile
tests/deal.II/fe_values_extractor_01.cc [new file with mode: 0644]
tests/deal.II/fe_values_extractor_01/cmp/generic [new file with mode: 0644]

index 61b36bce72cf963ebb7cb32370663805ccfe7d57..b6584a454c04f331b8e74f1d3d424b913d7aea06 100644 (file)
@@ -81,7 +81,7 @@ namespace FEValuesExtractors
                                        * The selected scalar component of the
                                        * vector.
                                        */
-      const unsigned int component;
+      unsigned int component;
 
                                       /**
                                        * Constructor. Take the selected
@@ -110,9 +110,10 @@ namespace FEValuesExtractors
   struct Vector
   {
                                       /**
-                                       * The first component of the vector view.
+                                       * The first component of the vector
+                                       * view.
                                        */
-      const unsigned int first_vector_component;
+      unsigned int first_vector_component;
 
                                       /**
                                        * Constructor. Take the first
index b38b0b17e8540b02ba9292dc61337196aa416a24..4c3b5b0380302441dd874510f7c1f0d46307f1ff 100644 (file)
@@ -598,6 +598,14 @@ inconvenience this causes.
 <h3>deal.II</h3>
 
 <ol>
+  <li>
+  <p>
+  Fixed: The FEValuesExtractors classes were not copyable though there
+  are legitimate reasons to do so. This is now fixed.
+  <br>
+  (WB 2008/12/17)
+  </p>
+
   <li>
   <p>
   Fixed: The MappingQEulerian function was not thread-safe. This is now fixed.
index cb009839c5cc7134576fa5d5cac196586cc53e78..b5d03e19d52a878a7649e57268c922719339483d 100644 (file)
@@ -77,6 +77,7 @@ tests_x = block_matrices \
        line_coarsening_3d \
        no_flux_* \
        fe_values_view_* \
+       fe_values_extractor_* \
        rt_hessian \
        rt_covariant \
        coarsening_* \
diff --git a/tests/deal.II/fe_values_extractor_01.cc b/tests/deal.II/fe_values_extractor_01.cc
new file mode 100644 (file)
index 0000000..a6f9e40
--- /dev/null
@@ -0,0 +1,45 @@
+//----------------------------------------------------------------------
+//    $Id$
+//    Version: $Name$ 
+//
+//    Copyright (C) 2007, 2008 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//----------------------------------------------------------------------
+
+
+// test that the FEValuesExtractors are copyable
+
+#include "../tests.h"
+#include <fe/fe_values.h>
+
+#include <fstream>
+
+
+
+
+int main()
+{
+  std::ofstream logfile ("fe_values_extractor_01/output");
+  deallog << std::setprecision (2);
+
+  deallog.attach(logfile);
+  deallog.depth_console (0);
+  deallog.threshold_double(1.e-10);
+
+  {
+    std::vector<FEValuesExtractors::Scalar> x;
+    x.push_back (FEValuesExtractors::Scalar(42));
+  }
+
+  {
+    std::vector<FEValuesExtractors::Vector> x;
+    x.push_back (FEValuesExtractors::Vector(42));
+  }
+
+  deallog << "OK" << std::endl;
+}
diff --git a/tests/deal.II/fe_values_extractor_01/cmp/generic b/tests/deal.II/fe_values_extractor_01/cmp/generic
new file mode 100644 (file)
index 0000000..0fd8fc1
--- /dev/null
@@ -0,0 +1,2 @@
+
+DEAL::OK

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.