From 0a4c5f0653a1f37e820c7f1ecaad3df02678bd49 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 10 Jun 2008 21:07:41 +0000 Subject: [PATCH] Add yet another test that is a further reduced version of the previous two. git-svn-id: https://svn.dealii.org/trunk@16291 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/fail/mesh_3d_23.cc | 13 ----- tests/fail/mesh_3d_24.cc | 98 ++++++++++++++++++++++++++++++++++ tests/fail/mesh_3d_24/mesh.msh | 20 +++++++ 3 files changed, 118 insertions(+), 13 deletions(-) create mode 100644 tests/fail/mesh_3d_24.cc create mode 100644 tests/fail/mesh_3d_24/mesh.msh diff --git a/tests/fail/mesh_3d_23.cc b/tests/fail/mesh_3d_23.cc index dca693db26..1666f74dfa 100644 --- a/tests/fail/mesh_3d_23.cc +++ b/tests/fail/mesh_3d_23.cc @@ -80,18 +80,5 @@ int main () data_out.build_patches(mapping, 3); data_out.write_gnuplot (deallog.get_file_stream()); - -/* - Point<3> p; - for (double x=0;x<=1;x+=1.0/3.0) - { - p(0)=x; - p(1)=1.0/3.0; - p(2)=0.0; - - Point<3> r=mapping.transform_unit_to_real_cell(++triangulation.begin_active(),p); - deallog << p << " > " << r << std::endl; - } - */ } diff --git a/tests/fail/mesh_3d_24.cc b/tests/fail/mesh_3d_24.cc new file mode 100644 index 0000000000..eed2ff440d --- /dev/null +++ b/tests/fail/mesh_3d_24.cc @@ -0,0 +1,98 @@ +//---------------------------- mesh_3d_24.cc --------------------------- +// $Id: mesh_3d_24.cc 15662 2008-01-24 05:31:14Z kanschat $ +// Version: $Name$ +// +// Copyright (C) 2006, 2008 by Timo Heister and 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. +// +//---------------------------- mesh_3d_24.cc --------------------------- + + +// like mesh_3d_22, but even further reduced: take a few points on a +// line in reference space and see where they are transformed to real +// space using a MappingQ(3) on a cell with a flipped face. the cell +// is a cube, so the points should also be mapped to a straight line, +// but they are not, unfortunately, when this test was written. + +#include "../tests.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + + +int main () +{ + std::ofstream logfile ("mesh_3d_24/output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.0e-10); + + Triangulation<3> triangulation; + GridIn<3> grid_in; + grid_in.attach_triangulation(triangulation); + std::ifstream inputStream("mesh_3d_22/mesh.msh"); + grid_in.read_msh (inputStream); + + MappingQ<3> mapping(3); + + Triangulation<3>::active_cell_iterator cell; + cell = triangulation.begin_active(); + ++cell; + + for (unsigned int f=0; f<6; ++f) + deallog << "face: " << f + << std::endl + << " Face orientation status: " + << cell->face_orientation (f) + << std::endl + << " On boundary: " << cell->at_boundary(f) + << std::endl + << " Neighbor: " + << (cell->at_boundary(f) ? triangulation.end() : cell->neighbor(f)) + << std::endl; + + for (double x=0; x<=1; x+=1.0/3.0) + { + const Point<3> p(x, 1./3., 0); + deallog << p + << " in unit coordinates maps to real coordinates " + << mapping.transform_unit_to_real_cell(cell,p) + << std::endl; + } +} + diff --git a/tests/fail/mesh_3d_24/mesh.msh b/tests/fail/mesh_3d_24/mesh.msh new file mode 100644 index 0000000000..1720c7a637 --- /dev/null +++ b/tests/fail/mesh_3d_24/mesh.msh @@ -0,0 +1,20 @@ +$NOD +12 +1 1.5 0.2 0 +2 1.5 0.4 0 +3 1.5 0.6 0 +4 2.0 0.2 0 +5 2.0 0.4 0 +6 2.0 0.6 0 +7 1.5 0.2 0.205 +8 1.5 0.4 0.205 +9 1.5 0.6 0.205 +10 2.0 0.2 0.205 +11 2.0 0.4 0.205 +12 2.0 0.6 0.205 +$ENDNOD +$ELM +2 +1 5 30 1 8 5 6 3 2 11 12 9 8 +2 5 30 1 8 5 2 1 4 11 8 7 10 +$ENDELM -- 2.39.5