From e64f6c8a25ac28cf48b013607a470062e96b3c6b Mon Sep 17 00:00:00 2001 From: heltai Date: Mon, 21 Nov 2011 19:12:18 +0000 Subject: [PATCH] Found a nasty bug in grid_out. It shows up also in DataOut git-svn-id: https://svn.dealii.org/trunk@24755 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/codim_one/mesh_bug.cc | 56 ++++++++++++++++++++++++++++ tests/codim_one/mesh_bug/cmp/generic | 6 +++ 2 files changed, 62 insertions(+) create mode 100644 tests/codim_one/mesh_bug.cc create mode 100644 tests/codim_one/mesh_bug/cmp/generic diff --git a/tests/codim_one/mesh_bug.cc b/tests/codim_one/mesh_bug.cc new file mode 100644 index 0000000000..e067de3f34 --- /dev/null +++ b/tests/codim_one/mesh_bug.cc @@ -0,0 +1,56 @@ + +//---------------------------- mesh_bug.cc --------------------------- +// $Id: testsuite.html 13373 2006-07-13 13:12:08Z kanschat $ +// Version: $Name$ +// +// Copyright (C) 2005 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. +// +//---------------------------- mesh_bug.cc --------------------------- + + +// a short (a few lines) description of what the program does + +#include "../tests.h" +#include +#include + +// all include files you need here + + +#include +#include +#include +#include +#include +#include +#include + + +int main () +{ + std::ofstream logfile("mesh_bug/output"); + + Triangulation<2,3> tria; + GridIn<2,3> gi; + gi.attach_triangulation(tria); + std::ifstream infile("mesh_bug/cmp/generic"); + gi.read(infile); + + const std::vector > &vertices = tria.get_vertices(); + + for(unsigned int i=0; i1e-7) + std::cout << "Error!" << std::endl; + + + GridOut go; + go.write_ucd(tria, logfile); + + return 0; +} + diff --git a/tests/codim_one/mesh_bug/cmp/generic b/tests/codim_one/mesh_bug/cmp/generic new file mode 100644 index 0000000000..32a20427df --- /dev/null +++ b/tests/codim_one/mesh_bug/cmp/generic @@ -0,0 +1,6 @@ +4 1 0 0 0 +1 -1.25 0 -0.0195312 +2 -1.25 0 -0.00976562 +3 -1.09375 0.0288444 -0.0195312 +4 -1.09375 0.0291878 -0.00976562 +1 10 quad 3 1 2 4 -- 2.39.5