From: bangerth Date: Thu, 16 Dec 2010 23:58:52 +0000 (+0000) Subject: Another testcase. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa27031d18b8cdc107cf875e9c016da17ec3eddf;p=dealii-svn.git Another testcase. git-svn-id: https://svn.dealii.org/trunk@22989 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/codim_one/mapping_02.cc b/tests/codim_one/mapping_02.cc new file mode 100644 index 0000000000..9912789533 --- /dev/null +++ b/tests/codim_one/mapping_02.cc @@ -0,0 +1,80 @@ +//---------------------------- mapping_02.cc --------------------------- +// $Id: bem.cc 22693 2010-11-11 20:11:47Z kanschat $ +// Version: $Name$ +// +// Copyright (C) 2010 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. +// +//---------------------------- mapping_02.cc --------------------------- + + +// like _01, but use a quadratic mapping. since we now map line segments to +// curves, the normal vectors at different quadrature points should no longer +// be parallel + +#include "../tests.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +template +void test () +{ + deallog << "Testing hyper_ball in dim: " << dim << "..."<< std::endl; + + Triangulation volume_mesh; + GridGenerator::hyper_ball(volume_mesh); + + const HyperBallBoundary surface_description; + Triangulation boundary_mesh; + boundary_mesh.set_boundary (0, surface_description); + + GridTools::extract_boundary_mesh (volume_mesh, boundary_mesh); + + QGauss quadrature(dim == 2 ? 3 : 2); + MappingQ mapping(2); + FE_Q fe (1); + + FEValues fe_values (mapping, fe, quadrature, update_cell_normal_vectors); + + for (typename Triangulation::active_cell_iterator + cell = boundary_mesh.begin_active(); cell != boundary_mesh.end(); + ++cell) + { + deallog << "Cell = " << cell + << ", with center at " << cell->center() + << std::endl; + fe_values.reinit (cell); + + for (unsigned int q=0; q (); + test<3> (); + + return 0; +} diff --git a/tests/codim_one/mapping_02/cmp/generic b/tests/codim_one/mapping_02/cmp/generic new file mode 100644 index 0000000000..8c0d6aab81 --- /dev/null +++ b/tests/codim_one/mapping_02/cmp/generic @@ -0,0 +1,49 @@ + +DEAL::Testing hyper_ball in dim: 2... +DEAL::Cell = 0.0, with center at 0.00000 -0.707107 +DEAL:: cell_normal[0] = 0.540066 0.841622 +DEAL:: cell_normal[1] = 0.00000 1.00000 +DEAL:: cell_normal[2] = -0.540066 0.841622 +DEAL::Cell = 0.1, with center at -0.707107 0.00000 +DEAL:: cell_normal[0] = 0.841622 0.540066 +DEAL:: cell_normal[1] = 1.00000 0.00000 +DEAL:: cell_normal[2] = 0.841622 -0.540066 +DEAL::Cell = 0.2, with center at 0.707107 0.00000 +DEAL:: cell_normal[0] = -0.841622 0.540066 +DEAL:: cell_normal[1] = -1.00000 0.00000 +DEAL:: cell_normal[2] = -0.841622 -0.540066 +DEAL::Cell = 0.3, with center at 0.00000 0.707107 +DEAL:: cell_normal[0] = 0.540066 -0.841622 +DEAL:: cell_normal[1] = 0.00000 -1.00000 +DEAL:: cell_normal[2] = -0.540066 -0.841622 +DEAL::Testing hyper_ball in dim: 3... +DEAL::Cell = 0.0, with center at 0.00000 0.00000 -0.577350 +DEAL:: cell_normal[0] = 0.395454 0.395454 0.828995 +DEAL:: cell_normal[1] = -0.395454 0.395454 0.828995 +DEAL:: cell_normal[2] = 0.395454 -0.395454 0.828995 +DEAL:: cell_normal[3] = -0.395454 -0.395454 0.828995 +DEAL::Cell = 0.1, with center at 0.577350 0.00000 0.00000 +DEAL:: cell_normal[0] = -0.828995 0.395454 0.395454 +DEAL:: cell_normal[1] = -0.828995 0.395454 -0.395454 +DEAL:: cell_normal[2] = -0.828995 -0.395454 0.395454 +DEAL:: cell_normal[3] = -0.828995 -0.395454 -0.395454 +DEAL::Cell = 0.2, with center at 0.00000 0.00000 0.577350 +DEAL:: cell_normal[0] = 0.395454 0.395454 -0.828995 +DEAL:: cell_normal[1] = 0.395454 -0.395454 -0.828995 +DEAL:: cell_normal[2] = -0.395454 0.395454 -0.828995 +DEAL:: cell_normal[3] = -0.395454 -0.395454 -0.828995 +DEAL::Cell = 0.3, with center at -0.577350 0.00000 0.00000 +DEAL:: cell_normal[0] = 0.828995 0.395454 0.395454 +DEAL:: cell_normal[1] = 0.828995 -0.395454 0.395454 +DEAL:: cell_normal[2] = 0.828995 0.395454 -0.395454 +DEAL:: cell_normal[3] = 0.828995 -0.395454 -0.395454 +DEAL::Cell = 0.4, with center at 0.00000 -0.577350 0.00000 +DEAL:: cell_normal[0] = 0.395454 0.828995 0.395454 +DEAL:: cell_normal[1] = 0.395454 0.828995 -0.395454 +DEAL:: cell_normal[2] = -0.395454 0.828995 0.395454 +DEAL:: cell_normal[3] = -0.395454 0.828995 -0.395454 +DEAL::Cell = 0.5, with center at 0.00000 0.577350 0.00000 +DEAL:: cell_normal[0] = 0.395454 -0.828995 0.395454 +DEAL:: cell_normal[1] = -0.395454 -0.828995 0.395454 +DEAL:: cell_normal[2] = 0.395454 -0.828995 -0.395454 +DEAL:: cell_normal[3] = -0.395454 -0.828995 -0.395454