]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Moved Sacado product type header and moved Sacado tests 4815/head
authorJean-Paul Pelteret <jppelteret@gmail.com>
Sun, 13 Aug 2017 18:07:07 +0000 (12:07 -0600)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Sun, 13 Aug 2017 19:15:16 +0000 (13:15 -0600)
24 files changed:
include/deal.II/base/sacado_product_type.h
include/deal.II/differentiation/sacado_product_types.h [new file with mode: 0644]
source/base/symmetric_tensor.cc
source/fe/fe_values.cc
tests/fe/fe_values_view_get_function_from_local_dof_values_02.cc
tests/sacado/CMakeLists.txt [new file with mode: 0644]
tests/sacado/sacado_product_type_01.cc [moved from tests/base/sacado_product_type_01.cc with 97% similarity]
tests/sacado/sacado_product_type_01.output [moved from tests/base/sacado_product_type_01.with_trilinos=on.output with 100% similarity]
tests/sacado/sacado_product_type_02.cc [moved from tests/base/sacado_product_type_02.cc with 98% similarity]
tests/sacado/sacado_product_type_02.output [moved from tests/base/sacado_product_type_02.with_trilinos=on.output with 100% similarity]
tests/sacado/sacado_product_type_03.cc [moved from tests/base/sacado_product_type_03.cc with 96% similarity]
tests/sacado/sacado_product_type_03.output [moved from tests/base/sacado_product_type_03.with_trilinos=on.output with 100% similarity]
tests/sacado/sacado_product_type_04.cc [moved from tests/base/sacado_product_type_04.cc with 96% similarity]
tests/sacado/sacado_product_type_04.output [moved from tests/base/sacado_product_type_04.with_trilinos=on.output with 100% similarity]
tests/sacado/sacado_product_type_05.cc [moved from tests/base/sacado_product_type_05.cc with 96% similarity]
tests/sacado/sacado_product_type_05.output [moved from tests/base/sacado_product_type_05.with_trilinos=on.output with 100% similarity]
tests/sacado/sacado_product_type_06.cc [moved from tests/base/sacado_product_type_06.cc with 95% similarity]
tests/sacado/sacado_product_type_06.output [moved from tests/base/sacado_product_type_06.with_trilinos=on.output with 100% similarity]
tests/sacado/sacado_product_type_07.cc [moved from tests/base/sacado_product_type_07.cc with 95% similarity]
tests/sacado/sacado_product_type_07.output [moved from tests/base/sacado_product_type_07.with_trilinos=on.output with 100% similarity]
tests/sacado/sacado_product_type_08.cc [moved from tests/base/sacado_product_type_08.cc with 95% similarity]
tests/sacado/sacado_product_type_08.output [moved from tests/base/sacado_product_type_08.with_trilinos=on.output with 100% similarity]
tests/sacado/sacado_product_type_09.cc [moved from tests/base/sacado_product_type_09.cc with 95% similarity]
tests/sacado/sacado_product_type_09.output [moved from tests/base/sacado_product_type_09.with_trilinos=on.output with 100% similarity]

index f2e3a63b017d926c0c4a72981c71857ad3e75cf5..c6353daa1bb30f40386fe7dfa4d5465d3aef510d 100644 (file)
@@ -1,169 +1,7 @@
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 2015 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.
-//
-// ---------------------------------------------------------------------
+#ifndef dealii__sacado_product_type_h_deprecated
+#define dealii__sacado_product_type_h_deprecated
+#warning This file is deprecated. Use <deal.II/differentiation/sacado_product_types.h> instead.
 
