From 7f1465deffe8761feebe8ce377032cf753f10588 Mon Sep 17 00:00:00 2001 From: bangerth Date: Wed, 15 Dec 2010 14:57:09 +0000 Subject: [PATCH] New test that currently fails. git-svn-id: https://svn.dealii.org/trunk@22965 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/codim_one/normal_vectors_01.cc | 103 ++++++ tests/codim_one/normal_vectors_01/cmp/generic | 293 ++++++++++++++++++ 2 files changed, 396 insertions(+) create mode 100644 tests/codim_one/normal_vectors_01.cc create mode 100644 tests/codim_one/normal_vectors_01/cmp/generic diff --git a/tests/codim_one/normal_vectors_01.cc b/tests/codim_one/normal_vectors_01.cc new file mode 100644 index 0000000000..8d9a96b079 --- /dev/null +++ b/tests/codim_one/normal_vectors_01.cc @@ -0,0 +1,103 @@ +//---------------------------- normal_vectors_01.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. +// +//---------------------------- normal_vectors_01.cc --------------------------- + +/* + Asking for normal vectors in the codim-1 case led to aborts. +*/ + +#include "../tests.h" + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +template +void test () +{ + Triangulation tria; + std::map::cell_iterator, + typename Triangulation::face_iterator> surface_to_volume_mapping; + + HyperBallBoundary boundary_description; + Triangulation volume_mesh; + GridGenerator::half_hyper_ball(volume_mesh); + + volume_mesh.set_boundary (1, boundary_description); + volume_mesh.set_boundary (0, boundary_description); + volume_mesh.refine_global (1); + + static HyperBallBoundary surface_description; + tria.set_boundary (1, surface_description); + tria.set_boundary (0, surface_description); + + std::set boundary_ids; + boundary_ids.insert(0); + + GridTools::extract_boundary_mesh (volume_mesh, tria, + surface_to_volume_mapping, + boundary_ids); + + + tria.refine_global(4); + // END OF SURFACE CONSTRUCTION + + FE_Q fe (1); + DoFHandler dh(tria); + MappingQ mapping(1,true); + + dh.distribute_dofs (fe); + + QGauss quadrature_formula(2); + QGauss face_quadrature_formula(2); + + FEValues fe_values (mapping,fe, QGauss(2), + update_values | update_cell_normal_vectors | + update_gradients | + update_quadrature_points | update_JxW_values); + + + // Neumann BC + FEFaceValues fe_face_values (mapping, fe, QGauss(2), + update_values | update_quadrature_points | + update_normal_vectors | update_JxW_values); + + typename DoFHandler::active_cell_iterator + cell = dh.begin_active(); + + fe_values.reinit (cell); + fe_face_values.reinit (cell,0); +} + + + +int main () +{ + std::ofstream logfile("normal_vectors_01/output"); + deallog.attach(logfile); + deallog.depth_console(0); + + test<2> (); + test<3> (); + + return 0; +} diff --git a/tests/codim_one/normal_vectors_01/cmp/generic b/tests/codim_one/normal_vectors_01/cmp/generic new file mode 100644 index 0000000000..d8b5693c0e --- /dev/null +++ b/tests/codim_one/normal_vectors_01/cmp/generic @@ -0,0 +1,293 @@ + +DEAL::Testing hyper_cube in dim: 3... +DEAL::The last column should be 0 +DEAL::Vol faces Surf cell Distance +DEAL:: +DEAL::-0.577350 -0.577350 -0.577350 -0.577350 -0.577350 -0.577350 0 +DEAL::0.00000 -0.577350 -0.577350 0.00000 -0.577350 -0.577350 0 +DEAL::-0.577350 0.00000 -0.577350 -0.577350 0.00000 -0.577350 0 +DEAL::0.00000 0.00000 -0.577350 0.00000 0.00000 -0.577350 0 +DEAL:: +DEAL::0.00000 -0.577350 -0.577350 0.00000 -0.577350 -0.577350 0 +DEAL::0.577350 -0.577350 -0.577350 0.577350 -0.577350 -0.577350 0 +DEAL::0.00000 0.00000 -0.577350 0.00000 0.00000 -0.577350 0 +DEAL::0.577350 0.00000 -0.577350 0.577350 0.00000 -0.577350 0 +DEAL:: +DEAL::-0.577350 0.00000 -0.577350 -0.577350 0.00000 -0.577350 0 +DEAL::0.00000 0.00000 -0.577350 0.00000 0.00000 -0.577350 0 +DEAL::-0.577350 0.577350 -0.577350 -0.577350 0.577350 -0.577350 0 +DEAL::0.00000 0.577350 -0.577350 0.00000 0.577350 -0.577350 0 +DEAL:: +DEAL::0.00000 0.00000 -0.577350 0.00000 0.00000 -0.577350 0 +DEAL::0.577350 0.00000 -0.577350 0.577350 0.00000 -0.577350 0 +DEAL::0.00000 0.577350 -0.577350 0.00000 0.577350 -0.577350 0 +DEAL::0.577350 0.577350 -0.577350 0.577350 0.577350 -0.577350 0 +DEAL:: +DEAL::0.577350 -0.577350 -0.577350 0.577350 -0.577350 -0.577350 0 +DEAL::0.577350 -0.577350 0.00000 0.577350 -0.577350 0.00000 0 +DEAL::0.577350 0.00000 -0.577350 0.577350 0.00000 -0.577350 0 +DEAL::0.577350 0.00000 0.00000 0.577350 0.00000 0.00000 0 +DEAL:: +DEAL::0.577350 -0.577350 0.00000 0.577350 -0.577350 0.00000 0 +DEAL::0.577350 -0.577350 0.577350 0.577350 -0.577350 0.577350 0 +DEAL::0.577350 0.00000 0.00000 0.577350 0.00000 0.00000 0 +DEAL::0.577350 0.00000 0.577350 0.577350 0.00000 0.577350 0 +DEAL:: +DEAL::0.577350 0.00000 -0.577350 0.577350 0.00000 -0.577350 0 +DEAL::0.577350 0.00000 0.00000 0.577350 0.00000 0.00000 0 +DEAL::0.577350 0.577350 -0.577350 0.577350 0.577350 -0.577350 0 +DEAL::0.577350 0.577350 0.00000 0.577350 0.577350 0.00000 0 +DEAL:: +DEAL::0.577350 0.00000 0.00000 0.577350 0.00000 0.00000 0 +DEAL::0.577350 0.00000 0.577350 0.577350 0.00000 0.577350 0 +DEAL::0.577350 0.577350 0.00000 0.577350 0.577350 0.00000 0 +DEAL::0.577350 0.577350 0.577350 0.577350 0.577350 0.577350 0 +DEAL:: +DEAL::-0.577350 -0.577350 0.577350 -0.577350 -0.577350 0.577350 0 +DEAL::-0.577350 0.00000 0.577350 -0.577350 0.00000 0.577350 0 +DEAL::0.00000 -0.577350 0.577350 0.00000 -0.577350 0.577350 0 +DEAL::0.00000 0.00000 0.577350 0.00000 0.00000 0.577350 0 +DEAL:: +DEAL::-0.577350 0.00000 0.577350 -0.577350 0.00000 0.577350 0 +DEAL::-0.577350 0.577350 0.577350 -0.577350 0.577350 0.577350 0 +DEAL::0.00000 0.00000 0.577350 0.00000 0.00000 0.577350 0 +DEAL::0.00000 0.577350 0.577350 0.00000 0.577350 0.577350 0 +DEAL:: +DEAL::0.00000 -0.577350 0.577350 0.00000 -0.577350 0.577350 0 +DEAL::0.00000 0.00000 0.577350 0.00000 0.00000 0.577350 0 +DEAL::0.577350 -0.577350 0.577350 0.577350 -0.577350 0.577350 0 +DEAL::0.577350 0.00000 0.577350 0.577350 0.00000 0.577350 0 +DEAL:: +DEAL::0.00000 0.00000 0.577350 0.00000 0.00000 0.577350 0 +DEAL::0.00000 0.577350 0.577350 0.00000 0.577350 0.577350 0 +DEAL::0.577350 0.00000 0.577350 0.577350 0.00000 0.577350 0 +DEAL::0.577350 0.577350 0.577350 0.577350 0.577350 0.577350 0 +DEAL:: +DEAL::-0.577350 -0.577350 -0.577350 -0.577350 -0.577350 -0.577350 0 +DEAL::-0.577350 0.00000 -0.577350 -0.577350 0.00000 -0.577350 0 +DEAL::-0.577350 -0.577350 0.00000 -0.577350 -0.577350 0.00000 0 +DEAL::-0.577350 0.00000 0.00000 -0.577350 0.00000 0.00000 0 +DEAL:: +DEAL::-0.577350 0.00000 -0.577350 -0.577350 0.00000 -0.577350 0 +DEAL::-0.577350 0.577350 -0.577350 -0.577350 0.577350 -0.577350 0 +DEAL::-0.577350 0.00000 0.00000 -0.577350 0.00000 0.00000 0 +DEAL::-0.577350 0.577350 0.00000 -0.577350 0.577350 0.00000 0 +DEAL:: +DEAL::-0.577350 -0.577350 0.00000 -0.577350 -0.577350 0.00000 0 +DEAL::-0.577350 0.00000 0.00000 -0.577350 0.00000 0.00000 0 +DEAL::-0.577350 -0.577350 0.577350 -0.577350 -0.577350 0.577350 0 +DEAL::-0.577350 0.00000 0.577350 -0.577350 0.00000 0.577350 0 +DEAL:: +DEAL::-0.577350 0.00000 0.00000 -0.577350 0.00000 0.00000 0 +DEAL::-0.577350 0.577350 0.00000 -0.577350 0.577350 0.00000 0 +DEAL::-0.577350 0.00000 0.577350 -0.577350 0.00000 0.577350 0 +DEAL::-0.577350 0.577350 0.577350 -0.577350 0.577350 0.577350 0 +DEAL:: +DEAL::-0.577350 -0.577350 -0.577350 -0.577350 -0.577350 -0.577350 0 +DEAL::-0.577350 -0.577350 0.00000 -0.577350 -0.577350 0.00000 0 +DEAL::0.00000 -0.577350 -0.577350 0.00000 -0.577350 -0.577350 0 +DEAL::0.00000 -0.577350 0.00000 0.00000 -0.577350 0.00000 0 +DEAL:: +DEAL::-0.577350 -0.577350 0.00000 -0.577350 -0.577350 0.00000 0 +DEAL::-0.577350 -0.577350 0.577350 -0.577350 -0.577350 0.577350 0 +DEAL::0.00000 -0.577350 0.00000 0.00000 -0.577350 0.00000 0 +DEAL::0.00000 -0.577350 0.577350 0.00000 -0.577350 0.577350 0 +DEAL:: +DEAL::0.00000 -0.577350 -0.577350 0.00000 -0.577350 -0.577350 0 +DEAL::0.00000 -0.577350 0.00000 0.00000 -0.577350 0.00000 0 +DEAL::0.577350 -0.577350 -0.577350 0.577350 -0.577350 -0.577350 0 +DEAL::0.577350 -0.577350 0.00000 0.577350 -0.577350 0.00000 0 +DEAL:: +DEAL::0.00000 -0.577350 0.00000 0.00000 -0.577350 0.00000 0 +DEAL::0.00000 -0.577350 0.577350 0.00000 -0.577350 0.577350 0 +DEAL::0.577350 -0.577350 0.00000 0.577350 -0.577350 0.00000 0 +DEAL::0.577350 -0.577350 0.577350 0.577350 -0.577350 0.577350 0 +DEAL:: +DEAL::-0.577350 0.577350 -0.577350 -0.577350 0.577350 -0.577350 0 +DEAL::0.00000 0.577350 -0.577350 0.00000 0.577350 -0.577350 0 +DEAL::-0.577350 0.577350 0.00000 -0.577350 0.577350 0.00000 0 +DEAL::0.00000 0.577350 0.00000 0.00000 0.577350 0.00000 0 +DEAL:: +DEAL::0.00000 0.577350 -0.577350 0.00000 0.577350 -0.577350 0 +DEAL::0.577350 0.577350 -0.577350 0.577350 0.577350 -0.577350 0 +DEAL::0.00000 0.577350 0.00000 0.00000 0.577350 0.00000 0 +DEAL::0.577350 0.577350 0.00000 0.577350 0.577350 0.00000 0 +DEAL:: +DEAL::-0.577350 0.577350 0.00000 -0.577350 0.577350 0.00000 0 +DEAL::0.00000 0.577350 0.00000 0.00000 0.577350 0.00000 0 +DEAL::-0.577350 0.577350 0.577350 -0.577350 0.577350 0.577350 0 +DEAL::0.00000 0.577350 0.577350 0.00000 0.577350 0.577350 0 +DEAL:: +DEAL::0.00000 0.577350 0.00000 0.00000 0.577350 0.00000 0 +DEAL::0.577350 0.577350 0.00000 0.577350 0.577350 0.00000 0 +DEAL::0.00000 0.577350 0.577350 0.00000 0.577350 0.577350 0 +DEAL::0.577350 0.577350 0.577350 0.577350 0.577350 0.577350 0 +DEAL:: +-0.577350 -0.577350 -0.577350 1 0 +0.00000 -0.577350 -0.577350 1 0 +0.00000 0.00000 -0.577350 1 0 +-0.577350 0.00000 -0.577350 1 0 +-0.577350 -0.577350 -0.577350 1 0 + + +0.00000 -0.577350 -0.577350 1 0 +0.577350 -0.577350 -0.577350 1 0 +0.577350 0.00000 -0.577350 1 0 +0.00000 0.00000 -0.577350 1 0 +0.00000 -0.577350 -0.577350 1 0 + + +-0.577350 0.00000 -0.577350 1 0 +0.00000 0.00000 -0.577350 1 0 +0.00000 0.577350 -0.577350 1 0 +-0.577350 0.577350 -0.577350 1 0 +-0.577350 0.00000 -0.577350 1 0 + + +0.00000 0.00000 -0.577350 1 0 +0.577350 0.00000 -0.577350 1 0 +0.577350 0.577350 -0.577350 1 0 +0.00000 0.577350 -0.577350 1 0 +0.00000 0.00000 -0.577350 1 0 + + +0.577350 -0.577350 -0.577350 1 0 +0.577350 -0.577350 0.00000 1 0 +0.577350 0.00000 0.00000 1 0 +0.577350 0.00000 -0.577350 1 0 +0.577350 -0.577350 -0.577350 1 0 + + +0.577350 -0.577350 0.00000 1 0 +0.577350 -0.577350 0.577350 1 0 +0.577350 0.00000 0.577350 1 0 +0.577350 0.00000 0.00000 1 0 +0.577350 -0.577350 0.00000 1 0 + + +0.577350 0.00000 -0.577350 1 0 +0.577350 0.00000 0.00000 1 0 +0.577350 0.577350 0.00000 1 0 +0.577350 0.577350 -0.577350 1 0 +0.577350 0.00000 -0.577350 1 0 + + +0.577350 0.00000 0.00000 1 0 +0.577350 0.00000 0.577350 1 0 +0.577350 0.577350 0.577350 1 0 +0.577350 0.577350 0.00000 1 0 +0.577350 0.00000 0.00000 1 0 + + +-0.577350 -0.577350 0.577350 1 0 +-0.577350 0.00000 0.577350 1 0 +0.00000 0.00000 0.577350 1 0 +0.00000 -0.577350 0.577350 1 0 +-0.577350 -0.577350 0.577350 1 0 + + +-0.577350 0.00000 0.577350 1 0 +-0.577350 0.577350 0.577350 1 0 +0.00000 0.577350 0.577350 1 0 +0.00000 0.00000 0.577350 1 0 +-0.577350 0.00000 0.577350 1 0 + + +0.00000 -0.577350 0.577350 1 0 +0.00000 0.00000 0.577350 1 0 +0.577350 0.00000 0.577350 1 0 +0.577350 -0.577350 0.577350 1 0 +0.00000 -0.577350 0.577350 1 0 + + +0.00000 0.00000 0.577350 1 0 +0.00000 0.577350 0.577350 1 0 +0.577350 0.577350 0.577350 1 0 +0.577350 0.00000 0.577350 1 0 +0.00000 0.00000 0.577350 1 0 + + +-0.577350 -0.577350 -0.577350 1 0 +-0.577350 0.00000 -0.577350 1 0 +-0.577350 0.00000 0.00000 1 0 +-0.577350 -0.577350 0.00000 1 0 +-0.577350 -0.577350 -0.577350 1 0 + + +-0.577350 0.00000 -0.577350 1 0 +-0.577350 0.577350 -0.577350 1 0 +-0.577350 0.577350 0.00000 1 0 +-0.577350 0.00000 0.00000 1 0 +-0.577350 0.00000 -0.577350 1 0 + + +-0.577350 -0.577350 0.00000 1 0 +-0.577350 0.00000 0.00000 1 0 +-0.577350 0.00000 0.577350 1 0 +-0.577350 -0.577350 0.577350 1 0 +-0.577350 -0.577350 0.00000 1 0 + + +-0.577350 0.00000 0.00000 1 0 +-0.577350 0.577350 0.00000 1 0 +-0.577350 0.577350 0.577350 1 0 +-0.577350 0.00000 0.577350 1 0 +-0.577350 0.00000 0.00000 1 0 + + +-0.577350 -0.577350 -0.577350 1 0 +-0.577350 -0.577350 0.00000 1 0 +0.00000 -0.577350 0.00000 1 0 +0.00000 -0.577350 -0.577350 1 0 +-0.577350 -0.577350 -0.577350 1 0 + + +-0.577350 -0.577350 0.00000 1 0 +-0.577350 -0.577350 0.577350 1 0 +0.00000 -0.577350 0.577350 1 0 +0.00000 -0.577350 0.00000 1 0 +-0.577350 -0.577350 0.00000 1 0 + + +0.00000 -0.577350 -0.577350 1 0 +0.00000 -0.577350 0.00000 1 0 +0.577350 -0.577350 0.00000 1 0 +0.577350 -0.577350 -0.577350 1 0 +0.00000 -0.577350 -0.577350 1 0 + + +0.00000 -0.577350 0.00000 1 0 +0.00000 -0.577350 0.577350 1 0 +0.577350 -0.577350 0.577350 1 0 +0.577350 -0.577350 0.00000 1 0 +0.00000 -0.577350 0.00000 1 0 + + +-0.577350 0.577350 -0.577350 1 0 +0.00000 0.577350 -0.577350 1 0 +0.00000 0.577350 0.00000 1 0 +-0.577350 0.577350 0.00000 1 0 +-0.577350 0.577350 -0.577350 1 0 + + +0.00000 0.577350 -0.577350 1 0 +0.577350 0.577350 -0.577350 1 0 +0.577350 0.577350 0.00000 1 0 +0.00000 0.577350 0.00000 1 0 +0.00000 0.577350 -0.577350 1 0 + + +-0.577350 0.577350 0.00000 1 0 +0.00000 0.577350 0.00000 1 0 +0.00000 0.577350 0.577350 1 0 +-0.577350 0.577350 0.577350 1 0 +-0.577350 0.577350 0.00000 1 0 + + +0.00000 0.577350 0.00000 1 0 +0.577350 0.577350 0.00000 1 0 +0.577350 0.577350 0.577350 1 0 +0.00000 0.577350 0.577350 1 0 +0.00000 0.577350 0.00000 1 0 + + -- 2.39.5