From 4da0eb0023dc9309095556b4b1811e2788d20b68 Mon Sep 17 00:00:00 2001 From: Tobias Leicht Date: Fri, 26 Jan 2007 08:50:49 +0000 Subject: [PATCH] New test for GridGenerator::moebius(). Currently only works on branch_general_meshes. Should be moved to tests/bits eventually. git-svn-id: https://svn.dealii.org/trunk@14382 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/fail/grid_generator_04.cc | 105 ++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 tests/fail/grid_generator_04.cc diff --git a/tests/fail/grid_generator_04.cc b/tests/fail/grid_generator_04.cc new file mode 100644 index 0000000000..dd657c7ec0 --- /dev/null +++ b/tests/fail/grid_generator_04.cc @@ -0,0 +1,105 @@ +//--------------------------------------------------------------------------- +// $Id: grid_generator_02.cc 14204 2006-11-17 03:49:08Z bangerth $ +// Version: $Name$ +// +// Copyright (C) 2005, 2006 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 GridGenerator::moebius + +#include "../tests.h" +#include +#include +#include +#include +#include +#include + +#include +#include + + +template +void test(std::ostream& out) +{ + Point p1; + p1[0] = 2.; + if (dim>1) p1[1] = -1.; + if (dim>2) p1[2] = 0.; + Point p2; + p2[0] = 3.; + if (dim>1) p2[1] = 2.; + if (dim>2) p2[2] = 4.; + Point p3; + p3[0] = 2.; + if (dim>1) p3[1] = 1.; + if (dim>2) p3[2] = 4.; + + + // loop without rotation + if (true) + { + deallog <<"moebius, no rotation" << std::endl; + Triangulation tr; + GridGenerator::moebius(tr, 20, 0, 10.0, 2.0); + GridOut().write_ucd(tr, out); + } + + // loop with quarter rotation (1 * pi/2) + if (true) + { + deallog << "---------------------------"< tr; + GridGenerator::moebius(tr, 20, 1, 10.0, 2.0); + GridOut().write_ucd(tr, out); + } + + // loop with half rotation (2 * pi/2) + if (true) + { + deallog << "---------------------------"< tr; + GridGenerator::moebius(tr, 20, 2, 10.0, 2.0); + GridOut().write_ucd(tr, out); + } + + // loop with three quarter rotation (3 * pi/2) + if (true) + { + deallog << "---------------------------"< tr; + GridGenerator::moebius(tr, 20, 3, 10.0, 2.0); + GridOut().write_ucd(tr, out); + } + + // loop with full rotation (1 * pi/2) + if (true) + { + deallog << "---------------------------"< tr; + GridGenerator::moebius(tr, 20, 4, 10.0, 2.0); + GridOut().write_ucd(tr, out); + } +} + + +int main() +{ + std::ofstream logfile("grid_generator_04/output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + test<3>(logfile); +} -- 2.39.5