]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add a test for complex support in Function, TensorFunction
authorMatthias Maier <tamiko@43-1.org>
Thu, 27 Aug 2015 03:52:25 +0000 (22:52 -0500)
committerMatthias Maier <tamiko@43-1.org>
Thu, 27 Aug 2015 04:08:29 +0000 (23:08 -0500)
tests/base/functions_13.cc [new file with mode: 0644]
tests/base/functions_13.output [new file with mode: 0644]

diff --git a/tests/base/functions_13.cc b/tests/base/functions_13.cc
new file mode 100644 (file)
index 0000000..4cad108
--- /dev/null
@@ -0,0 +1,55 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2007 - 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.
+//
+// ---------------------------------------------------------------------
+
+
+// Check for suport of std::complex<double> as Number template argument
+
+#include "../tests.h"
+#include <deal.II/base/function.h>
+#include <deal.II/base/tensor_function.h>
+
+#include <complex>
+
+using namespace dealii;
+
+template <typename Number>
+class MyFunctionTime : dealii::FunctionTime<Number>
+{
+};
+
+template <int dim, typename Number>
+class MyFunction : dealii::Function<dim, Number>
+{
+};
+
+template <int rank, int dim, typename Number>
+class MyTensorFunction : dealii::TensorFunction<rank, dim, Number>
+{
+};
+
+int main()
+{
+  initlog();
+
+  MyFunction<1, std::complex<double> > function_1;
+  MyFunction<2, std::complex<float> > function_2;
+  MyFunction<3, std::complex<long double> > function_3;
+
+  MyTensorFunction<1, 1, std::complex<double> > tensor_function_1;
+  MyTensorFunction<2, 2, std::complex<float> > tensor_function_2;
+  MyTensorFunction<3, 3, std::complex<long double> > tensor_function_3;
+
+  deallog << "OK" << std::endl;
+}
diff --git a/tests/base/functions_13.output b/tests/base/functions_13.output
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.