From 8d4d1c2f39be00f4eabd754960dd2179141815e4 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Wed, 10 Aug 2011 21:15:41 +0000 Subject: [PATCH] add failing test with strange normals for a half_hyper_shell. git-svn-id: https://svn.dealii.org/trunk@24043 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/fail/half_hyper_normals.cc | 82 ++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 tests/fail/half_hyper_normals.cc diff --git a/tests/fail/half_hyper_normals.cc b/tests/fail/half_hyper_normals.cc new file mode 100644 index 0000000000..5cd923b5a0 --- /dev/null +++ b/tests/fail/half_hyper_normals.cc @@ -0,0 +1,82 @@ +//---------------------------- vectors_rhs_hp_02.cc --------------------------- +// $Id: vectors_rhs_hp_02.cc 23710 2011-05-17 04:50:10Z bangerth $ +// Version: $Name$ +// +// Copyright (C) 2000, 2001, 2003, 2004, 2006, 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. +// +//---------------------------- vectors_rhs_hp_02.cc --------------------------- + + +// some normals seem to be wrong when using GridGenerator::half_hyper_shell() in 2d: +// An error occurred in line <4646> of file in function +// static void dealii::VectorTools::compute_no_normal_flux_constraints(const DH&, unsigned int, const std::set&, dealii::ConstraintMatrix&, const dealii::Mapping&) [with int dim = 3, DH = dealii::DoFHandler, int spacedim = 3] +// The violated condition was: +// std::fabs (tangent.norm()-1) < 1e-12 +// The name and call sequence of the exception was: +// ExcInternalError() +// quarter_hyper_shell works, even though it is a very similar mesh. + + +#include "../tests.h" + +#include +#include +#include +#include +#include +#include +#include + + +template +void +check () +{ + Triangulation tr; + GridGenerator::half_hyper_shell (tr, + Point(), + 0.5, + 1,0); +/* GridGenerator::quarter_hyper_shell (tr, + Point(), + 0.5, + 1,0); */ +// tr.refine_global (1); + + ConstraintMatrix cm; + MappingQ mapping(1); + + FESystem fe(FE_Q(1),dim); + DoFHandler dofh(tr); + + dofh.distribute_dofs (fe); + + std::set no_normal_flux_boundaries; + no_normal_flux_boundaries.insert (0); + VectorTools::compute_no_normal_flux_constraints (dofh, 0, no_normal_flux_boundaries, cm, mapping); + + deallog << "ok" << std::endl; +} + + + +int main () +{ + std::ofstream logfile ("half_hyper_normals/output"); + logfile.precision (4); + logfile.setf(std::ios::fixed); + deallog.attach(logfile); + deallog.depth_console (0); + + deallog.push ("2d"); + check<2> (); + deallog.pop (); + deallog.push ("3d"); + check<3> (); + deallog.pop (); +} -- 2.39.5