-#ifndef dealii__sacado_product_type_h
-#define dealii__sacado_product_type_h
-
-#include <deal.II/base/config.h>
-#include <deal.II/base/tensor.h>
-#include <deal.II/base/symmetric_tensor.h>
-#include <deal.II/base/template_constraints.h>
-
-#ifdef DEAL_II_WITH_TRILINOS
-
-DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
-#  include <Sacado.hpp>
-DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
-
-DEAL_II_NAMESPACE_OPEN
-
-template <typename T>
-struct ProductType<Sacado::Fad::DFad<T>, float>
-{
-  typedef Sacado::Fad::DFad<T> type;
-};
-
-template <typename T>
-struct ProductType<float, Sacado::Fad::DFad<T> >
-{
-  typedef Sacado::Fad::DFad<T> type;
-};
-
-template <typename T>
-struct ProductType<Sacado::Fad::DFad<T>, double>
-{
-  typedef Sacado::Fad::DFad<T> type;
-};
-
-template <typename T>
-struct ProductType<double, Sacado::Fad::DFad<T> >
-{
-  typedef Sacado::Fad::DFad<T> type;
-};
-
-template <typename T>
-struct ProductType<Sacado::Fad::DFad<T>, int>
-{
-  typedef Sacado::Fad::DFad<T> type;
-};
-
-template <typename T>
-struct ProductType<int, Sacado::Fad::DFad<T> >
-{
-  typedef Sacado::Fad::DFad<T> type;
-};
-
-template <typename T, typename U>
-struct ProductType<Sacado::Fad::DFad<T>, Sacado::Fad::DFad<U> >
-{
-  typedef Sacado::Fad::DFad<typename ProductType<T,U>::type > type;
-};
-
-template <typename T>
-struct EnableIfScalar<Sacado::Fad::DFad<T> >
-{
-  typedef Sacado::Fad::DFad<T> type;
-};
-
-
-
-/**
- * Compute the scalar product $a:b=\sum_{i,j} a_{ij}b_{ij}$ between two
- * tensors $a,b$ of rank 2. We don't use <code>operator*</code> for this
- * operation since the product between two tensors is usually assumed to be
- * the contraction over the last index of the first tensor and the first index
- * of the second tensor, for example $(a\cdot b)_{ij}=\sum_k a_{ik}b_{kj}$.
- *
- * @relates Tensor @relates SymmetricTensor
- */
-template <int dim, typename Number, typename T>
-inline
-Sacado::Fad::DFad<T>
-scalar_product (const SymmetricTensor<2,dim,Sacado::Fad::DFad<T> > &t1,
-                const Tensor<2,dim,Number> &t2)
-{
-  Sacado::Fad::DFad<T> s = 0;
-  for (unsigned int i=0; i<dim; ++i)
-    for (unsigned int j=0; j<dim; ++j)
-      s += t1[i][j] * t2[i][j];
-  return s;
-}
-
-
-/**
- * Compute the scalar product $a:b=\sum_{i,j} a_{ij}b_{ij}$ between two
- * tensors $a,b$ of rank 2. We don't use <code>operator*</code> for this
- * operation since the product between two tensors is usually assumed to be
- * the contraction over the last index of the first tensor and the first index
- * of the second tensor, for example $(a\cdot b)_{ij}=\sum_k a_{ik}b_{kj}$.
- *
- * @relates Tensor @relates SymmetricTensor
- */
-template <int dim, typename Number, typename T >
-inline
-Sacado::Fad::DFad<T>
-scalar_product (const Tensor<2,dim,Number> &t1,
-                const SymmetricTensor<2,dim,Sacado::Fad::DFad<T> > &t2)
-{
-  return scalar_product(t2, t1);
-}
-
-
-/**
- * Compute the scalar product $a:b=\sum_{i,j} a_{ij}b_{ij}$ between two
- * tensors $a,b$ of rank 2. We don't use <code>operator*</code> for this
- * operation since the product between two tensors is usually assumed to be
- * the contraction over the last index of the first tensor and the first index
- * of the second tensor, for example $(a\cdot b)_{ij}=\sum_k a_{ik}b_{kj}$.
- *
- * @relates Tensor @relates SymmetricTensor
- */
-template <int dim, typename Number, typename T>
-inline
-Sacado::Fad::DFad<T>
-scalar_product (const SymmetricTensor<2,dim,Number> &t1,
-                const Tensor<2,dim,Sacado::Fad::DFad<T> > &t2)
-{
-  Sacado::Fad::DFad<T> s = 0;
-  for (unsigned int i=0; i<dim; ++i)
-    for (unsigned int j=0; j<dim; ++j)
-      s += t1[i][j] * t2[i][j];
-  return s;
-}
-
-
-/**
- * Compute the scalar product $a:b=\sum_{i,j} a_{ij}b_{ij}$ between two
- * tensors $a,b$ of rank 2. We don't use <code>operator*</code> for this
- * operation since the product between two tensors is usually assumed to be
- * the contraction over the last index of the first tensor and the first index
- * of the second tensor, for example $(a\cdot b)_{ij}=\sum_k a_{ik}b_{kj}$.
- *
- * @relates Tensor @relates SymmetricTensor
- */
-template <int dim, typename Number, typename T >
-inline
-Sacado::Fad::DFad<T>
-scalar_product (const Tensor<2,dim,Sacado::Fad::DFad<T> > &t1,
-                const SymmetricTensor<2,dim,Number> &t2)
-{
-  return scalar_product(t2, t1);
-}
-
-DEAL_II_NAMESPACE_CLOSE
-
-#endif // DEAL_II_WITH_TRILINOS
+#  include <deal.II/differentiation/sacado_product_types.h>
 
 #endif
