From c390463586c166a7222435eb1701221e4fc103b9 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 28 Feb 2016 11:54:16 -0600 Subject: [PATCH] Add tests. --- tests/manifold/flat_manifold_05.cc | 58 ++++++++++++++++++++++++ tests/manifold/flat_manifold_05.output | 13 ++++++ tests/manifold/flat_manifold_06.cc | 63 ++++++++++++++++++++++++++ tests/manifold/flat_manifold_06.output | 19 ++++++++ 4 files changed, 153 insertions(+) create mode 100644 tests/manifold/flat_manifold_05.cc create mode 100644 tests/manifold/flat_manifold_05.output create mode 100644 tests/manifold/flat_manifold_06.cc create mode 100644 tests/manifold/flat_manifold_06.output diff --git a/tests/manifold/flat_manifold_05.cc b/tests/manifold/flat_manifold_05.cc new file mode 100644 index 0000000000..254560fec2 --- /dev/null +++ b/tests/manifold/flat_manifold_05.cc @@ -0,0 +1,58 @@ +//------------------------------------------------------------------- +// Copyright (C) 2016 by the deal.II authors. +// +// This file is subject to LGPL 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 direction vector of flat manifold without periodicity + +#include "../tests.h" +#include +#include +#include + + + +// Helper function +template +void test() +{ + deallog << "Testing dim=" << dim + << ", spacedim="<< spacedim << std::endl; + + FlatManifold manifold; + + Point x1, x2; + for (unsigned int d=0; d(); + test<1,2>(); + test<1,3>(); + test<2,2>(); + test<2,3>(); + test<3,3>(); + + return 0; +} + diff --git a/tests/manifold/flat_manifold_05.output b/tests/manifold/flat_manifold_05.output new file mode 100644 index 0000000000..7795db95db --- /dev/null +++ b/tests/manifold/flat_manifold_05.output @@ -0,0 +1,13 @@ + +DEAL::Testing dim=1, spacedim=1 +DEAL::0.800000 +DEAL::Testing dim=1, spacedim=2 +DEAL::0.800000 0.800000 +DEAL::Testing dim=1, spacedim=3 +DEAL::0.800000 0.800000 0.800000 +DEAL::Testing dim=2, spacedim=2 +DEAL::0.800000 0.800000 +DEAL::Testing dim=2, spacedim=3 +DEAL::0.800000 0.800000 0.800000 +DEAL::Testing dim=3, spacedim=3 +DEAL::0.800000 0.800000 0.800000 diff --git a/tests/manifold/flat_manifold_06.cc b/tests/manifold/flat_manifold_06.cc new file mode 100644 index 0000000000..6e7f853169 --- /dev/null +++ b/tests/manifold/flat_manifold_06.cc @@ -0,0 +1,63 @@ +//------------------------------------------------------------------- +// Copyright (C) 2016 by the deal.II authors. +// +// This file is subject to LGPL 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 direction vector of flat manifold with periodicity + +#include "../tests.h" +#include +#include +#include + + +// Helper function +template +void test() +{ + deallog << "Testing dim=" << dim + << ", spacedim="<< spacedim << std::endl; + + // make the domain periodic in the first direction with periodicity 1.1 + Point periodicity; + periodicity[0] = 1.1; + FlatManifold manifold(periodicity); + + Point x1, x2; + for (unsigned int d=0; d(); + test<1,2>(); + test<1,3>(); + test<2,2>(); + test<2,3>(); + test<3,3>(); + + return 0; +} + diff --git a/tests/manifold/flat_manifold_06.output b/tests/manifold/flat_manifold_06.output new file mode 100644 index 0000000000..9e77f6ab6f --- /dev/null +++ b/tests/manifold/flat_manifold_06.output @@ -0,0 +1,19 @@ + +DEAL::Testing dim=1, spacedim=1 +DEAL::-0.300000 +DEAL::0.300000 +DEAL::Testing dim=1, spacedim=2 +DEAL::-0.300000 0.800000 +DEAL::0.300000 -0.800000 +DEAL::Testing dim=1, spacedim=3 +DEAL::-0.300000 0.800000 0.800000 +DEAL::0.300000 -0.800000 -0.800000 +DEAL::Testing dim=2, spacedim=2 +DEAL::-0.300000 0.800000 +DEAL::0.300000 -0.800000 +DEAL::Testing dim=2, spacedim=3 +DEAL::-0.300000 0.800000 0.800000 +DEAL::0.300000 -0.800000 -0.800000 +DEAL::Testing dim=3, spacedim=3 +DEAL::-0.300000 0.800000 0.800000 +DEAL::0.300000 -0.800000 -0.800000 -- 2.39.5