]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Instantiate output for zero dim.
authorRene Gassmoeller <rene.gassmoeller@mailbox.org>
Tue, 18 Jul 2017 17:04:51 +0000 (11:04 -0600)
committerRene Gassmoeller <rene.gassmoeller@mailbox.org>
Fri, 21 Jul 2017 20:31:06 +0000 (14:31 -0600)
15 files changed:
cmake/config/template-arguments.in
doc/news/changes/minor/20170718ReneGassmoeller [new file with mode: 0644]
include/deal.II/base/data_out_base.h
include/deal.II/base/geometry_info.h
include/deal.II/base/utilities.h
source/base/data_out_base.cc
source/base/data_out_base.inst.in
tests/base/data_out_base_gnuplot_02.cc [new file with mode: 0644]
tests/base/data_out_base_gnuplot_02.output [new file with mode: 0644]
tests/base/data_out_base_vtk_02.cc [new file with mode: 0644]
tests/base/data_out_base_vtk_02.output [new file with mode: 0644]
tests/base/data_out_base_vtu_02.cc [new file with mode: 0644]
tests/base/data_out_base_vtu_02.with_zlib=true.output [new file with mode: 0644]
tests/mpi/data_out_hdf5_02.cc [new file with mode: 0644]
tests/mpi/data_out_hdf5_02.with_hdf5=true.mpirun=1.output [new file with mode: 0644]

