From: Wolfgang Bangerth Date: Thu, 26 Feb 2004 19:31:58 +0000 (+0000) Subject: Add a test that used to fail on some systems due to uninstantiated symbols. X-Git-Tag: v8.0.0~15733 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2efe0f1efab822f1596c9fb10a285c33d499cc3;p=dealii.git Add a test that used to fail on some systems due to uninstantiated symbols. git-svn-id: https://svn.dealii.org/trunk@8575 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/bits/Makefile b/tests/bits/Makefile index 5199180e4f..b59cdf21f7 100644 --- a/tests/bits/Makefile +++ b/tests/bits/Makefile @@ -30,7 +30,7 @@ tests_x = anna_? \ data_out_0* \ data_out_faces_0* \ data_out_rotation_0* \ - data_out_stack_01 \ + data_out_stack_0* \ dof_tools_[0-9]* \ fe_tools_[0-9]* \ roy_1 \ diff --git a/tests/bits/data_out_stack_02.cc b/tests/bits/data_out_stack_02.cc new file mode 100644 index 0000000000..38823a5888 --- /dev/null +++ b/tests/bits/data_out_stack_02.cc @@ -0,0 +1,84 @@ +//---------------------------- data_out_stack_01.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2003, 2004 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_02.cc --------------------------- + +#include "../tests.h" +#include "data_out_common.cc" +#include +#include + + +std::string output_file_name = "data_out_stack_02.output"; + + +template +void +check_this (const DoFHandler &dof_handler, + const Vector &v_node, + const Vector &v_cell) +{ + // 3d would generate 4d data, which + // we don't presently support + // + // output for 2d+time is not + // presently implemented + if (dim > 1) + return; + + DataOutStack data_out_stack; + data_out_stack.declare_data_vector ("node_data", + DataOutStack::dof_vector); + data_out_stack.declare_data_vector ("cell_data", + DataOutStack::cell_vector); + + + data_out_stack.new_parameter_value (1., 1.); + data_out_stack.attach_dof_handler (dof_handler); + + std::vector names_1, names_2; + names_1.push_back ("node_data"); + names_2.push_back ("cell_data"); + data_out_stack.add_data_vector (v_node, names_1); + data_out_stack.add_data_vector (v_cell, names_2); + data_out_stack.build_patches (); + data_out_stack.finish_parameter_value (); + + Vector vn1 (v_node.size()); + vn1 = v_node; + vn1 *= 2.; + Vector vc1 (v_cell.size()); + vc1 = v_cell; + vc1 *= 3.; + data_out_stack.new_parameter_value (1., 1.); + data_out_stack.attach_dof_handler (dof_handler); + data_out_stack.add_data_vector (vn1, names_1); + data_out_stack.add_data_vector (vc1, names_2); + data_out_stack.build_patches (); + data_out_stack.finish_parameter_value (); + + data_out_stack.write_dx (deallog.get_file_stream()); + data_out_stack.write_ucd (deallog.get_file_stream()); + data_out_stack.write_gmv (deallog.get_file_stream()); + data_out_stack.write_tecplot (deallog.get_file_stream()); + data_out_stack.write_vtk (deallog.get_file_stream()); + data_out_stack.write_gnuplot (deallog.get_file_stream()); + + // the following is only + // implemented for 2d (=1d+time) + if (dim == 1) + { + data_out_stack.write_povray (deallog.get_file_stream()); + data_out_stack.write_eps (deallog.get_file_stream()); + } +} + +