From 0bb9b7f2aa46b5fcd07754fb684a51e773ae2a57 Mon Sep 17 00:00:00 2001 From: kanschat Date: Wed, 6 Jun 2007 21:10:32 +0000 Subject: [PATCH] test hyper_shell git-svn-id: https://svn.dealii.org/trunk@14763 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/deal.II/Makefile | 1 + tests/deal.II/grid_hyper_shell.cc | 55 +++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 tests/deal.II/grid_hyper_shell.cc diff --git a/tests/deal.II/Makefile b/tests/deal.II/Makefile index e035d6199b..f70f639945 100644 --- a/tests/deal.II/Makefile +++ b/tests/deal.II/Makefile @@ -38,6 +38,7 @@ tests_x = block_matrices \ grid_test \ grid_transform \ grid_transform_3d \ + grid_hyper_* \ measure_et_al \ normals_at_vertices \ intergrid_constraints \ diff --git a/tests/deal.II/grid_hyper_shell.cc b/tests/deal.II/grid_hyper_shell.cc new file mode 100644 index 0000000000..7a45b20890 --- /dev/null +++ b/tests/deal.II/grid_hyper_shell.cc @@ -0,0 +1,55 @@ +//---------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2007 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. +// +//---------------------------------------------------------------------- + + +#include "../tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +std::ofstream logfile("grid_hyper_shell/output"); + + +template +void check (double r1, double r2, unsigned int n, bool log) +{ + Point center; + Triangulation tria; + GridGenerator::hyper_shell (tria, center, r1, r2, n); + static const HyperShellBoundary boundary(center); + tria.set_boundary(0, boundary); + + tria.refine_global(2); + + GridOut grid_out; + if (log) + grid_out.write_eps (tria, logfile); + else + grid_out.write_dx (tria, std::cout); +} + + +int main() +{ + check<2> (4., 5., 10, true); + check<3> (3., 5., 6, true); +} -- 2.39.5