]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Revert "Remove deprecated XDMFEntry::get_xdmf_content"
authorTimo Heister <timo.heister@gmail.com>
Tue, 28 Jun 2022 15:27:42 +0000 (11:27 -0400)
committerTimo Heister <timo.heister@gmail.com>
Tue, 28 Jun 2022 15:27:42 +0000 (11:27 -0400)
This reverts commit d9fad9fa023d2702df1677b8522f17536c74b5e7.

doc/news/changes/incompatibilities/20220627Arndt-1 [deleted file]
include/deal.II/base/data_out_base.h
source/base/data_out_base.cc
tests/data_out/data_out_hdf5_02.cc
tests/mpi/data_out_hdf5_02.cc
tests/serialization/xdmf_entry.cc

diff --git a/doc/news/changes/incompatibilities/20220627Arndt-1 b/doc/news/changes/incompatibilities/20220627Arndt-1
deleted file mode 100644 (file)
index 68a5b16..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-Removed: The deprecated overload of XDMFEntry::get_xdmf_content()
-has been removed.
-<br>
-(Daniel Arndt, 2022/06/27)
index 96737d245ee19c26fa4751be92e0febd88f044c9..dc35266b27f4a4af668e6f0f755f0b921ec59109 100644 (file)
@@ -3369,6 +3369,17 @@ public:
       &num_cells &dimension &space_dimension &attribute_dims;
   }
 
+  /**
+   * Get the XDMF content associated with this entry.
+   * If the entry is not valid, this returns an empty string.
+   *
+   * @deprecated Use the overload taking an `unsigned int` and a
+   * `const ReferenceCell &` instead.
+   */
+  DEAL_II_DEPRECATED
+  std::string
+  get_xdmf_content(const unsigned int indent_level) const;
+
   /**
    * Get the XDMF content associated with this entry.
    * If the entry is not valid, this returns an empty string.
index 3c2c15d92e674f1292e24c68e213a64c52a13040..41bb8954cf101549a56a16575a3f233839c020e1 100644 (file)
@@ -9199,6 +9199,32 @@ namespace
 
 
 
+std::string
+XDMFEntry::get_xdmf_content(const unsigned int indent_level) const
+{
+  switch (dimension)
+    {
+      case 0:
+        return get_xdmf_content(indent_level,
+                                ReferenceCells::get_hypercube<0>());
+      case 1:
+        return get_xdmf_content(indent_level,
+                                ReferenceCells::get_hypercube<1>());
+      case 2:
+        return get_xdmf_content(indent_level,
+                                ReferenceCells::get_hypercube<2>());
+      case 3:
+        return get_xdmf_content(indent_level,
+                                ReferenceCells::get_hypercube<3>());
+      default:
+        Assert(false, ExcNotImplemented());
+    }
+
+  return "";
+}
+
+
+
 std::string
 XDMFEntry::get_xdmf_content(const unsigned int   indent_level,
                             const ReferenceCell &reference_cell) const
index be2ce5b0406f41aed2b84b33b9268daa8d97ade1..f2c1cd6ad436019015795629f956af1790876b70 100644 (file)
@@ -134,7 +134,7 @@ check()
     << "    <Grid Name=\"CellTime\" GridType=\"Collection\" CollectionType=\"Temporal\">\n";
 
   // Write out the entry
-  xdmf_file << entry.get_xdmf_content(3, ReferenceCells::get_hypercube<dim>());
+  xdmf_file << entry.get_xdmf_content(3);
 
   xdmf_file << "    </Grid>\n";
   xdmf_file << "  </Domain>\n";
index 04c84bcaa775774bcef76837cf4241e03daad76e..05003706ddf87d02d923febb0caf5f653d12edf3 100644 (file)
@@ -86,7 +86,7 @@ check()
     << "    <Grid Name=\"CellTime\" GridType=\"Collection\" CollectionType=\"Temporal\">\n";
 
   // Write out the entry
-  xdmf_file << entry.get_xdmf_content(3, ReferenceCells::get_hypercube<dim>());
+  xdmf_file << entry.get_xdmf_content(3);
 
   xdmf_file << "    </Grid>\n";
   xdmf_file << "  </Domain>\n";
index 9dea0a61743f4af9984d92177c31488df1a85a58..2a3c3b5948e62fb0cd9df13c7c850fac5c9bc80e 100644 (file)
@@ -54,13 +54,11 @@ test()
 
   deallog << "XDMFEntry before serialization: " << std::endl
           << std::endl
-          << entry1.get_xdmf_content(0, ReferenceCells::get_hypercube<dim>())
-          << std::endl;
+          << entry1.get_xdmf_content(0) << std::endl;
 
   deallog << "XDMFEntry after de-serialization: " << std::endl
           << std::endl
-          << entry2.get_xdmf_content(0, ReferenceCells::get_hypercube<dim>())
-          << std::endl;
+          << entry2.get_xdmf_content(0) << std::endl;
 }
 
 

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.