From f1368eeef0460d19b9694f57b3dfc23e25a5935e Mon Sep 17 00:00:00 2001 From: wolf Date: Tue, 4 Apr 2006 03:53:00 +0000 Subject: [PATCH] Add new testcase that presently fails git-svn-id: https://svn.dealii.org/trunk@12811 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/bits/data_out_stack_04.cc | 75 +++++++++++++++++++++++++ tests/bits/data_out_stack_04/.cvsignore | 1 + 2 files changed, 76 insertions(+) create mode 100644 tests/bits/data_out_stack_04.cc create mode 100644 tests/bits/data_out_stack_04/.cvsignore diff --git a/tests/bits/data_out_stack_04.cc b/tests/bits/data_out_stack_04.cc new file mode 100644 index 0000000000..ff632a979a --- /dev/null +++ b/tests/bits/data_out_stack_04.cc @@ -0,0 +1,75 @@ +//---------------------------- data_out_stack_01.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2006 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. +// +//---------------------------- data_out_stack_04.cc --------------------------- + +// same as data_out_stack_04, but test for 2d + +#include "../tests.h" +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + + + + +template +void run () +{ + Triangulation triangulation; + GridGenerator::hyper_cube (triangulation, -1, 1); + triangulation.refine_global (1); + + FE_Q fe(1); + DoFHandler dof_handler(triangulation); + dof_handler.distribute_dofs (fe); + + // create a continuous field over + // this DoFHandler + Vector v(dof_handler.n_dofs()); + v(v.size()/2) = 1; + + // output this field using + // DataOutStack. the result should + // be a continuous field again + DataOutStack data_out_stack; + data_out_stack.declare_data_vector ("solution", + DataOutStack::dof_vector); + data_out_stack.new_parameter_value (1,1); + data_out_stack.attach_dof_handler (dof_handler); + data_out_stack.add_data_vector (v, "solution"); + data_out_stack.build_patches (1); + data_out_stack.finish_parameter_value (); + + data_out_stack.write_gnuplot (deallog.get_file_stream()); +} + + + +int main () +{ + std::ofstream logfile("data_out_stack_04/output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + run<2> (); + + return 0; +} diff --git a/tests/bits/data_out_stack_04/.cvsignore b/tests/bits/data_out_stack_04/.cvsignore new file mode 100644 index 0000000000..d196dfb299 --- /dev/null +++ b/tests/bits/data_out_stack_04/.cvsignore @@ -0,0 +1 @@ +obj.* exe OK output -- 2.39.5