]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Explicitly instantiate Tensor<...> and its members.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 3 Jun 2016 21:48:16 +0000 (16:48 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 5 Jun 2016 01:57:54 +0000 (20:57 -0500)
doc/news/changes.h
source/base/CMakeLists.txt
source/base/tensor.cc [new file with mode: 0644]
source/base/tensor.inst.in [new file with mode: 0644]

index 350a1001ad6a34d3e46c2a83599161908114c2ab..d4d02ab2121b03008b14310e0f6497dfce00abcc 100644 (file)
@@ -269,6 +269,15 @@ inconvenience this causes.
 
 <ol>
 
+ <li> Fixed: The Tensor class was not explicitly instantiated. This did
+ not matter in almost all contexts because its members are all defined
+ as @p inline in the header file. The only cases where it matters if one
+ (or the compiler) were to take the address of one of the static member
+ variables.
+ <br>
+ (Wolfgang Bangerth, 2016/06/03)
+ </li>
+
  <li> New: Return value std::vector<unsigned int> vertex_mapping for the
  DoFTools::make_vertex_patches() function, including the optional inversion
  of the vertex mapping.
index 9df7b72fb6ba7da9e1f6e09dd3f15a74e758abc2..2f13d89d0ced5cd4e5ca94d9cdcad39fe9fc9d24 100644 (file)
@@ -1,6 +1,6 @@
 ## ---------------------------------------------------------------------
 ##
-## Copyright (C) 2012 - 2015 by the deal.II authors
+## Copyright (C) 2012 - 2016 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -66,6 +66,7 @@ SET(_src
   tensor_product_polynomials_bubbles.cc
   tensor_product_polynomials_const.cc
   thread_management.cc
+  tensor.cc
   timer.cc
   time_stepping.cc
   utilities.cc
@@ -77,6 +78,7 @@ SET(_inst
   function_time.inst.in
   mpi.inst.in
   polynomials_rannacher_turek.inst.in
+  tensor.inst.in
   tensor_function.inst.in
   time_stepping.inst.in
   )
diff --git a/source/base/tensor.cc b/source/base/tensor.cc
new file mode 100644 (file)
index 0000000..d38444b
--- /dev/null
@@ -0,0 +1,24 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2016 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+#include <deal.II/base/tensor.h>
+
+DEAL_II_NAMESPACE_OPEN
+
+
+#include "tensor.inst"
+
+
+DEAL_II_NAMESPACE_CLOSE
diff --git a/source/base/tensor.inst.in b/source/base/tensor.inst.in
new file mode 100644 (file)
index 0000000..9860554
--- /dev/null
@@ -0,0 +1,42 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2016 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+for (rank : RANKS; deal_II_dimension : DIMENSIONS; number : REAL_SCALARS)
+{
+  template
+  class Tensor<rank,deal_II_dimension,number>;
+}
+
+
+for (deal_II_dimension : DIMENSIONS; number : REAL_SCALARS)
+{
+  template
+  class Tensor<0,deal_II_dimension,number>;
+}
+
+
+for (rank : RANKS; deal_II_dimension : DIMENSIONS; number : COMPLEX_SCALARS)
+{
+  template
+  class Tensor<rank,deal_II_dimension,number>;
+}
+
+
+for (deal_II_dimension : DIMENSIONS; number : COMPLEX_SCALARS)
+{
+  template
+  class Tensor<0,deal_II_dimension,number>;
+}

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.