From: Wolfgang Bangerth Date: Tue, 1 Jun 2010 21:17:48 +0000 (+0000) Subject: New test. X-Git-Tag: v8.0.0~6092 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=473b99fc9f97d788511bc16886ff6a89a8836df0;p=dealii.git New test. git-svn-id: https://svn.dealii.org/trunk@21142 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/base/data_out_base_pvtu.cc b/tests/base/data_out_base_pvtu.cc new file mode 100644 index 0000000000..cdf834a7d0 --- /dev/null +++ b/tests/base/data_out_base_pvtu.cc @@ -0,0 +1,79 @@ +//----------------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2006, 2007, 2010 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. +// +//----------------------------------------------------------------------------- + +// write the pvtu master record for parallel visualization through the +// vtu file format + +#include "../tests.h" +#include +#include + +#include +#include +#include +#include +#include + +#include "patches.h" + + + +std::vector > patches; +std::vector names; + +class DataOutX : public DataOutInterface<2,2> +{ + virtual + const std::vector< ::DataOutBase::Patch<2,2> > & + get_patches () const + { + return patches; + } + + virtual + std::vector + get_dataset_names () const + { + return names; + } +}; + + +template +void check(std::ostream& out) +{ + const unsigned int np = 4; + patches.resize (np); + + create_patches(patches); + + names.resize (5); + names[0] = "x1"; + names[1] = "x2"; + names[2] = "x3"; + names[3] = "x4"; + names[4] = "i"; + + std::vector filenames = names; + + DataOutX x; + x.write_pvtu_record (out, filenames); +} + + + +int main() +{ + std::ofstream logfile("data_out_base_pvtu/output"); + check<2,2>(logfile); +} diff --git a/tests/base/data_out_base_pvtu/cmp/generic b/tests/base/data_out_base_pvtu/cmp/generic new file mode 100644 index 0000000000..991bbf0c21 --- /dev/null +++ b/tests/base/data_out_base_pvtu/cmp/generic @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + +