]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add a test that used to fail on some systems due to uninstantiated symbols.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 26 Feb 2004 19:31:58 +0000 (19:31 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 26 Feb 2004 19:31:58 +0000 (19:31 +0000)
git-svn-id: https://svn.dealii.org/trunk@8575 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/Makefile
tests/bits/data_out_stack_02.cc [new file with mode: 0644]

index 5199180e4f445cdf9339730ce0064048b632cf82..b59cdf21f7fa0bad7e380a2a713210dac4c1eeb9 100644 (file)
@@ -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 (file)
index 0000000..38823a5
--- /dev/null
@@ -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 <lac/sparsity_pattern.h>
+#include <numerics/data_out_stack.h>
+
+
+std::string output_file_name = "data_out_stack_02.output";
+
+
+template <int dim>
+void
+check_this (const DoFHandler<dim> &dof_handler,
+            const Vector<double>  &v_node,
+            const Vector<double>  &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<dim> data_out_stack;
+  data_out_stack.declare_data_vector ("node_data",
+                                      DataOutStack<dim>::dof_vector);
+  data_out_stack.declare_data_vector ("cell_data",
+                                      DataOutStack<dim>::cell_vector);
+  
+  
+  data_out_stack.new_parameter_value (1., 1.);
+  data_out_stack.attach_dof_handler (dof_handler);
+
+  std::vector<std::string> 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<double> vn1 (v_node.size());
+  vn1 = v_node;
+  vn1 *= 2.;
+  Vector<double> 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());
+    }  
+}
+
+

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.