index 7946207164c45e6b23da375e222b41df01a5e327..cd7ce395599a8b75653ec3c98ee99496c4289804 100644 (file)
@@ -152,7 +152,10 @@ SPARSITY_PATTERNS := { SparsityPattern;
 // all supported logical dimensions
 DIMENSIONS := { 1; 2; 3 }
 
-// all supported spacial dimensions
+// all supported output dimensions
+OUTPUT_DIMENSIONS := { 0; 1; 2; 3 }
+
+// all supported spatial dimensions
 SPACE_DIMENSIONS := { 1; 2; 3 }
 
 // all ranks used for instantiating tensors
diff --git a/doc/news/changes/minor/20170718ReneGassmoeller b/doc/news/changes/minor/20170718ReneGassmoeller
new file mode 100644 (file)
index 0000000..88503cc
--- /dev/null
@@ -0,0 +1,6 @@
+New: DataOutBase now supports writing zero-dimensional
+data in a higher spatial dimension (e.g. vertices, quadrature points, particles)
+for a number of output formats (vtu,vtk,gnuplot,hdf5). A consequence of the
+change is that HDF5 now in general supports output for dim<spacedim.
+<br>
+(Rene Gassmoeller, 2017/07/18)
index b7a2aee1b2479ab20eec7eddb0e6bc65e5c82d00..7f4424663ceca724b1ca06897000a2cd8b3b8035 100644 (file)
@@ -260,7 +260,8 @@ namespace DataOutBase
      * Numbers of neighbors of a patch.  OpenDX format requires neighbor
      * information for advanced output. Here the neighborship relationship of
      * patches is stored. During output, this must be transformed into
-     * neighborship of sub-grid cells.
+     * neighborship of sub-grid cells. For dim==0 we still allow one
+     * neighbor, to avoid compiler warnings about zero-sized arrays.
      */
     unsigned int neighbors[dim > 0
                            ?
@@ -2826,47 +2827,57 @@ private:
 
 
 /**
- * A class to store relevant data to use when writing the light data XDMF
- * file. This should only contain valid data on the root node which writes the
- * files, the rest of the nodes will have valid set to false. The XDMF file in
- * turn points to heavy data files (such as HDF5) where the actual simulation
- * data is stored. This allows flexibility in arranging the data, and also
+ * A class to store relevant data to use when writing a lightweight XDMF
+ * file. The XDMF file in turn points to heavy data files (such as HDF5)
+ * where the actual simulation data is stored.
+ * This allows flexibility in arranging the data, and also
  * allows the mesh to be separated from the point data.
  */
 class XDMFEntry
 {
-private:
-  /// Whether this entry is valid and contains data to be written
-  bool                                valid;
-  /// The name of the HDF5 heavy data solution and/or mesh files this entry references
-  std::string                         h5_sol_filename, h5_mesh_filename;
-  /// The simulation time associated with this entry
-  double                              entry_time;
-  /// The number of nodes, cells and dimensionality associated with the data
-  unsigned int                        num_nodes, num_cells, dimension;
-  /// The attributes associated with this entry and their dimension
-  std::map<std::string, unsigned int> attribute_dims;
+public:
+  /**
+   * Default constructor that creates an invalid object.
+   */
+  XDMFEntry();
 
-  /// Small function to create indentation for XML file
-  std::string indent(const unsigned int indent_level) const
-  {
-    std::string res = "";
-    for (unsigned int i=0; i<indent_level; ++i) res += "  ";
-    return res;
-  }
+  /**
+   * Simplified constructor that calls the complete constructor for
+   * cases where <code>solution_filename == mesh_filename</code>, and
+   * <code>dim==spacedim</code>.
+   */
+  XDMFEntry(const std::string filename,
+            const double time,
+            const unsigned int nodes,
+            const unsigned int cells,
+            const unsigned int dim);
 
-public:
-  XDMFEntry() : valid(false) {};
-  XDMFEntry(const std::string filename, const double time, const unsigned int nodes, const unsigned int cells, const unsigned int dim) : valid(true), h5_sol_filename(filename), h5_mesh_filename(filename), entry_time(time), num_nodes(nodes), num_cells(cells), dimension(dim) {};
-  XDMFEntry(const std::string mesh_filename, const std::string solution_filename, const double time, const unsigned int nodes, const unsigned int cells, const unsigned int dim) : valid(true), h5_sol_filename(solution_filename), h5_mesh_filename(mesh_filename), entry_time(time), num_nodes(nodes), num_cells(cells), dimension(dim) {};
+  /**
+   * Simplified constructor that calls the complete constructor for
+   * cases where <code>dim==spacedim</code>.
+   */
+  XDMFEntry(const std::string mesh_filename,
+            const std::string solution_filename,
+            const double time,
+            const unsigned int nodes,
+            const unsigned int cells,
+            const unsigned int dim);
+
+  /**
+   * Constructor that sets all members to provided parameters.
+   */
+  XDMFEntry(const std::string mesh_filename,
+            const std::string solution_filename,
+            const double time,
+            const unsigned int nodes,
+            const unsigned int cells,
+            const unsigned int dim,
+            const unsigned int spacedim);
 
   /**
    * Record an attribute and associated dimensionality.
    */
-  void add_attribute(const std::string &attr_name, const unsigned int dimension)
-  {
-    attribute_dims[attr_name] = dimension;
-  }
+  void add_attribute(const std::string &attr_name, const unsigned int dimension);
 
   /**
    * Read or write the data of this object for serialization
@@ -2884,9 +2895,58 @@ public:
     &attribute_dims;
   }
 
-  /// Get the XDMF content associated with this entry.
-  /// If the entry is not valid, this returns an empty string.
+  /**
+   * Get the XDMF content associated with this entry.
+   * If the entry is not valid, this returns an empty string.
+   */
   std::string get_xdmf_content(const unsigned int indent_level) const;
+
+private:
+  /**
+   * Whether this entry is valid and contains data to be written.
+   */
+  const bool valid;
+
+  /**
+   * The name of the HDF5 heavy data solution file this entry references.
+   */
+  const std::string h5_sol_filename;
+
+  /**
+   * The name of the HDF5 mesh file this entry references.
+   */
+  const std::string h5_mesh_filename;
+
+  /**
+   * The simulation time associated with this entry.
+   */
+  const double entry_time;
+
+  /**
+   * The number of data nodes.
+   */
+  const unsigned int num_nodes;
+
+  /**
+   * The number of data cells.
+   */
+  const unsigned int num_cells;
+
+  /**
+   * The dimension associated with the data.
+   */
+  const unsigned int dimension;
+
+  /**
+   * The dimension of the space the data lives in.
+   * Note that dimension <= space_dimension.
+   */
+  const unsigned int space_dimension;
+
+  /**
+   * The attributes associated with this entry and their dimension.
+   */
+  std::map<std::string, unsigned int> attribute_dims;
 };
 
 
index 36e369d8486861c9f1957560396c589c80064ad1..caafecd2fb3bf9bf9f99d57bbbc6849c61df0451 100644 (file)
@@ -928,6 +928,40 @@ struct GeometryInfo<0>
    * Number of hexahedra of a cell.
    */
   static const unsigned int hexes_per_cell    = 0;
+
+  /**
+   * Rearrange vertices for UCD output.  For a cell being written in UCD
+   * format, each entry in this field contains the number of a vertex in
+   * <tt>deal.II</tt> that corresponds to the UCD numbering at this location.
+   *
+   * Typical example: write a cell and arrange the vertices, such that UCD
+   * understands them.
+   *
+   * @code
+   * for (i=0; i< n_vertices; ++i)
+   *   out << cell->vertex(ucd_to_deal[i]);
+   * @endcode
+   *
+   * As the vertex numbering in deal.II versions <= 5.1 happened to coincide
+   * with the UCD numbering, this field can also be used like a
+   * old_to_lexicographic mapping.
+   */
+  static constexpr unsigned int ucd_to_deal[vertices_per_cell] = {0};
+
+  /**
+   * Rearrange vertices for OpenDX output.  For a cell being written in OpenDX
+   * format, each entry in this field contains the number of a vertex in
+   * <tt>deal.II</tt> that corresponds to the DX numbering at this location.
+   *
+   * Typical example: write a cell and arrange the vertices, such that OpenDX
+   * understands them.
+   *
+   * @code
+   * for (i=0; i< n_vertices; ++i)
+   *   out << cell->vertex(dx_to_deal[i]);
+   * @endcode
+   */
+  static constexpr unsigned int dx_to_deal[vertices_per_cell] = {0};
 };
 
 
index 39a848324c5e45fbda4f43fad18fb99a12b8bfc3..e46c586d66476da3736f99c4a2aeb3fc0229aaa2 100644 (file)
@@ -597,9 +597,11 @@ namespace Utilities
   inline
   T fixed_power (const T n)
   {
-    Assert (N>0, ExcNotImplemented());
+    Assert (N>=0, ExcNotImplemented());
     switch (N)
       {
+      case 0:
+        return 1;
       case 1:
         return n;
       case 2:
index 4d2a2af3372254fe6fbc796cf032c0afea17a305..7bdb0a58d7c6dc215765e9f68917ee587063867a 100644 (file)
@@ -526,17 +526,20 @@ DataOutBase::DataOutFilter::write_cell(
   unsigned int base_entry = index * GeometryInfo<dim>::vertices_per_cell;
   vertices_per_cell = GeometryInfo<dim>::vertices_per_cell;
   internal_add_cell(base_entry+0, start);
-  internal_add_cell(base_entry+1, start+d1);
-  if (dim>=2)
+  if (dim>=1)
     {
-      internal_add_cell(base_entry+2, start+d2+d1);
-      internal_add_cell(base_entry+3, start+d2);
-      if (dim>=3)
+      internal_add_cell(base_entry+1, start+d1);
+      if (dim>=2)
         {
-          internal_add_cell(base_entry+4, start+d3);
-          internal_add_cell(base_entry+5, start+d3+d1);
-          internal_add_cell(base_entry+6, start+d3+d2+d1);
-          internal_add_cell(base_entry+7, start+d3+d2);
+          internal_add_cell(base_entry+2, start+d2+d1);
+          internal_add_cell(base_entry+3, start+d2);
+          if (dim>=3)
+            {
+              internal_add_cell(base_entry+4, start+d3);
+              internal_add_cell(base_entry+5, start+d3+d1);
+              internal_add_cell(base_entry+6, start+d3+d2+d1);
+              internal_add_cell(base_entry+7, start+d3+d2);
+            }
         }
     }
 }
@@ -581,7 +584,7 @@ namespace
 
   const char *ucd_cell_type[4] =
   {
-    "", "line", "quad", "hex"
+    "pt", "line", "quad", "hex"
   };
 
   const char *tecplot_cell_type[4] =
@@ -602,7 +605,7 @@ namespace
   // choice avoids a -Warray-bounds check warning
   const unsigned int vtk_cell_type[5] =
   {
-    0, 3, 9, 12, static_cast<unsigned int>(-1)
+    1, 3, 9, 12, static_cast<unsigned int>(-1)
   };
 
 //----------------------------------------------------------------------//
@@ -1104,19 +1107,22 @@ namespace
   {
     int nodes[1<<dim];
     nodes[GeometryInfo<dim>::dx_to_deal[0]] = start;
-    nodes[GeometryInfo<dim>::dx_to_deal[1]] = start+d1;
-    if (dim>=2)
+    if (dim>=1)
       {
-        // Add shifted line in y direction
-        nodes[GeometryInfo<dim>::dx_to_deal[2]] = start+d2;
-        nodes[GeometryInfo<dim>::dx_to_deal[3]] = start+d2+d1;
-        if (dim>=3)
+        nodes[GeometryInfo<dim>::dx_to_deal[1]] = start+d1;
+        if (dim>=2)
           {
-            // Add shifted quad in z direction
-            nodes[GeometryInfo<dim>::dx_to_deal[4]] = start+d3;
-            nodes[GeometryInfo<dim>::dx_to_deal[5]] = start+d3+d1;
-            nodes[GeometryInfo<dim>::dx_to_deal[6]] = start+d3+d2;
-            nodes[GeometryInfo<dim>::dx_to_deal[7]] = start+d3+d2+d1;
+            // Add shifted line in y direction
+            nodes[GeometryInfo<dim>::dx_to_deal[2]] = start+d2;
+            nodes[GeometryInfo<dim>::dx_to_deal[3]] = start+d2+d1;
+            if (dim>=3)
+              {
+                // Add shifted quad in z direction
+                nodes[GeometryInfo<dim>::dx_to_deal[4]] = start+d3;
+                nodes[GeometryInfo<dim>::dx_to_deal[5]] = start+d3+d1;
+                nodes[GeometryInfo<dim>::dx_to_deal[6]] = start+d3+d2;
+                nodes[GeometryInfo<dim>::dx_to_deal[7]] = start+d3+d2+d1;
+              }
           }
       }
 
@@ -1189,18 +1195,21 @@ namespace
     const unsigned int start=s+1;
     stream << gmv_cell_type[dim] << '\n';
 
-    stream << start << '\t'
-           << start+d1;
-    if (dim>=2)
+    stream << start;
+    if (dim>=1)
       {
-        stream << '\t' << start+d2+d1
-               << '\t' << start+d2;
-        if (dim>=3)
+        stream << '\t' << start+d1;
+        if (dim>=2)
           {
-            stream << '\t' << start+d3
-                   << '\t' << start+d3+d1
-                   << '\t' << start+d3+d2+d1
-                   << '\t' << start+d3+d2;
+            stream << '\t' << start+d2+d1
+                   << '\t' << start+d2;
+            if (dim>=3)
+              {
+                stream << '\t' << start+d3
+                       << '\t' << start+d3+d1
+                       << '\t' << start+d3+d2+d1
+                       << '\t' << start+d3+d2;
+              }
           }
       }
     stream << '\n';
@@ -1237,18 +1246,21 @@ namespace
   {
     const unsigned int start = s+1;
 
-    stream << start << '\t'
-           << start+d1;
-    if (dim>=2)
+    stream << start;
+    if (dim >=1)
       {
-        stream << '\t' << start+d2+d1
-               << '\t' << start+d2;
-        if (dim>=3)
+        stream << '\t' << start+d1;
+        if (dim>=2)
           {
-            stream << '\t' << start+d3
-                   << '\t' << start+d3+d1
-                   << '\t' << start+d3+d2+d1
-                   << '\t' << start+d3+d2;
+            stream << '\t' << start+d2+d1
+                   << '\t' << start+d2;
+            if (dim>=3)
+              {
+                stream << '\t' << start+d3
+                       << '\t' << start+d3+d1
+                       << '\t' << start+d3+d2+d1
+                       << '\t' << start+d3+d2;
+              }
           }
       }
     stream << '\n';
@@ -1291,19 +1303,22 @@ namespace
   {
     int nodes[1<<dim];
     nodes[GeometryInfo<dim>::ucd_to_deal[0]] = start;
-    nodes[GeometryInfo<dim>::ucd_to_deal[1]] = start+d1;
-    if (dim>=2)
+    if (dim>=1)
       {
-        // Add shifted line in y direction
-        nodes[GeometryInfo<dim>::ucd_to_deal[2]] = start+d2;
-        nodes[GeometryInfo<dim>::ucd_to_deal[3]] = start+d2+d1;
-        if (dim>=3)
+        nodes[GeometryInfo<dim>::ucd_to_deal[1]] = start+d1;
+        if (dim>=2)
           {
-            // Add shifted quad in z direction
-            nodes[GeometryInfo<dim>::ucd_to_deal[4]] = start+d3;
-            nodes[GeometryInfo<dim>::ucd_to_deal[5]] = start+d3+d1;
-            nodes[GeometryInfo<dim>::ucd_to_deal[6]] = start+d3+d2;
-            nodes[GeometryInfo<dim>::ucd_to_deal[7]] = start+d3+d2+d1;
+            // Add shifted line in y direction
+            nodes[GeometryInfo<dim>::ucd_to_deal[2]] = start+d2;
+            nodes[GeometryInfo<dim>::ucd_to_deal[3]] = start+d2+d1;
+            if (dim>=3)
+              {
+                // Add shifted quad in z direction
+                nodes[GeometryInfo<dim>::ucd_to_deal[4]] = start+d3;
+                nodes[GeometryInfo<dim>::ucd_to_deal[5]] = start+d3+d1;
+                nodes[GeometryInfo<dim>::ucd_to_deal[6]] = start+d3+d2;
+                nodes[GeometryInfo<dim>::ucd_to_deal[7]] = start+d3+d2+d1;
+              }
           }
       }
 
@@ -1366,20 +1381,23 @@ namespace
                          unsigned int d3)
   {
     stream << GeometryInfo<dim>::vertices_per_cell << '\t'
-           << start << '\t'
-           << start+d1;
-    if (dim>=2)
-      {
-        stream << '\t' << start+d2+d1
-               << '\t' << start+d2;
-        if (dim>=3)
-          {
-            stream << '\t' << start+d3
-                   << '\t' << start+d3+d1
-                   << '\t' << start+d3+d2+d1
-                   << '\t' << start+d3+d2;
-          }
-      }
+           << start;
+    if (dim>=1)
+      stream << '\t' << start+d1;
+    {
+      if (dim>=2)
+        {
+          stream << '\t' << start+d2+d1
+                 << '\t' << start+d2;
+          if (dim>=3)
+            {
+              stream << '\t' << start+d3
+                     << '\t' << start+d3+d1
+                     << '\t' << start+d3+d2+d1
+                     << '\t' << start+d3+d2;
+            }
+        }
+    }
     stream << '\n';
   }
 
@@ -1438,34 +1456,41 @@ namespace
                          unsigned int d3)
   {
 #if !defined(DEAL_II_WITH_ZLIB)
-    stream << start << '\t'
-           << start+d1;
-    if (dim>=2)
+    stream << start;
+    if (dim>=1)
       {
-        stream << '\t' << start+d2+d1
-               << '\t' << start+d2;
-        if (dim>=3)
+        stream << '\t'
+               << start+d1;
+        if (dim>=2)
           {
-            stream << '\t' << start+d3
-                   << '\t' << start+d3+d1
-                   << '\t' << start+d3+d2+d1
-                   << '\t' << start+d3+d2;
+            stream << '\t' << start+d2+d1
+                   << '\t' << start+d2;
+            if (dim>=3)
+              {
+                stream << '\t' << start+d3
+                       << '\t' << start+d3+d1
+                       << '\t' << start+d3+d2+d1
+                       << '\t' << start+d3+d2;
+              }
           }
       }
     stream << '\n';
 #else
     cells.push_back (start);
-    cells.push_back (start+d1);
-    if (dim>=2)
+    if (dim >=1)
       {
-        cells.push_back (start+d2+d1);
-        cells.push_back (start+d2);
-        if (dim>=3)
+        cells.push_back (start+d1);
+        if (dim>=2)
           {
-            cells.push_back (start+d3);
-            cells.push_back (start+d3+d1);
-            cells.push_back (start+d3+d2+d1);
-            cells.push_back (start+d3+d2);
+            cells.push_back (start+d2+d1);
+            cells.push_back (start+d2);
+            if (dim>=3)
+              {
+                cells.push_back (start+d3);
+                cells.push_back (start+d3+d1);
+                cells.push_back (start+d3+d2+d1);
+                cells.push_back (start+d3+d2);
+              }
           }
       }
 #endif
@@ -2564,6 +2589,10 @@ namespace DataOutBase
                   const UcdFlags                          &flags,
                   std::ostream                            &out)
   {
+    // Note that while in theory dim==0 should be implemented,
+    // this is not tested, therefore currently not allowed.
+    AssertThrow (dim>0, ExcNotImplemented());
+
     AssertThrow (out, ExcIO());
 
 #ifndef DEAL_II_WITH_MPI
@@ -2655,6 +2684,9 @@ namespace DataOutBase
                  const DXFlags                           &flags,
                  std::ostream                            &out)
   {
+    // Point output is currently not implemented.
+    AssertThrow (dim>0, ExcNotImplemented());
+
     AssertThrow (out, ExcIO());
 
 #ifndef DEAL_II_WITH_MPI
@@ -2769,6 +2801,13 @@ namespace DataOutBase
                     const unsigned int ny = i2*dy;
                     const unsigned int nz = i3*dz;
 
+                    // There are no neighbors for dim==0.
+                    // Note that this case is caught by the
+                    // AssertThrow at the beginning of this function anyway.
+                    // This condition avoids compiler warnings.
+                    if (dim<1)
+                      continue;
+
                     out << '\n';
                     // Direction -x
                     // Last cell in row
@@ -3898,6 +3937,12 @@ namespace DataOutBase
                   const GmvFlags                          &flags,
                   std::ostream                            &out)
   {
+    // The gmv format does not support cells that only consist
+    // of a single point. It does support the output of point data
+    // using the keyword 'tracers' instead of 'nodes' and 'cells',
+    // but this output format is currently not implemented.
+    AssertThrow (dim>0, ExcNotImplemented());
+
     Assert(dim<=3, ExcNotImplemented());
     AssertThrow (out, ExcIO());
 
@@ -4055,6 +4100,11 @@ namespace DataOutBase
   {
     AssertThrow (out, ExcIO());
 
+    // The FEBLOCK or FEPOINT formats of tecplot only allows full elements
+    // (e.g. triangles), not single points. Other tecplot format allow
+    // point output, but they are currently not implemented.
+    AssertThrow (dim>0, ExcNotImplemented());
+
 #ifndef DEAL_II_WITH_MPI
     // verify that there are indeed
     // patches to be written out. most
@@ -4296,6 +4346,10 @@ namespace DataOutBase
                              const TecplotFlags                      &flags,
                              std::ostream                            &out)
   {
+    // The FEBLOCK or FEPOINT formats of tecplot only allows full elements
+    // (e.g. triangles), not single points. Other tecplot format allow
+    // point output, but they are currently not implemented.
+    AssertThrow (dim>0, ExcNotImplemented());
 
 #ifndef DEAL_II_HAVE_TECPLOT
 
@@ -6508,7 +6562,7 @@ create_xdmf_entry (const DataOutBase::DataOutFilter &data_filter,
   // Output the XDMF file only on the root process
   if (myrank == 0)
     {
-      XDMFEntry       entry(h5_mesh_filename, h5_solution_filename, cur_time, global_node_cell_count[0], global_node_cell_count[1], dim);
+      XDMFEntry       entry(h5_mesh_filename, h5_solution_filename, cur_time, global_node_cell_count[0], global_node_cell_count[1], dim, spacedim);
       unsigned int  n_data_sets = data_filter.n_data_sets();
 
       // The vector names generated here must match those generated in the HDF5 file
@@ -6532,7 +6586,7 @@ write_xdmf_file (const std::vector<XDMFEntry> &entries,
                  const std::string &filename,
                  MPI_Comm comm) const
 {
-  int             myrank;
+  int myrank;
 
 #ifdef DEAL_II_WITH_MPI
   const int ierr = MPI_Comm_rank(comm, &myrank);
@@ -6567,54 +6621,6 @@ write_xdmf_file (const std::vector<XDMFEntry> &entries,
 }
 
 
-/*
- * Get the XDMF content associated with this entry.
- * If the entry is not valid, this returns an empty string.
- */
-std::string XDMFEntry::get_xdmf_content(const unsigned int indent_level) const
-{
-  std::stringstream   ss;
-  std::map<std::string, unsigned int>::const_iterator     it;
-
-  if (!valid) return "";
-
-  ss << indent(indent_level+0) << "<Grid Name=\"mesh\" GridType=\"Uniform\">\n";
-  ss << indent(indent_level+1) << "<Time Value=\"" << entry_time << "\"/>\n";
-  ss << indent(indent_level+1) << "<Geometry GeometryType=\"" << (dimension == 2 ? "XY" : "XYZ" ) << "\">\n";
-  ss << indent(indent_level+2) << "<DataItem Dimensions=\"" << num_nodes << " " << dimension << "\" NumberType=\"Float\" Precision=\"8\" Format=\"HDF\">\n";
-  ss << indent(indent_level+3) << h5_mesh_filename << ":/nodes\n";
-  ss << indent(indent_level+2) << "</DataItem>\n";
-  ss << indent(indent_level+1) << "</Geometry>\n";
-  // If we have cells defined, use a quadrilateral (2D) or hexahedron (3D) topology
-  if (num_cells > 0)
-    {
-      ss << indent(indent_level+1) << "<Topology TopologyType=\"" << (dimension == 2 ? "Quadrilateral" : "Hexahedron") << "\" NumberOfElements=\"" << num_cells << "\">\n";
-      ss << indent(indent_level+2) << "<DataItem Dimensions=\"" << num_cells << " " << (2 << (dimension-1)) << "\" NumberType=\"UInt\" Format=\"HDF\">\n";
-      ss << indent(indent_level+3) << h5_mesh_filename << ":/cells\n";
-      ss << indent(indent_level+2) << "</DataItem>\n";
-      ss << indent(indent_level+1) << "</Topology>\n";
-    }
-  else
-    {
-      // Otherwise, we assume the points are isolated in space and use a Polyvertex topology
-      ss << indent(indent_level+1) << "<Topology TopologyType=\"Polyvertex\" NumberOfElements=\"" << num_nodes << "\">\n";
-      ss << indent(indent_level+1) << "</Topology>\n";
-    }
-
-  for (it=attribute_dims.begin(); it!=attribute_dims.end(); ++it)
-    {
-      ss << indent(indent_level+1) << "<Attribute Name=\"" << it->first << "\" AttributeType=\"" << (it->second > 1 ? "Vector" : "Scalar") << "\" Center=\"Node\">\n";
-      // Vectors must have 3 elements even for 2D models
-      ss << indent(indent_level+2) << "<DataItem Dimensions=\"" << num_nodes << " " << (it->second > 1 ? 3 : 1) << "\" NumberType=\"Float\" Precision=\"8\" Format=\"HDF\">\n";
-      ss << indent(indent_level+3) << h5_sol_filename << ":/" << it->first << "\n";
-      ss << indent(indent_level+2) << "</DataItem>\n";
-      ss << indent(indent_level+1) << "</Attribute>\n";
-    }
-
-  ss << indent(indent_level+0) << "</Grid>\n";
-
-  return ss.str();
-}
 
 /*
  * Write the data in this DataOutInterface to a DataOutFilter object.
@@ -6766,6 +6772,11 @@ void DataOutBase::write_hdf5_parallel (const std::vector<Patch<dim,spacedim> > &
                                        const std::string &solution_filename,
                                        MPI_Comm comm)
 {
+
+  AssertThrow(spacedim>=2,
+              ExcMessage("DataOutBase was asked to write HDF5 output for a space dimension of 1. "
+                         "HDF5 only supports datasets that live in 2 or 3 dimensions."));
+
   int ierr;
   (void)ierr;
 #ifndef DEAL_II_WITH_HDF5
@@ -6861,8 +6872,9 @@ void DataOutBase::write_hdf5_parallel (const std::vector<Patch<dim,spacedim> > &
       AssertThrow(h5_mesh_file_id >= 0, ExcIO());
 
       // Create the dataspace for the nodes and cells
+      // HDF5 only supports 2- or 3-dimensional coordinates
       node_ds_dim[0] = global_node_cell_count[0];
-      node_ds_dim[1] = dim;
+      node_ds_dim[1] = (spacedim<2) ? 2 : spacedim;
       node_dataspace = H5Screate_simple(2, node_ds_dim, NULL);
       AssertThrow(node_dataspace >= 0, ExcIO());
 
@@ -6892,10 +6904,13 @@ void DataOutBase::write_hdf5_parallel (const std::vector<Patch<dim,spacedim> > &
       AssertThrow(status >= 0, ExcIO());
 
       // Create the data subset we'll use to read from memory
+      // HDF5 only supports 2- or 3-dimensional coordinates
       count[0] = local_node_cell_count[0];
-      count[1] = dim;
+      count[1] = (spacedim<2) ? 2 : spacedim;
+
       offset[0] = global_node_cell_offsets[0];
       offset[1] = 0;
+
       node_memory_dataspace = H5Screate_simple(2, count, NULL);
       AssertThrow(node_memory_dataspace >= 0, ExcIO());
 
@@ -7547,6 +7562,156 @@ DataOutReader<dim,spacedim>::get_vector_data_ranges () const
 
 
 
+// ---------------------------------------------- XDMFEntry ----------
+
+XDMFEntry::XDMFEntry()
+  :
+  valid(false),
+  h5_sol_filename(""),
+  h5_mesh_filename(""),
+  entry_time(0.0),
+  num_nodes(numbers::invalid_unsigned_int),
+  num_cells(numbers::invalid_unsigned_int),
+  dimension(numbers::invalid_unsigned_int),
+  space_dimension(numbers::invalid_unsigned_int)
+{}
+
+
+
+XDMFEntry::XDMFEntry(const std::string filename,
+                     const double time,
+                     const unsigned int nodes,
+                     const unsigned int cells,
+                     const unsigned int dim)
+  :
+  XDMFEntry(filename,
+            filename,
+            time,
+            nodes,
+            cells,
+            dim,
+            dim)
+{}
+
+
+
+XDMFEntry::XDMFEntry(const std::string mesh_filename,
+                     const std::string solution_filename,
+                     const double time,
+                     const unsigned int nodes,
+                     const unsigned int cells,
+                     const unsigned int dim)
+  :
+  XDMFEntry(mesh_filename,
+            solution_filename,
+            time,
+            nodes,
+            cells,
+            dim,
+            dim)
+{}
+
+
+
+XDMFEntry::XDMFEntry(const std::string mesh_filename,
+                     const std::string solution_filename,
+                     const double time,
+                     const unsigned int nodes,
+                     const unsigned int cells,
+                     const unsigned int dim,
+                     const unsigned int spacedim)
+  :
+  valid(true),
+  h5_sol_filename(solution_filename),
+  h5_mesh_filename(mesh_filename),
+  entry_time(time),
+  num_nodes(nodes),
+  num_cells(cells),
+  dimension(dim),
+  space_dimension(spacedim)
+{}
+
+
+
+void
+XDMFEntry::add_attribute(const std::string &attr_name, const unsigned int dimension)
+{
+  attribute_dims[attr_name] = dimension;
+}
+
+
+
+namespace
+{
+  /**
+   * Small function to create indentation for XML file.
+   */
+  std::string indent(const unsigned int indent_level)
+  {
+    std::string res = "";
+    for (unsigned int i=0; i<indent_level; ++i)
+      res += "  ";
+    return res;
+  }
+}
+
+
+
+std::string XDMFEntry::get_xdmf_content(const unsigned int indent_level) const
+{
+  if (!valid)
+    return "";
+
+  std::stringstream   ss;
+  ss << indent(indent_level+0) << "<Grid Name=\"mesh\" GridType=\"Uniform\">\n";
+  ss << indent(indent_level+1) << "<Time Value=\"" << entry_time << "\"/>\n";
+  ss << indent(indent_level+1) << "<Geometry GeometryType=\"" << (space_dimension <= 2 ? "XY" : "XYZ" ) << "\">\n";
+  ss << indent(indent_level+2) << "<DataItem Dimensions=\"" << num_nodes << " " << (space_dimension <= 2 ? 2 : space_dimension) << "\" NumberType=\"Float\" Precision=\"8\" Format=\"HDF\">\n";
+  ss << indent(indent_level+3) << h5_mesh_filename << ":/nodes\n";
+  ss << indent(indent_level+2) << "</DataItem>\n";
+  ss << indent(indent_level+1) << "</Geometry>\n";
+  // If we have cells defined, use the topology corresponding to the dimension
+  if (num_cells > 0)
+    {
+      if (dimension == 0)
+        ss << indent(indent_level+1) << "<Topology TopologyType=\"" << "Polyvertex"   << "\" NumberOfElements=\"" << num_cells << "\" NodesPerElement=\"1\">\n";
+      else if (dimension == 1)
+        ss << indent(indent_level+1) << "<Topology TopologyType=\"" << "Polyline"     << "\" NumberOfElements=\"" << num_cells << "\" NodesPerElement=\"2\">\n";
+      else if (dimension == 2)
+        ss << indent(indent_level+1) << "<Topology TopologyType=\"" << "Quadrilateral"<< "\" NumberOfElements=\"" << num_cells << "\">\n";
+      else if (dimension == 3)
+        ss << indent(indent_level+1) << "<Topology TopologyType=\"" << "Hexahedron"   << "\" NumberOfElements=\"" << num_cells << "\">\n";
+
+      ss << indent(indent_level+2) << "<DataItem Dimensions=\"" << num_cells << " " << (1 << dimension) << "\" NumberType=\"UInt\" Format=\"HDF\">\n";
+      ss << indent(indent_level+3) << h5_mesh_filename << ":/cells\n";
+      ss << indent(indent_level+2) << "</DataItem>\n";
+      ss << indent(indent_level+1) << "</Topology>\n";
+    }
+  // Otherwise, we assume the points are isolated in space and use a Polyvertex topology
+  else
+    {
+      ss << indent(indent_level+1) << "<Topology TopologyType=\"Polyvertex\" NumberOfElements=\"" << num_nodes << "\">\n";
+      ss << indent(indent_level+1) << "</Topology>\n";
+    }
+
+  for (std::map<std::string, unsigned int>::const_iterator it=attribute_dims.begin();
+       it!=attribute_dims.end(); ++it)
+    {
+      ss << indent(indent_level+1) << "<Attribute Name=\"" << it->first << "\" AttributeType=\"" << (it->second > 1 ? "Vector" : "Scalar") << "\" Center=\"Node\">\n";
+      // Vectors must have 3 elements even for 2D models
+      ss << indent(indent_level+2) << "<DataItem Dimensions=\"" << num_nodes << " " << (it->second > 1 ? 3 : 1) << "\" NumberType=\"Float\" Precision=\"8\" Format=\"HDF\">\n";
+      ss << indent(indent_level+3) << h5_sol_filename << ":/" << it->first << "\n";
+      ss << indent(indent_level+2) << "</DataItem>\n";
+      ss << indent(indent_level+1) << "</Attribute>\n";
+    }
+
+  ss << indent(indent_level+0) << "</Grid>\n";
+
+  return ss.str();
+}
+
+
+
 namespace DataOutBase
 {
   template <int dim, int spacedim>
index 6bc448402a05395063ff3848495a153683654e9e..2e9653f29b4ef7f98ea4ce6f879f7dd817611902 100644 (file)
@@ -14,7 +14,7 @@
 // ---------------------------------------------------------------------
 
 
-for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS)
+for (deal_II_dimension : OUTPUT_DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS)
 {
 #if deal_II_dimension <= deal_II_space_dimension
     template class DataOutInterface<deal_II_dimension, deal_II_space_dimension>;
@@ -130,6 +130,13 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension :  SPACE_DIMENSIONS
                                 const std::vector<std::tuple<unsigned int, unsigned int, std::string> > &vector_data_ranges,
                                 const Deal_II_IntermediateFlags                          &flags,
                                 std::ostream                            &out);
+
+    template
+    void
+    write_hdf5_parallel (const std::vector<Patch<deal_II_dimension,deal_II_space_dimension> > &patches,
+                         const DataOutFilter &data_filter,
+                         const std::string &filename,
+                         MPI_Comm comm);
     \}
 #endif
 }
diff --git a/tests/base/data_out_base_gnuplot_02.cc b/tests/base/data_out_base_gnuplot_02.cc
new file mode 100644 (file)
index 0000000..1ca8816
--- /dev/null
@@ -0,0 +1,87 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2006 - 2017 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+// Identical to data_out_base_gnuplot, but checks output of zero-dimensional
+// features in a higher dimensional space
+
+#include "../tests.h"
+#include <deal.II/base/data_out_base.h>
+#include <deal.II/base/logstream.h>
+
+#include <vector>
+#include <iomanip>
+#include <fstream>
+#include <string>
+
+#include "patches.h"
+
+// Output data on repetitions of the unit hypercube
+
+// define this as 1 to get output into a separate file for each testcase
+#define SEPARATE_FILES 0
+
+
+template <int dim, int spacedim>
+void check(DataOutBase::GnuplotFlags flags,
+           std::ostream &out)
+{
+  const unsigned int np = 4;
+
+  std::vector<DataOutBase::Patch<dim, spacedim> > patches(np);
+
+  create_patches(patches);
+
+  std::vector<std::string> names(5);
+  names[0] = "x1";
+  names[1] = "x2";
+  names[2] = "x3";
+  names[3] = "x4";
+  names[4] = "i";
+  std::vector<std::tuple<unsigned int, unsigned int, std::string> > vectors;
+  DataOutBase::write_gnuplot(patches, names, vectors, flags, out);
+}
+
+
+template <int dim, int spacedim>
+void check_all(std::ostream &log)
+{
+#if SEPARATE_FILES == 0
+  std::ostream &out = log;
+#endif
+
+  char name[100];
+  const char *format = "%d%d.gnuplot";
+  DataOutBase::GnuplotFlags flags;
+  for (unsigned int i=0; i<5; ++i)
+    {
+      sprintf(name, format, dim, spacedim, "");
+#if SEPARATE_FILES==1
+      std::ofstream out(name);
+#else
+      out << "==============================\n"
+          << name
+          << "\n==============================\n";
+#endif
+      check<dim,spacedim>(flags, out);
+    }
+}
+
+int main()
+{
+  std::ofstream logfile("output");
+  check_all<0,1>(logfile);
+  check_all<0,2>(logfile);
+  check_all<0,3>(logfile);
+}
diff --git a/tests/base/data_out_base_gnuplot_02.output b/tests/base/data_out_base_gnuplot_02.output
new file mode 100644 (file)
index 0000000..3cdc804
--- /dev/null
@@ -0,0 +1,270 @@
+==============================
+01.gnuplot
+==============================
+# This file was generated by the deal.II library.
+
+
+#
+# For a description of the GNUPLOT format see the GNUPLOT manual.
+#
+# <x> <x1> <x2> <x3> <x4> <i> 
+0 0 0 0 0 0 
+
+1 1 1 1 1 0 
+
+2 2 2 2 2 0 
+
+3 3 3 3 3 0 
+
+==============================
+01.gnuplot
+==============================
+# This file was generated by the deal.II library.
+
+
+#
+# For a description of the GNUPLOT format see the GNUPLOT manual.
+#
+# <x> <x1> <x2> <x3> <x4> <i> 
+0 0 0 0 0 0 
+
+1 1 1 1 1 0 
+
+2 2 2 2 2 0 
+
+3 3 3 3 3 0 
+
+==============================
+01.gnuplot
+==============================
+# This file was generated by the deal.II library.
+
+
+#
+# For a description of the GNUPLOT format see the GNUPLOT manual.
+#
+# <x> <x1> <x2> <x3> <x4> <i> 
+0 0 0 0 0 0 
+
+1 1 1 1 1 0 
+
+2 2 2 2 2 0 
+
+3 3 3 3 3 0 
+
+==============================
+01.gnuplot
+==============================
+# This file was generated by the deal.II library.
+
+
+#
+# For a description of the GNUPLOT format see the GNUPLOT manual.
+#
+# <x> <x1> <x2> <x3> <x4> <i> 
+0 0 0 0 0 0 
+
+1 1 1 1 1 0 
+
+2 2 2 2 2 0 
+
+3 3 3 3 3 0 
+
+==============================
+01.gnuplot
+==============================
+# This file was generated by the deal.II library.
+
+
+#
+# For a description of the GNUPLOT format see the GNUPLOT manual.
+#
+# <x> <x1> <x2> <x3> <x4> <i> 
+0 0 0 0 0 0 
+
+1 1 1 1 1 0 
+
+2 2 2 2 2 0 
+
+3 3 3 3 3 0 
+
+==============================
+02.gnuplot
+==============================
+# This file was generated by the deal.II library.
+
+
+#
+# For a description of the GNUPLOT format see the GNUPLOT manual.
+#
+# <x> <y> <x1> <x2> <x3> <x4> <i> 
+0 0 0 0 0 0 0 
+
+1 1 1 1 1 1 0 
+
+2 2 2 2 2 2 0 
+
+3 3 3 3 3 3 0 
+
+==============================
+02.gnuplot
+==============================
+# This file was generated by the deal.II library.
+
+
+#
+# For a description of the GNUPLOT format see the GNUPLOT manual.
+#
+# <x> <y> <x1> <x2> <x3> <x4> <i> 
+0 0 0 0 0 0 0 
+
+1 1 1 1 1 1 0 
+
+2 2 2 2 2 2 0 
+
+3 3 3 3 3 3 0 
+
+==============================
+02.gnuplot
+==============================
+# This file was generated by the deal.II library.
+
+
+#
+# For a description of the GNUPLOT format see the GNUPLOT manual.
+#
+# <x> <y> <x1> <x2> <x3> <x4> <i> 
+0 0 0 0 0 0 0 
+
+1 1 1 1 1 1 0 
+
+2 2 2 2 2 2 0 
+
+3 3 3 3 3 3 0 
+
+==============================
+02.gnuplot
+==============================
+# This file was generated by the deal.II library.
+
+
+#
+# For a description of the GNUPLOT format see the GNUPLOT manual.
+#
+# <x> <y> <x1> <x2> <x3> <x4> <i> 
+0 0 0 0 0 0 0 
+
+1 1 1 1 1 1 0 
+
+2 2 2 2 2 2 0 
+
+3 3 3 3 3 3 0 
+
+==============================
+02.gnuplot
+==============================
+# This file was generated by the deal.II library.
+
+
+#
+# For a description of the GNUPLOT format see the GNUPLOT manual.
+#
+# <x> <y> <x1> <x2> <x3> <x4> <i> 
+0 0 0 0 0 0 0 
+
+1 1 1 1 1 1 0 
+
+2 2 2 2 2 2 0 
+
+3 3 3 3 3 3 0 
+
+==============================
+03.gnuplot
+==============================
+# This file was generated by the deal.II library.
+
+
+#
+# For a description of the GNUPLOT format see the GNUPLOT manual.
+#
+# <x> <y> <z> <x1> <x2> <x3> <x4> <i> 
+0 0 0 0 0 0 0 0 
+
+1 1 1 1 1 1 1 0 
+
+2 2 2 2 2 2 2 0 
+
+3 3 3 3 3 3 3 0 
+
+==============================
+03.gnuplot
+==============================
+# This file was generated by the deal.II library.
+
+
+#
+# For a description of the GNUPLOT format see the GNUPLOT manual.
+#
+# <x> <y> <z> <x1> <x2> <x3> <x4> <i> 
+0 0 0 0 0 0 0 0 
+
+1 1 1 1 1 1 1 0 
+
+2 2 2 2 2 2 2 0 
+
+3 3 3 3 3 3 3 0 
+
+==============================
+03.gnuplot
+==============================
+# This file was generated by the deal.II library.
+
+
+#
+# For a description of the GNUPLOT format see the GNUPLOT manual.
+#
+# <x> <y> <z> <x1> <x2> <x3> <x4> <i> 
+0 0 0 0 0 0 0 0 
+
+1 1 1 1 1 1 1 0 
+
+2 2 2 2 2 2 2 0 
+
+3 3 3 3 3 3 3 0 
+
+==============================
+03.gnuplot
+==============================
+# This file was generated by the deal.II library.
+
+
+#
+# For a description of the GNUPLOT format see the GNUPLOT manual.
+#
+# <x> <y> <z> <x1> <x2> <x3> <x4> <i> 
+0 0 0 0 0 0 0 0 
+
+1 1 1 1 1 1 1 0 
+
+2 2 2 2 2 2 2 0 
+
+3 3 3 3 3 3 3 0 
+
+==============================
+03.gnuplot
+==============================
+# This file was generated by the deal.II library.
+
+
+#
+# For a description of the GNUPLOT format see the GNUPLOT manual.
+#
+# <x> <y> <z> <x1> <x2> <x3> <x4> <i> 
+0 0 0 0 0 0 0 0 
+
+1 1 1 1 1 1 1 0 
+
+2 2 2 2 2 2 2 0 
+
+3 3 3 3 3 3 3 0 
+
diff --git a/tests/base/data_out_base_vtk_02.cc b/tests/base/data_out_base_vtk_02.cc
new file mode 100644 (file)
index 0000000..5386cbd
--- /dev/null
@@ -0,0 +1,88 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2006 - 2014 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+// Identical to data_out_base_vtk, but outputs zero-dimensional features
+// in higher space dimensions.
+
+#include "../tests.h"
+#include <deal.II/base/data_out_base.h>
+#include <deal.II/base/logstream.h>
+
+#include <vector>
+#include <iomanip>
+#include <fstream>
+#include <string>
+#include <stdio.h>
+
+#include "patches.h"
+
+// Output data on repetitions of the unit hypercube
+
+// define this as 1 to get output into a separate file for each testcase
+#define SEPARATE_FILES 0
+
+
+template <int dim, int spacedim>
+void check(DataOutBase::VtkFlags flags,
+           std::ostream &out)
+{
+  const unsigned int np = 4;
+
+  std::vector<DataOutBase::Patch<dim, spacedim> > patches(np);
+
+  create_patches(patches);
+
+  std::vector<std::string> names(5);
+  names[0] = "x1";
+  names[1] = "x2";
+  names[2] = "x3";
+  names[3] = "x4";
+  names[4] = "i";
+  std::vector<std::tuple<unsigned int, unsigned int, std::string> > vectors;
+  DataOutBase::write_vtk(patches, names, vectors, flags, out);
+}
+
+
+template <int dim, int spacedim>
+void check_all(std::ostream &log)
+{
+#if SEPARATE_FILES == 0
+  std::ostream &out = log;
+#endif
+
+  char name[100];
+  DataOutBase::VtkFlags flags;
+  if (true)
+    {
+      sprintf(name, "%d%d.vtk", dim, spacedim);
+#if SEPARATE_FILES==1
+      std::ofstream out(name);
+#else
+      out << "==============================\n"
+          << name
+          << "\n==============================\n";
+#endif
+      check<dim,spacedim>(flags, out);
+    }
+}
+
+int main()
+{
+  std::ofstream logfile("output");
+
+  check_all<0,1>(logfile);
+  check_all<0,2>(logfile);
+  check_all<0,3>(logfile);
+}
diff --git a/tests/base/data_out_base_vtk_02.output b/tests/base/data_out_base_vtk_02.output
new file mode 100644 (file)
index 0000000..f3b3ce6
--- /dev/null
@@ -0,0 +1,114 @@
+==============================
+01.vtk
+==============================
+# vtk DataFile Version 3.0
+#This file was generated 
+ASCII
+DATASET UNSTRUCTURED_GRID
+
+POINTS 4 double
+0 0 0
+1 0 0
+2 0 0
+3 0 0
+
+CELLS 4 8
+1      0
+1      1
+1      2
+1      3
+
+CELL_TYPES 4
+ 1 1 1 1
+POINT_DATA 4
+SCALARS x1 double 1
+LOOKUP_TABLE default
+0 1 2 3 
+SCALARS x2 double 1
+LOOKUP_TABLE default
+0 1 2 3 
+SCALARS x3 double 1
+LOOKUP_TABLE default
+0 1 2 3 
+SCALARS x4 double 1
+LOOKUP_TABLE default
+0 1 2 3 
+SCALARS i double 1
+LOOKUP_TABLE default
+0 0 0 0 
+==============================
+02.vtk
+==============================
+# vtk DataFile Version 3.0
+#This file was generated 
+ASCII
+DATASET UNSTRUCTURED_GRID
+
+POINTS 4 double
+0 0 0
+1 1 0
+2 2 0
+3 3 0
+
+CELLS 4 8
+1      0
+1      1
+1      2
+1      3
+
+CELL_TYPES 4
+ 1 1 1 1
+POINT_DATA 4
+SCALARS x1 double 1
+LOOKUP_TABLE default
+0 1 2 3 
+SCALARS x2 double 1
+LOOKUP_TABLE default
+0 1 2 3 
+SCALARS x3 double 1
+LOOKUP_TABLE default
+0 1 2 3 
+SCALARS x4 double 1
+LOOKUP_TABLE default
+0 1 2 3 
+SCALARS i double 1
+LOOKUP_TABLE default
+0 0 0 0 
+==============================
+03.vtk
+==============================
+# vtk DataFile Version 3.0
+#This file was generated 
+ASCII
+DATASET UNSTRUCTURED_GRID
+
+POINTS 4 double
+0 0 0
+1 1 1
+2 2 2
+3 3 3
+
+CELLS 4 8
+1      0
+1      1
+1      2
+1      3
+
+CELL_TYPES 4
+ 1 1 1 1
+POINT_DATA 4
+SCALARS x1 double 1
+LOOKUP_TABLE default
+0 1 2 3 
+SCALARS x2 double 1
+LOOKUP_TABLE default
+0 1 2 3 
+SCALARS x3 double 1
+LOOKUP_TABLE default
+0 1 2 3 
+SCALARS x4 double 1
+LOOKUP_TABLE default
+0 1 2 3 
+SCALARS i double 1
+LOOKUP_TABLE default
+0 0 0 0 
diff --git a/tests/base/data_out_base_vtu_02.cc b/tests/base/data_out_base_vtu_02.cc
new file mode 100644 (file)
index 0000000..57f1352
--- /dev/null
@@ -0,0 +1,88 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2006 - 2014 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+// Identical to data_out_base_vtu, but outputs zero-dimensional features
+// in higher space dimensions.
+
+#include "../tests.h"
+#include <deal.II/base/data_out_base.h>
+#include <deal.II/base/logstream.h>
+
+#include <vector>
+#include <iomanip>
+#include <fstream>
+#include <string>
+#include <stdio.h>
+
+#include "patches.h"
+
+// Output data on repetitions of the unit hypercube
+
+// define this as 1 to get output into a separate file for each testcase
+#define SEPARATE_FILES 0
+
+
+template <int dim, int spacedim>
+void check(DataOutBase::VtkFlags flags,
+           std::ostream &out)
+{
+  const unsigned int np = 4;
+
+  std::vector<DataOutBase::Patch<dim, spacedim> > patches(np);
+
+  create_patches(patches);
+
+  std::vector<std::string> names(5);
+  names[0] = "x1";
+  names[1] = "x2";
+  names[2] = "x3";
+  names[3] = "x4";
+  names[4] = "i";
+  std::vector<std::tuple<unsigned int, unsigned int, std::string> > vectors;
+  DataOutBase::write_vtu(patches, names, vectors, flags, out);
+}
+
+
+template <int dim, int spacedim>
+void check_all(std::ostream &log)
+{
+#if SEPARATE_FILES == 0
+  std::ostream &out = log;
+#endif
+
+  char name[100];
+  DataOutBase::VtkFlags flags;
+  if (true)
+    {
+      sprintf(name, "%d%d.vtu", dim, spacedim);
+#if SEPARATE_FILES==1
+      std::ofstream out(name);
+#else
+      out << "==============================\n"
+          << name
+          << "\n==============================\n";
+#endif
+      check<dim,spacedim>(flags, out);
+    }
+}
+
+int main()
+{
+  std::ofstream logfile("output");
+
+  check_all<0,1>(logfile);
+  check_all<0,2>(logfile);
+  check_all<0,3>(logfile);
+}
diff --git a/tests/base/data_out_base_vtu_02.with_zlib=true.output b/tests/base/data_out_base_vtu_02.with_zlib=true.output
new file mode 100644 (file)
index 0000000..6eb3772
--- /dev/null
@@ -0,0 +1,129 @@
+==============================
+01.vtu
+==============================
+<?xml version="1.0" ?> 
+<!-- 
+# vtk DataFile Version 3.0
+#This file was generated 
+-->
+<VTKFile type="UnstructuredGrid" version="0.1" compressor="vtkZLibDataCompressor" byte_order="LittleEndian">
+<UnstructuredGrid>
+<Piece NumberOfPoints="4" NumberOfCells="4" >
+  <Points>
+    <DataArray type="Float64" NumberOfComponents="3" format="binary">
+AQAAAGAAAABgAAAAFgAAAA==eNpjYMAHPtjjkHDALsyBIQ4AXU8BuA==
+    </DataArray>
+  </Points>
+
+  <Cells>
+    <DataArray type="Int32" Name="connectivity" format="binary">
+AQAAABAAAAAQAAAAEwAAAA==eNpjYGBgYARiJiBmBmIAADgABw==
+    </DataArray>
+    <DataArray type="Int32" Name="offsets" format="binary">
+AQAAABAAAAAQAAAAEwAAAA==eNpjZGBgYAJiZiBmAWIAAGAACw==
+    </DataArray>
+    <DataArray type="UInt8" Name="types" format="binary">
+AQAAAAQAAAAEAAAADAAAAA==eNpjZGRkBAAADgAF
+    </DataArray>
+  </Cells>
+  <PointData Scalars="scalars">
+    <DataArray type="Float64" Name="x1" format="binary">
+AQAAACAAAAAgAAAAFAAAAA==eNpjYEAGH+yhDAcIxeEAABe/Abg=    </DataArray>
+    <DataArray type="Float64" Name="x2" format="binary">
+AQAAACAAAAAgAAAAFAAAAA==eNpjYEAGH+yhDAcIxeEAABe/Abg=    </DataArray>
+    <DataArray type="Float64" Name="x3" format="binary">
+AQAAACAAAAAgAAAAFAAAAA==eNpjYEAGH+yhDAcIxeEAABe/Abg=    </DataArray>
+    <DataArray type="Float64" Name="x4" format="binary">
+AQAAACAAAAAgAAAAFAAAAA==eNpjYEAGH+yhDAcIxeEAABe/Abg=    </DataArray>
+    <DataArray type="Float64" Name="i" format="binary">
+AQAAACAAAAAgAAAACwAAAA==eNpjYMAPAAAgAAE=    </DataArray>
+  </PointData>
+ </Piece>
+ </UnstructuredGrid>
+</VTKFile>
+==============================
+02.vtu
+==============================
+<?xml version="1.0" ?> 
+<!-- 
+# vtk DataFile Version 3.0
+#This file was generated 
+-->
+<VTKFile type="UnstructuredGrid" version="0.1" compressor="vtkZLibDataCompressor" byte_order="LittleEndian">
+<UnstructuredGrid>
+<Piece NumberOfPoints="4" NumberOfCells="4" >
+  <Points>
+    <DataArray type="Float64" NumberOfComponents="3" format="binary">
+AQAAAGAAAABgAAAAGwAAAA==eNpjYMAHPtij0nDggEZDAYcDKs3AAACshgNv
+    </DataArray>
+  </Points>
+
+  <Cells>
+    <DataArray type="Int32" Name="connectivity" format="binary">
+AQAAABAAAAAQAAAAEwAAAA==eNpjYGBgYARiJiBmBmIAADgABw==
+    </DataArray>
+    <DataArray type="Int32" Name="offsets" format="binary">
+AQAAABAAAAAQAAAAEwAAAA==eNpjZGBgYAJiZiBmAWIAAGAACw==
+    </DataArray>
+    <DataArray type="UInt8" Name="types" format="binary">
+AQAAAAQAAAAEAAAADAAAAA==eNpjZGRkBAAADgAF
+    </DataArray>
+  </Cells>
+  <PointData Scalars="scalars">
+    <DataArray type="Float64" Name="x1" format="binary">
+AQAAACAAAAAgAAAAFAAAAA==eNpjYEAGH+yhDAcIxeEAABe/Abg=    </DataArray>
+    <DataArray type="Float64" Name="x2" format="binary">
+AQAAACAAAAAgAAAAFAAAAA==eNpjYEAGH+yhDAcIxeEAABe/Abg=    </DataArray>
+    <DataArray type="Float64" Name="x3" format="binary">
+AQAAACAAAAAgAAAAFAAAAA==eNpjYEAGH+yhDAcIxeEAABe/Abg=    </DataArray>
+    <DataArray type="Float64" Name="x4" format="binary">
+AQAAACAAAAAgAAAAFAAAAA==eNpjYEAGH+yhDAcIxeEAABe/Abg=    </DataArray>
+    <DataArray type="Float64" Name="i" format="binary">
+AQAAACAAAAAgAAAACwAAAA==eNpjYMAPAAAgAAE=    </DataArray>
+  </PointData>
+ </Piece>
+ </UnstructuredGrid>
+</VTKFile>
+==============================
+03.vtu
+==============================
+<?xml version="1.0" ?> 
+<!-- 
+# vtk DataFile Version 3.0
+#This file was generated 
+-->
+<VTKFile type="UnstructuredGrid" version="0.1" compressor="vtkZLibDataCompressor" byte_order="LittleEndian">
+<UnstructuredGrid>
+<Piece NumberOfPoints="4" NumberOfCells="4" >
+  <Points>
+    <DataArray type="Float64" NumberOfComponents="3" format="binary">
+AQAAAGAAAABgAAAAFgAAAA==eNpjYMAHPthjpxkcsNMcGDQA7gUFJg==
+    </DataArray>
+  </Points>
+
+  <Cells>
+    <DataArray type="Int32" Name="connectivity" format="binary">
+AQAAABAAAAAQAAAAEwAAAA==eNpjYGBgYARiJiBmBmIAADgABw==
+    </DataArray>
+    <DataArray type="Int32" Name="offsets" format="binary">
+AQAAABAAAAAQAAAAEwAAAA==eNpjZGBgYAJiZiBmAWIAAGAACw==
+    </DataArray>
+    <DataArray type="UInt8" Name="types" format="binary">
+AQAAAAQAAAAEAAAADAAAAA==eNpjZGRkBAAADgAF
+    </DataArray>
+  </Cells>
+  <PointData Scalars="scalars">
+    <DataArray type="Float64" Name="x1" format="binary">
+AQAAACAAAAAgAAAAFAAAAA==eNpjYEAGH+yhDAcIxeEAABe/Abg=    </DataArray>
+    <DataArray type="Float64" Name="x2" format="binary">
+AQAAACAAAAAgAAAAFAAAAA==eNpjYEAGH+yhDAcIxeEAABe/Abg=    </DataArray>
+    <DataArray type="Float64" Name="x3" format="binary">
+AQAAACAAAAAgAAAAFAAAAA==eNpjYEAGH+yhDAcIxeEAABe/Abg=    </DataArray>
+    <DataArray type="Float64" Name="x4" format="binary">
+AQAAACAAAAAgAAAAFAAAAA==eNpjYEAGH+yhDAcIxeEAABe/Abg=    </DataArray>
+    <DataArray type="Float64" Name="i" format="binary">
+AQAAACAAAAAgAAAACwAAAA==eNpjYMAPAAAgAAE=    </DataArray>
+  </PointData>
+ </Piece>
+ </UnstructuredGrid>
+</VTKFile>
diff --git a/tests/mpi/data_out_hdf5_02.cc b/tests/mpi/data_out_hdf5_02.cc
new file mode 100644 (file)
index 0000000..03f0092
--- /dev/null
@@ -0,0 +1,194 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2017 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+// tests DataOut with HDF5 and zero-dimensional output (i.e. points)
+
+#include "../tests.h"
+
+#include <deal.II/base/data_out_base.h>
+#include <deal.II/base/logstream.h>
+
+#include <vector>
+#include <string>
+#include <iomanip>
+#include <fstream>
+#include <string>
+#include <stdio.h>
+
+double cell_coordinates [3][8] =
+{
+  { 0, 1, 0, 1, 0, 1, 0, 1 },
+  { 0, 0, 1, 1, 0, 0, 1, 1 },
+  { 0, 0, 0, 0, 1, 1, 1, 1 }
+};
+
+
+// This function is a copy from tests/base/patches.h, included here
+// to not introduce dependencies between different test targets
+template <int dim, int spacedim>
+void
+create_patches(std::vector<DataOutBase::Patch<dim, spacedim> > &patches)
+{
+  for (unsigned int p=0; p<patches.size(); ++p)
+    {
+      DataOutBase::Patch<dim, spacedim> &patch = patches[p];
+
+      const unsigned int nsub = p+1;
+      const unsigned int nsubp = nsub+1;
+
+      patch.n_subdivisions = nsub;
+      for (unsigned int v=0; v<GeometryInfo<dim>::vertices_per_cell; ++v)
+        for (unsigned int d=0; d<spacedim; ++d)
+          patch.vertices[v](d) = p+cell_coordinates[d][v]
+                                 + ((d>=dim) ? v : 0);
+
+      unsigned int n1 = (dim>0) ? nsubp : 1;
+      unsigned int n2 = (dim>1) ? nsubp : 1;
+      unsigned int n3 = (dim>2) ? nsubp : 1;
+      unsigned int n4 = (dim>3) ? nsubp : 1;
+      patch.data.reinit(5, n1*n2*n3*n4);
+
+      for (unsigned int i4=0; i4<n4; ++i4)
+        for (unsigned int i3=0; i3<n3; ++i3)
+          for (unsigned int i2=0; i2<n2; ++i2)
+            for (unsigned int i1=0; i1<n1; ++i1)
+              {
+                const unsigned int i = i1+nsubp*(i2+nsubp*(i3+nsubp*i4));
+                const float x1 = 1.*i1/nsub;
+                const float x2 = 1.*i2/nsub;
+                const float x3 = 1.*i3/nsub;
+                const float x4 = 1.*i4/nsub;
+
+                patch.data(0,i) = p+x1;
+                patch.data(1,i) = p+x2;
+                patch.data(2,i) = p+x3;
+                patch.data(3,i) = p+x4;
+                patch.data(4,i) = i;
+              }
+      patch.patch_index = p;
+    }
+}
+
+
+
+template <int dim, int spacedim>
+void check()
+{
+  const unsigned int np = 4;
+
+  std::vector<DataOutBase::Patch<dim, spacedim> > patches(np);
+
+  create_patches(patches);
+
+  std::vector<std::string> names(5);
+  names[0] = "x1";
+  names[1] = "x2";
+  names[2] = "x3";
+  names[3] = "x4";
+  names[4] = "i";
+  std::vector<std::tuple<unsigned int, unsigned int, std::string> > vectors;
+
+  DataOutBase::DataOutFilter data_filter
+  (DataOutBase::DataOutFilterFlags (false, false));
+
+  DataOutBase::write_filtered_data (patches,names,vectors,data_filter);
+
+  std::string output_basename = std::to_string(dim) + std::to_string(spacedim);
+
+  DataOutBase::write_hdf5_parallel(patches, data_filter, output_basename+".h5", MPI_COMM_WORLD);
+
+  const double current_time = 0.0;
+  XDMFEntry       entry(output_basename+".h5", output_basename+".h5", current_time, data_filter.n_nodes(), data_filter.n_cells(), dim, spacedim);
+  unsigned int  n_data_sets = data_filter.n_data_sets();
+
+  // The vector names generated here must match those generated in the HDF5 file
+  for (unsigned int i=0; i<n_data_sets; ++i)
+    {
+      entry.add_attribute(data_filter.get_data_set_name(i), data_filter.get_data_set_dim(i));
+    }
+
+  std::ofstream xdmf_file((output_basename+".xdmf").c_str());
+
+  xdmf_file << "<?xml version=\"1.0\" ?>\n";
+  xdmf_file << "<!DOCTYPE Xdmf SYSTEM \"Xdmf.dtd\" []>\n";
+  xdmf_file << "<Xdmf Version=\"2.0\">\n";
+  xdmf_file << "  <Domain>\n";
+  xdmf_file << "    <Grid Name=\"CellTime\" GridType=\"Collection\" CollectionType=\"Temporal\">\n";
+
+  // Write out the entry
+  xdmf_file << entry.get_xdmf_content(3);
+
+  xdmf_file << "    </Grid>\n";
+  xdmf_file << "  </Domain>\n";
+  xdmf_file << "</Xdmf>\n";
+
+  xdmf_file.close();
+
+  // Sadly hdf5 is binary and we can not use hd5dump because it might
+  // not be in the path. At least we can look at the xdmf:
+  deallog << "\n==============================\n"
+          << output_basename + ".xdmf"
+          << "\n=============================="
+          << std::endl;
+
+  if (0==Utilities::MPI::this_mpi_process (MPI_COMM_WORLD))
+    cat_file((output_basename+".xdmf").c_str());
+
+  deallog << std::flush;
+}
+
+
+
+int main(int argc, char *argv[])
+{
+  Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, 1);
+  MPILogInitAll log;
+
+  try
+    {
+      check<0,2>();
+      check<1,2>();
+      check<2,2>();
+      check<0,3>();
+      check<1,3>();
+      check<2,3>();
+      check<3,3>();
+
+      return 0;
+    }
+  catch (std::exception &exc)
+    {
+      deallog << std::endl << std::endl
+              << "----------------------------------------------------"
+              << std::endl;
+      deallog << "Exception on processing: " << std::endl
+              << exc.what() << std::endl
+              << "Aborting!" << std::endl
+              << "----------------------------------------------------"
+              << std::endl;
+      return 1;
+    }
+  catch (...)
+    {
+      deallog << std::endl << std::endl
+              << "----------------------------------------------------"
+              << std::endl;
+      deallog << "Unknown exception!" << std::endl
+              << "Aborting!" << std::endl
+              << "----------------------------------------------------"
+              << std::endl;
+      return 1;
+    };
+}
diff --git a/tests/mpi/data_out_hdf5_02.with_hdf5=true.mpirun=1.output b/tests/mpi/data_out_hdf5_02.with_hdf5=true.mpirun=1.output
new file mode 100644 (file)
index 0000000..5e921f1
--- /dev/null
@@ -0,0 +1,359 @@
+
+DEAL:0::
+==============================
+02.xdmf
+==============================
+<?xml version="1.0" ?>
+<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
+<Xdmf Version="2.0">
+  <Domain>
+    <Grid Name="CellTime" GridType="Collection" CollectionType="Temporal">
+      <Grid Name="mesh" GridType="Uniform">
+        <Time Value="0"/>
+        <Geometry GeometryType="XY">
+          <DataItem Dimensions="4 2" NumberType="Float" Precision="8" Format="HDF">
+            02.h5:/nodes
+          </DataItem>
+        </Geometry>
+        <Topology TopologyType="Polyvertex" NumberOfElements="4" NodesPerElement="1">
+          <DataItem Dimensions="4 1" NumberType="UInt" Format="HDF">
+            02.h5:/cells
+          </DataItem>
+        </Topology>
+        <Attribute Name="i" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="4 1" NumberType="Float" Precision="8" Format="HDF">
+            02.h5:/i
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x1" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="4 1" NumberType="Float" Precision="8" Format="HDF">
+            02.h5:/x1
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x2" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="4 1" NumberType="Float" Precision="8" Format="HDF">
+            02.h5:/x2
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x3" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="4 1" NumberType="Float" Precision="8" Format="HDF">
+            02.h5:/x3
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x4" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="4 1" NumberType="Float" Precision="8" Format="HDF">
+            02.h5:/x4
+          </DataItem>
+        </Attribute>
+      </Grid>
+    </Grid>
+  </Domain>
+</Xdmf>
+
+DEAL:0::
+==============================
+12.xdmf
+==============================
+<?xml version="1.0" ?>
+<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
+<Xdmf Version="2.0">
+  <Domain>
+    <Grid Name="CellTime" GridType="Collection" CollectionType="Temporal">
+      <Grid Name="mesh" GridType="Uniform">
+        <Time Value="0"/>
+        <Geometry GeometryType="XY">
+          <DataItem Dimensions="14 2" NumberType="Float" Precision="8" Format="HDF">
+            12.h5:/nodes
+          </DataItem>
+        </Geometry>
+        <Topology TopologyType="Polyline" NumberOfElements="10" NodesPerElement="2">
+          <DataItem Dimensions="10 2" NumberType="UInt" Format="HDF">
+            12.h5:/cells
+          </DataItem>
+        </Topology>
+        <Attribute Name="i" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="14 1" NumberType="Float" Precision="8" Format="HDF">
+            12.h5:/i
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x1" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="14 1" NumberType="Float" Precision="8" Format="HDF">
+            12.h5:/x1
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x2" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="14 1" NumberType="Float" Precision="8" Format="HDF">
+            12.h5:/x2
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x3" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="14 1" NumberType="Float" Precision="8" Format="HDF">
+            12.h5:/x3
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x4" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="14 1" NumberType="Float" Precision="8" Format="HDF">
+            12.h5:/x4
+          </DataItem>
+        </Attribute>
+      </Grid>
+    </Grid>
+  </Domain>
+</Xdmf>
+
+DEAL:0::
+==============================
+22.xdmf
+==============================
+<?xml version="1.0" ?>
+<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
+<Xdmf Version="2.0">
+  <Domain>
+    <Grid Name="CellTime" GridType="Collection" CollectionType="Temporal">
+      <Grid Name="mesh" GridType="Uniform">
+        <Time Value="0"/>
+        <Geometry GeometryType="XY">
+          <DataItem Dimensions="54 2" NumberType="Float" Precision="8" Format="HDF">
+            22.h5:/nodes
+          </DataItem>
+        </Geometry>
+        <Topology TopologyType="Quadrilateral" NumberOfElements="30">
+          <DataItem Dimensions="30 4" NumberType="UInt" Format="HDF">
+            22.h5:/cells
+          </DataItem>
+        </Topology>
+        <Attribute Name="i" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="54 1" NumberType="Float" Precision="8" Format="HDF">
+            22.h5:/i
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x1" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="54 1" NumberType="Float" Precision="8" Format="HDF">
+            22.h5:/x1
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x2" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="54 1" NumberType="Float" Precision="8" Format="HDF">
+            22.h5:/x2
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x3" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="54 1" NumberType="Float" Precision="8" Format="HDF">
+            22.h5:/x3
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x4" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="54 1" NumberType="Float" Precision="8" Format="HDF">
+            22.h5:/x4
+          </DataItem>
+        </Attribute>
+      </Grid>
+    </Grid>
+  </Domain>
+</Xdmf>
+
+DEAL:0::
+==============================
+03.xdmf
+==============================
+<?xml version="1.0" ?>
+<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
+<Xdmf Version="2.0">
+  <Domain>
+    <Grid Name="CellTime" GridType="Collection" CollectionType="Temporal">
+      <Grid Name="mesh" GridType="Uniform">
+        <Time Value="0"/>
+        <Geometry GeometryType="XYZ">
+          <DataItem Dimensions="4 3" NumberType="Float" Precision="8" Format="HDF">
+            03.h5:/nodes
+          </DataItem>
+        </Geometry>
+        <Topology TopologyType="Polyvertex" NumberOfElements="4" NodesPerElement="1">
+          <DataItem Dimensions="4 1" NumberType="UInt" Format="HDF">
+            03.h5:/cells
+          </DataItem>
+        </Topology>
+        <Attribute Name="i" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="4 1" NumberType="Float" Precision="8" Format="HDF">
+            03.h5:/i
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x1" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="4 1" NumberType="Float" Precision="8" Format="HDF">
+            03.h5:/x1
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x2" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="4 1" NumberType="Float" Precision="8" Format="HDF">
+            03.h5:/x2
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x3" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="4 1" NumberType="Float" Precision="8" Format="HDF">
+            03.h5:/x3
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x4" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="4 1" NumberType="Float" Precision="8" Format="HDF">
+            03.h5:/x4
+          </DataItem>
+        </Attribute>
+      </Grid>
+    </Grid>
+  </Domain>
+</Xdmf>
+
+DEAL:0::
+==============================
+13.xdmf
+==============================
+<?xml version="1.0" ?>
+<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
+<Xdmf Version="2.0">
+  <Domain>
+    <Grid Name="CellTime" GridType="Collection" CollectionType="Temporal">
+      <Grid Name="mesh" GridType="Uniform">
+        <Time Value="0"/>
+        <Geometry GeometryType="XYZ">
+          <DataItem Dimensions="14 3" NumberType="Float" Precision="8" Format="HDF">
+            13.h5:/nodes
+          </DataItem>
+        </Geometry>
+        <Topology TopologyType="Polyline" NumberOfElements="10" NodesPerElement="2">
+          <DataItem Dimensions="10 2" NumberType="UInt" Format="HDF">
+            13.h5:/cells
+          </DataItem>
+        </Topology>
+        <Attribute Name="i" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="14 1" NumberType="Float" Precision="8" Format="HDF">
+            13.h5:/i
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x1" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="14 1" NumberType="Float" Precision="8" Format="HDF">
+            13.h5:/x1
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x2" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="14 1" NumberType="Float" Precision="8" Format="HDF">
+            13.h5:/x2
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x3" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="14 1" NumberType="Float" Precision="8" Format="HDF">
+            13.h5:/x3
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x4" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="14 1" NumberType="Float" Precision="8" Format="HDF">
+            13.h5:/x4
+          </DataItem>
+        </Attribute>
+      </Grid>
+    </Grid>
+  </Domain>
+</Xdmf>
+
+DEAL:0::
+==============================
+23.xdmf
+==============================
+<?xml version="1.0" ?>
+<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
+<Xdmf Version="2.0">
+  <Domain>
+    <Grid Name="CellTime" GridType="Collection" CollectionType="Temporal">
+      <Grid Name="mesh" GridType="Uniform">
+        <Time Value="0"/>
+        <Geometry GeometryType="XYZ">
+          <DataItem Dimensions="54 3" NumberType="Float" Precision="8" Format="HDF">
+            23.h5:/nodes
+          </DataItem>
+        </Geometry>
+        <Topology TopologyType="Quadrilateral" NumberOfElements="30">
+          <DataItem Dimensions="30 4" NumberType="UInt" Format="HDF">
+            23.h5:/cells
+          </DataItem>
+        </Topology>
+        <Attribute Name="i" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="54 1" NumberType="Float" Precision="8" Format="HDF">
+            23.h5:/i
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x1" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="54 1" NumberType="Float" Precision="8" Format="HDF">
+            23.h5:/x1
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x2" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="54 1" NumberType="Float" Precision="8" Format="HDF">
+            23.h5:/x2
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x3" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="54 1" NumberType="Float" Precision="8" Format="HDF">
+            23.h5:/x3
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x4" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="54 1" NumberType="Float" Precision="8" Format="HDF">
+            23.h5:/x4
+          </DataItem>
+        </Attribute>
+      </Grid>
+    </Grid>
+  </Domain>
+</Xdmf>
+
+DEAL:0::
+==============================
+33.xdmf
+==============================
+<?xml version="1.0" ?>
+<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
+<Xdmf Version="2.0">
+  <Domain>
+    <Grid Name="CellTime" GridType="Collection" CollectionType="Temporal">
+      <Grid Name="mesh" GridType="Uniform">
+        <Time Value="0"/>
+        <Geometry GeometryType="XYZ">
+          <DataItem Dimensions="224 3" NumberType="Float" Precision="8" Format="HDF">
+            33.h5:/nodes
+          </DataItem>
+        </Geometry>
+        <Topology TopologyType="Hexahedron" NumberOfElements="100">
+          <DataItem Dimensions="100 8" NumberType="UInt" Format="HDF">
+            33.h5:/cells
+          </DataItem>
+        </Topology>
+        <Attribute Name="i" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="224 1" NumberType="Float" Precision="8" Format="HDF">
+            33.h5:/i
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x1" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="224 1" NumberType="Float" Precision="8" Format="HDF">
+            33.h5:/x1
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x2" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="224 1" NumberType="Float" Precision="8" Format="HDF">
+            33.h5:/x2
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x3" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="224 1" NumberType="Float" Precision="8" Format="HDF">
+            33.h5:/x3
+          </DataItem>
+        </Attribute>
+        <Attribute Name="x4" AttributeType="Scalar" Center="Node">
+          <DataItem Dimensions="224 1" NumberType="Float" Precision="8" Format="HDF">
+            33.h5:/x4
+          </DataItem>
+        </Attribute>
+      </Grid>
+    </Grid>
+  </Domain>
+</Xdmf>
+
+DEAL:0::
\ No newline at end of file

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.