diff --git a/include/deal.II/differentiation/sacado_product_types.h b/include/deal.II/differentiation/sacado_product_types.h
new file mode 100644 (file)
index 0000000..03cf892
--- /dev/null
@@ -0,0 +1,169 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2015 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.
+//
+// ---------------------------------------------------------------------
+
+#ifndef dealii__differentiation__sacado_product_types_h
+#define dealii__differentiation__sacado_product_types_h
+
+#include <deal.II/base/config.h>
+#include <deal.II/base/tensor.h>
+#include <deal.II/base/symmetric_tensor.h>
+#include <deal.II/base/template_constraints.h>
+
+#ifdef DEAL_II_WITH_TRILINOS
+
+DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
+#  include <Sacado.hpp>
+DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
+
+DEAL_II_NAMESPACE_OPEN
+
+template <typename T>
+struct ProductType<Sacado::Fad::DFad<T>, float>
+{
+  typedef Sacado::Fad::DFad<T> type;
+};
+
+template <typename T>
+struct ProductType<float, Sacado::Fad::DFad<T> >
+{
+  typedef Sacado::Fad::DFad<T> type;
+};
+
+template <typename T>
+struct ProductType<Sacado::Fad::DFad<T>, double>
+{
+  typedef Sacado::Fad::DFad<T> type;
+};
+
+template <typename T>
+struct ProductType<double, Sacado::Fad::DFad<T> >
+{
+  typedef Sacado::Fad::DFad<T> type;
+};
+
+template <typename T>
+struct ProductType<Sacado::Fad::DFad<T>, int>
+{
+  typedef Sacado::Fad::DFad<T> type;
+};
+
+template <typename T>
+struct ProductType<int, Sacado::Fad::DFad<T> >
+{
+  typedef Sacado::Fad::DFad<T> type;
+};
+
+template <typename T, typename U>
+struct ProductType<Sacado::Fad::DFad<T>, Sacado::Fad::DFad<U> >
+{
+  typedef Sacado::Fad::DFad<typename ProductType<T,U>::type > type;
+};
+
+template <typename T>
+struct EnableIfScalar<Sacado::Fad::DFad<T> >
+{
+  typedef Sacado::Fad::DFad<T> type;
+};
+
+
+
+/**
+ * Compute the scalar product $a:b=\sum_{i,j} a_{ij}b_{ij}$ between two
+ * tensors $a,b$ of rank 2. We don't use <code>operator*</code> for this
+ * operation since the product between two tensors is usually assumed to be
+ * the contraction over the last index of the first tensor and the first index
+ * of the second tensor, for example $(a\cdot b)_{ij}=\sum_k a_{ik}b_{kj}$.
+ *
+ * @relates Tensor @relates SymmetricTensor
+ */
+template <int dim, typename Number, typename T>
+inline
+Sacado::Fad::DFad<T>
+scalar_product (const SymmetricTensor<2,dim,Sacado::Fad::DFad<T> > &t1,
+                const Tensor<2,dim,Number> &t2)
+{
+  Sacado::Fad::DFad<T> s = 0;
+  for (unsigned int i=0; i<dim; ++i)
+    for (unsigned int j=0; j<dim; ++j)
+      s += t1[i][j] * t2[i][j];
+  return s;
+}
+
+
+/**
+ * Compute the scalar product $a:b=\sum_{i,j} a_{ij}b_{ij}$ between two
+ * tensors $a,b$ of rank 2. We don't use <code>operator*</code> for this
+ * operation since the product between two tensors is usually assumed to be
+ * the contraction over the last index of the first tensor and the first index
+ * of the second tensor, for example $(a\cdot b)_{ij}=\sum_k a_{ik}b_{kj}$.
+ *
+ * @relates Tensor @relates SymmetricTensor
+ */
+template <int dim, typename Number, typename T >
+inline
+Sacado::Fad::DFad<T>
+scalar_product (const Tensor<2,dim,Number> &t1,
+                const SymmetricTensor<2,dim,Sacado::Fad::DFad<T> > &t2)
+{
+  return scalar_product(t2, t1);
+}
+
+
+/**
+ * Compute the scalar product $a:b=\sum_{i,j} a_{ij}b_{ij}$ between two
+ * tensors $a,b$ of rank 2. We don't use <code>operator*</code> for this
+ * operation since the product between two tensors is usually assumed to be
+ * the contraction over the last index of the first tensor and the first index
+ * of the second tensor, for example $(a\cdot b)_{ij}=\sum_k a_{ik}b_{kj}$.
+ *
+ * @relates Tensor @relates SymmetricTensor
+ */
+template <int dim, typename Number, typename T>
+inline
+Sacado::Fad::DFad<T>
+scalar_product (const SymmetricTensor<2,dim,Number> &t1,
+                const Tensor<2,dim,Sacado::Fad::DFad<T> > &t2)
+{
+  Sacado::Fad::DFad<T> s = 0;
+  for (unsigned int i=0; i<dim; ++i)
+    for (unsigned int j=0; j<dim; ++j)
+      s += t1[i][j] * t2[i][j];
+  return s;
+}
+
+
+/**
+ * Compute the scalar product $a:b=\sum_{i,j} a_{ij}b_{ij}$ between two
+ * tensors $a,b$ of rank 2. We don't use <code>operator*</code> for this
+ * operation since the product between two tensors is usually assumed to be
+ * the contraction over the last index of the first tensor and the first index
+ * of the second tensor, for example $(a\cdot b)_{ij}=\sum_k a_{ik}b_{kj}$.
+ *
+ * @relates Tensor @relates SymmetricTensor
+ */
+template <int dim, typename Number, typename T >
+inline
+Sacado::Fad::DFad<T>
+scalar_product (const Tensor<2,dim,Sacado::Fad::DFad<T> > &t1,
+                const SymmetricTensor<2,dim,Number> &t2)
+{
+  return scalar_product(t2, t1);
+}
+
+DEAL_II_NAMESPACE_CLOSE
+
+#endif // DEAL_II_WITH_TRILINOS
+
+#endif
index ac21457526d9c60fd112e929efb5e1ca41801784..787b0373219957a9b5c1e179264800c7c20d1f90 100644 (file)
@@ -22,7 +22,7 @@ DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
 #  include <Sacado.hpp>
 DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
 
