From: bangerth Date: Mon, 14 Jul 2014 22:20:47 +0000 (+0000) Subject: Tests for the previous commit. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3f8ce8c0963d11478527009f55dac607abd2a96;p=dealii-svn.git Tests for the previous commit. git-svn-id: https://svn.dealii.org/trunk@33173 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/deal.II/grid_out_06.cc b/tests/deal.II/grid_out_06.cc new file mode 100644 index 0000000000..97f712a497 --- /dev/null +++ b/tests/deal.II/grid_out_06.cc @@ -0,0 +1,65 @@ +// --------------------------------------------------------------------- +// $Id$ +// +// Copyright (C) 2002 - 2014 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + + +// test GridOut::write_vtk + +#include "../tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + + +std::ofstream logfile("output"); + + +template +void test () +{ + Triangulation tria; + GridGenerator::hyper_cube (tria); + tria.refine_global (1); + + GridOut grid_out; + grid_out.write_vtk (tria, logfile); +} + + +int main () +{ + deallog << std::setprecision (2); + logfile << std::setprecision (2); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + test<1,1> (); + test<1,2> (); + test<2,2> (); + test<2,3> (); + test<3,3> (); +} + diff --git a/tests/deal.II/grid_out_06.output b/tests/deal.II/grid_out_06.output new file mode 100644 index 0000000000..13bdc060dd --- /dev/null +++ b/tests/deal.II/grid_out_06.output @@ -0,0 +1,185 @@ + +# vtk DataFile Version 3.0 +#This file was generated +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 4 double +0.0 0 0 +0.50 0 0 +0.50 0 0 +1.0 0 0 + +CELLS 2 6 +2 0 1 +2 2 3 + +CELL_TYPES 2 + 3 3 +POINT_DATA 4 +# vtk DataFile Version 3.0 +#This file was generated +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 4 double +0.0 0.0 0 +0.50 0.0 0 +0.50 0.0 0 +1.0 0.0 0 + +CELLS 2 6 +2 0 1 +2 2 3 + +CELL_TYPES 2 + 3 3 +POINT_DATA 4 +# vtk DataFile Version 3.0 +#This file was generated +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 16 double +0.0 0.0 0 +0.50 0.0 0 +0.0 0.50 0 +0.50 0.50 0 +0.50 0.0 0 +1.0 0.0 0 +0.50 0.50 0 +1.0 0.50 0 +0.0 0.50 0 +0.50 0.50 0 +0.0 1.0 0 +0.50 1.0 0 +0.50 0.50 0 +1.0 0.50 0 +0.50 1.0 0 +1.0 1.0 0 + +CELLS 4 20 +4 0 1 3 2 +4 4 5 7 6 +4 8 9 11 10 +4 12 13 15 14 + +CELL_TYPES 4 + 9 9 9 9 +POINT_DATA 16 +# vtk DataFile Version 3.0 +#This file was generated +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 16 double +0.0 0.0 0.0 +0.50 0.0 0.0 +0.0 0.50 0.0 +0.50 0.50 0.0 +0.50 0.0 0.0 +1.0 0.0 0.0 +0.50 0.50 0.0 +1.0 0.50 0.0 +0.0 0.50 0.0 +0.50 0.50 0.0 +0.0 1.0 0.0 +0.50 1.0 0.0 +0.50 0.50 0.0 +1.0 0.50 0.0 +0.50 1.0 0.0 +1.0 1.0 0.0 + +CELLS 4 20 +4 0 1 3 2 +4 4 5 7 6 +4 8 9 11 10 +4 12 13 15 14 + +CELL_TYPES 4 + 9 9 9 9 +POINT_DATA 16 +# vtk DataFile Version 3.0 +#This file was generated +ASCII +DATASET UNSTRUCTURED_GRID + +POINTS 64 double +0.0 0.0 0.0 +0.50 0.0 0.0 +0.0 0.50 0.0 +0.50 0.50 0.0 +0.0 0.0 0.50 +0.50 0.0 0.50 +0.0 0.50 0.50 +0.50 0.50 0.50 +0.50 0.0 0.0 +1.0 0.0 0.0 +0.50 0.50 0.0 +1.0 0.50 0.0 +0.50 0.0 0.50 +1.0 0.0 0.50 +0.50 0.50 0.50 +1.0 0.50 0.50 +0.0 0.50 0.0 +0.50 0.50 0.0 +0.0 1.0 0.0 +0.50 1.0 0.0 +0.0 0.50 0.50 +0.50 0.50 0.50 +0.0 1.0 0.50 +0.50 1.0 0.50 +0.50 0.50 0.0 +1.0 0.50 0.0 +0.50 1.0 0.0 +1.0 1.0 0.0 +0.50 0.50 0.50 +1.0 0.50 0.50 +0.50 1.0 0.50 +1.0 1.0 0.50 +0.0 0.0 0.50 +0.50 0.0 0.50 +0.0 0.50 0.50 +0.50 0.50 0.50 +0.0 0.0 1.0 +0.50 0.0 1.0 +0.0 0.50 1.0 +0.50 0.50 1.0 +0.50 0.0 0.50 +1.0 0.0 0.50 +0.50 0.50 0.50 +1.0 0.50 0.50 +0.50 0.0 1.0 +1.0 0.0 1.0 +0.50 0.50 1.0 +1.0 0.50 1.0 +0.0 0.50 0.50 +0.50 0.50 0.50 +0.0 1.0 0.50 +0.50 1.0 0.50 +0.0 0.50 1.0 +0.50 0.50 1.0 +0.0 1.0 1.0 +0.50 1.0 1.0 +0.50 0.50 0.50 +1.0 0.50 0.50 +0.50 1.0 0.50 +1.0 1.0 0.50 +0.50 0.50 1.0 +1.0 0.50 1.0 +0.50 1.0 1.0 +1.0 1.0 1.0 + +CELLS 8 72 +8 0 1 3 2 4 5 7 6 +8 8 9 11 10 12 13 15 14 +8 16 17 19 18 20 21 23 22 +8 24 25 27 26 28 29 31 30 +8 32 33 35 34 36 37 39 38 +8 40 41 43 42 44 45 47 46 +8 48 49 51 50 52 53 55 54 +8 56 57 59 58 60 61 63 62 + +CELL_TYPES 8 + 12 12 12 12 12 12 12 12 +POINT_DATA 64