From 693d80a2d79b38f694f374d0eead62d72c8aa2d0 Mon Sep 17 00:00:00 2001 From: leicht Date: Thu, 14 Dec 2006 10:59:21 +0000 Subject: [PATCH] new test: read in tecplot grid files git-svn-id: https://svn.dealii.org/trunk@14239 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/deal.II/grid_in_tecplot.cc | 49 +++++++++++++ tests/deal.II/grid_in_tecplot/cmp/generic | 84 +++++++++++++++++++++++ tests/deal.II/grid_tec_1.dat | 21 ++++++ tests/deal.II/grid_tec_2.dat | 21 ++++++ tests/deal.II/grid_tec_3.dat | 19 +++++ tests/deal.II/grid_tec_4.dat | 18 +++++ 6 files changed, 212 insertions(+) create mode 100644 tests/deal.II/grid_in_tecplot.cc create mode 100644 tests/deal.II/grid_in_tecplot/cmp/generic create mode 100644 tests/deal.II/grid_tec_1.dat create mode 100644 tests/deal.II/grid_tec_2.dat create mode 100644 tests/deal.II/grid_tec_3.dat create mode 100644 tests/deal.II/grid_tec_4.dat diff --git a/tests/deal.II/grid_in_tecplot.cc b/tests/deal.II/grid_in_tecplot.cc new file mode 100644 index 0000000000..ce8f985857 --- /dev/null +++ b/tests/deal.II/grid_in_tecplot.cc @@ -0,0 +1,49 @@ +//------------------------ grid_in_tecplot.cc ----------------------- +// $Id: grid_in.cc 11749 2005-11-09 19:11:20Z wolf $ +// Version: $Name$ +// +// Copyright (C) 2002, 2003, 2004, 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. +// +//------------------------ grid_in_tecplot.cc ----------------------- + +#include "../tests.h" +#include +#include +#include +#include +#include + +#include +#include + +std::ofstream logfile("grid_in_tecplot/output"); + + +template +void test (const std::string &infilename) +{ + Triangulation tria; + GridIn gi; + gi.attach_triangulation (tria); + gi.read (infilename); + + logfile<<"------------------------------------------"< ("grid_tec_1.dat"); + test<2> ("grid_tec_2.dat"); + test<2> ("grid_tec_3.dat"); + test<2> ("grid_tec_4.dat"); +} + diff --git a/tests/deal.II/grid_in_tecplot/cmp/generic b/tests/deal.II/grid_in_tecplot/cmp/generic new file mode 100644 index 0000000000..bb090e969c --- /dev/null +++ b/tests/deal.II/grid_in_tecplot/cmp/generic @@ -0,0 +1,84 @@ +------------------------------------------ +output for grid in grid_tec_1.dat +# This file was generated by the deal.II library. + + +# +# For a description of the UCD format see the AVS Developer's guide. +# +8 4 0 0 0 +1 1 0 0 +2 0 1 0 +3 -1 0 0 +4 0 -1 0 +5 2 0 0 +6 0 2 0 +7 -2 0 0 +8 0 -2 0 +1 0 quad 1 5 6 2 +2 0 quad 2 6 7 3 +3 0 quad 3 7 8 4 +4 0 quad 4 8 5 1 +------------------------------------------ +output for grid in grid_tec_2.dat +# This file was generated by the deal.II library. + + +# +# For a description of the UCD format see the AVS Developer's guide. +# +8 4 0 0 0 +1 1 0 0 +2 0 1 0 +3 -1 0 0 +4 0 -1 0 +5 2 0 0 +6 0 2 0 +7 -2 0 0 +8 0 -2 0 +1 0 quad 1 5 6 2 +2 0 quad 2 6 7 3 +3 0 quad 3 7 8 4 +4 0 quad 4 8 5 1 +------------------------------------------ +output for grid in grid_tec_3.dat +# This file was generated by the deal.II library. + + +# +# For a description of the UCD format see the AVS Developer's guide. +# +8 4 0 0 0 +1 1 0 0 +2 0 1 0 +3 -1 0 0 +4 0 -1 0 +5 2 0 0 +6 0 2 0 +7 -2 0 0 +8 0 -2 0 +1 0 quad 1 5 6 2 +2 0 quad 2 6 7 3 +3 0 quad 3 7 8 4 +4 0 quad 4 8 5 1 +------------------------------------------ +output for grid in grid_tec_4.dat +# This file was generated by the deal.II library. + + +# +# For a description of the UCD format see the AVS Developer's guide. +# +8 4 0 0 0 +1 1 0 0 +2 0 1 0 +3 -1 0 0 +4 0 -1 0 +5 2 0 0 +6 0 2 0 +7 -2 0 0 +8 0 -2 0 +1 0 quad 1 5 6 2 +2 0 quad 2 6 7 3 +3 0 quad 3 7 8 4 +4 0 quad 4 8 5 1 diff --git a/tests/deal.II/grid_tec_1.dat b/tests/deal.II/grid_tec_1.dat new file mode 100644 index 0000000000..56951b0aa3 --- /dev/null +++ b/tests/deal.II/grid_tec_1.dat @@ -0,0 +1,21 @@ +# coordinates x and y +# new format of keys +# unstructured data + +TITLE = "quad Mesh File" +VARIABLES = "X", "Y" +ZONE T="Zone-4" N=8 E=4 C=BLACK DATAPACKING=POINT ZONETYPE=FEQUADRILATERAL +DT=(SINGLE SINGLE) +1 0 +0 1 +-1 0 +0 -1 +2 0 +0 2 +-2 0 +0 -2 + +1 5 6 2 +2 6 7 3 +3 7 8 4 +4 8 5 1 diff --git a/tests/deal.II/grid_tec_2.dat b/tests/deal.II/grid_tec_2.dat new file mode 100644 index 0000000000..8b63364078 --- /dev/null +++ b/tests/deal.II/grid_tec_2.dat @@ -0,0 +1,21 @@ +# coordinates to use: x and z +# old format of keys +# unstructured data, point format +TITLE = "quad Mesh File" +VARIABLES = "X", "Y", + "Z" +ZONE T="Zone-4" N= 8 E=4 C=BLACK F=FEPOINT +DT=(SINGLE SINGLE SINGLE ) +1 0 0 +0 0 1 +-1 0 0 +0 0 -1 +2 0 0 +0 0 2 +-2 0 0 +0 0 -2 + +1 5 6 2 +2 6 7 3 +3 7 8 4 +4 8 5 1 diff --git a/tests/deal.II/grid_tec_3.dat b/tests/deal.II/grid_tec_3.dat new file mode 100644 index 0000000000..9dd69e37a3 --- /dev/null +++ b/tests/deal.II/grid_tec_3.dat @@ -0,0 +1,19 @@ +# coordinates x and y +# new format of keys +# structured data (duplicated vertices), block format + +TITLE = "quad Mesh File" +VARIABLES = "X", "Y" +ZONE T="Zone-4" I=5 J=2 C=BLACK DATAPACKING=BLOCK ZONETYPE=ORDERED +DT=(SINGLE SINGLE) +1 0 -1 0 1 +2 +0 +-2 +0 2 + +0 1 0 -1 0 +0 +2 + 0 -2 +0 diff --git a/tests/deal.II/grid_tec_4.dat b/tests/deal.II/grid_tec_4.dat new file mode 100644 index 0000000000..859d61d9c0 --- /dev/null +++ b/tests/deal.II/grid_tec_4.dat @@ -0,0 +1,18 @@ +# coordinates to use: x and z +# old format of keys +# unstructured data, block format +TITLE = "quad Mesh File" +VARIABLES = "X", "Y", + "Z" +ZONE T="Zone-4" N= 8 E=4 C=BLACK F=FEBlock +DT=(SINGLE SINGLE SINGLE ) +1 0 -1 0 +2 0 -2 0 +0 0 0 0 0 0 0 0 +0 1 0 -1 +0 2 0 -2 + +1 5 6 2 +2 6 7 3 +3 7 8 4 +4 8 5 1 -- 2.39.5