-#include <deal.II/base/sacado_product_type.h>
+#include <deal.II/differentiation/sacado_product_types.h>
 #endif
 
 #include <deal.II/base/symmetric_tensor.h>
index aa1cddfa30b0e848213048bc48b999a9d3b9d9b3..dc3329a95d796ff8a1f02af4bf5a78069bc40621 100644 (file)
@@ -39,7 +39,7 @@
 #include <iomanip>
 #include <memory>
 
-#include <deal.II/base/sacado_product_type.h>
+#include <deal.II/differentiation/sacado_product_types.h>
 
 DEAL_II_NAMESPACE_OPEN
 
index fc268cfe7d9e333959073a7bfdf83809e74e0649..9ec99e04a87e430a43cec796d08f1e3c56d21c22 100644 (file)
@@ -25,7 +25,7 @@
 #include "../tests.h"
 
 #include <deal.II/base/quadrature_lib.h>
-#include <deal.II/base/sacado_product_type.h>
+#include <deal.II/differentiation/sacado_product_types.h>
 #include <deal.II/dofs/dof_handler.h>
 #include <deal.II/dofs/dof_renumbering.h>
 #include <deal.II/grid/grid_generator.h>
diff --git a/tests/sacado/CMakeLists.txt b/tests/sacado/CMakeLists.txt
new file mode 100644 (file)
index 0000000..d2d115e
--- /dev/null
@@ -0,0 +1,6 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
+INCLUDE(../setup_testsubproject.cmake)
+PROJECT(testsuite CXX)
+IF(DEAL_II_WITH_TRILINOS)
+  DEAL_II_PICKUP_TESTS()
+ENDIF()
similarity index 97%
rename from tests/base/sacado_product_type_01.cc
rename to tests/sacado/sacado_product_type_01.cc
index a56e2da7d83b128d3eeec69cbc61d91d393c0815..da039d9e8817b3015ee7ca77066d2d7134dd6897 100644 (file)
@@ -19,7 +19,7 @@
 #include <typeinfo>
 
 #include <deal.II/base/tensor.h>
-#include <deal.II/base/sacado_product_type.h>
+#include <deal.II/differentiation/sacado_product_types.h>
 
 #include "../tests.h"
 
similarity index 98%
rename from tests/base/sacado_product_type_02.cc
rename to tests/sacado/sacado_product_type_02.cc
index fda3f6b613bd7d55ae3600163591c64f305bb8fc..11133bf73c14087d62dc6d14c01ca8fc651eed5c 100644 (file)
@@ -19,7 +19,7 @@
 #include <typeinfo>
 
 #include <deal.II/base/tensor.h>
-#include <deal.II/base/sacado_product_type.h>
+#include <deal.II/differentiation/sacado_product_types.h>
 
 #include "../tests.h"
 
similarity index 96%
rename from tests/base/sacado_product_type_03.cc
rename to tests/sacado/sacado_product_type_03.cc
index 2481b819d47e3bf6358a347d524caee33a4f897d..024831bf90274a17cffc018b862da6feaf244ce1 100644 (file)
@@ -19,7 +19,7 @@
 #include <typeinfo>
 
 #include <deal.II/base/tensor.h>
-#include <deal.II/base/sacado_product_type.h>
+#include <deal.II/differentiation/sacado_product_types.h>
 
 #include "../tests.h"
 
similarity index 96%
rename from tests/base/sacado_product_type_04.cc
rename to tests/sacado/sacado_product_type_04.cc
index 93ee01b66b3afd0f3326c9416d7bd43c509de624..52400174f56f6b9a7d70d6c8fab0eeb26efd31d9 100644 (file)
@@ -19,7 +19,7 @@
 #include <typeinfo>
 
 #include <deal.II/base/tensor.h>
-#include <deal.II/base/sacado_product_type.h>
+#include <deal.II/differentiation/sacado_product_types.h>
 
 #include "../tests.h"
 
similarity index 96%
rename from tests/base/sacado_product_type_05.cc
rename to tests/sacado/sacado_product_type_05.cc
index c85863d0a9a398833d13ed426ceda7b7242565a9..610c4342b1a38b63113d26bdd2b95c931bcf36c0 100644 (file)
@@ -19,7 +19,7 @@
 #include <typeinfo>
 
 #include <deal.II/base/tensor.h>
-#include <deal.II/base/sacado_product_type.h>
+#include <deal.II/differentiation/sacado_product_types.h>
 
 #include "../tests.h"
 
similarity index 95%
rename from tests/base/sacado_product_type_06.cc
rename to tests/sacado/sacado_product_type_06.cc
index 75c2db17b0fa8464603fdb691034fe99af7ed7db..655521fa25119952064dda531f67a6b0eefc2199 100644 (file)
@@ -18,7 +18,7 @@
 
 
 #include <deal.II/base/symmetric_tensor.h>
-#include <deal.II/base/sacado_product_type.h>
+#include <deal.II/differentiation/sacado_product_types.h>
 
 #include "../tests.h"
 
similarity index 95%
rename from tests/base/sacado_product_type_07.cc
rename to tests/sacado/sacado_product_type_07.cc
index 61bdea09ba76eef239fd8b1395117d1a82e4dd68..a4d05357b352bd8a64126ba0ee28339b41fe3208 100644 (file)
@@ -18,7 +18,7 @@
 
 
 #include <deal.II/base/symmetric_tensor.h>
-#include <deal.II/base/sacado_product_type.h>
+#include <deal.II/differentiation/sacado_product_types.h>
 
 #include "../tests.h"
 
similarity index 95%
rename from tests/base/sacado_product_type_08.cc
rename to tests/sacado/sacado_product_type_08.cc
index 3ae15815fdba24892760aefa36b2509efabb0dee..886464c7435a7ce342d46cf5482106b1edebcc9b 100644 (file)
@@ -18,7 +18,7 @@
 
 
 #include <deal.II/base/symmetric_tensor.h>
-#include <deal.II/base/sacado_product_type.h>
+#include <deal.II/differentiation/sacado_product_types.h>
 
 #include "../tests.h"
 
similarity index 95%
rename from tests/base/sacado_product_type_09.cc
rename to tests/sacado/sacado_product_type_09.cc
index 65fa7878dd95c4567c3a783fed6e9ccb541732ee..caa41c86309e9f7a669e35b2aab9695c3cea562e 100644 (file)
@@ -18,7 +18,7 @@
 
 
 #include <deal.II/base/symmetric_tensor.h>
-#include <deal.II/base/sacado_product_type.h>
+#include <deal.II/differentiation/sacado_product_types.h>
 
 #include "../tests.h"
 

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.