]> https://gitweb.dealii.org/ - dealii.git/commitdiff
XDMFEntry commit 13626/head
authorSean Ingimarson <singima@clemson.edu>
Mon, 18 Apr 2022 19:37:47 +0000 (15:37 -0400)
committerSean Ingimarson <singima@clemson.edu>
Wed, 20 Apr 2022 17:44:25 +0000 (13:44 -0400)
Changed the constructors of XDMFEntry to allow for uint64_t datatypes
that we need for large data.  Changed some things in create_xdmf_entry
to match.

include/deal.II/base/data_out_base.h
source/base/data_out_base.cc

index fc3ef8f44e81a2070b47f01b4dfce3ce37fa672d..f5abc008fb50f0414df4ae9d11c8cce4bf676fb0 100644 (file)
@@ -3321,33 +3321,33 @@ public:
    * 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);
+  XDMFEntry(const std::string & filename,
+            const double        time,
+            const std::uint64_t nodes,
+            const std::uint64_t cells,
+            const unsigned int  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);
+  XDMFEntry(const std::string & mesh_filename,
+            const std::string & solution_filename,
+            const double        time,
+            const std::uint64_t nodes,
+            const std::uint64_t 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);
+  XDMFEntry(const std::string & mesh_filename,
+            const std::string & solution_filename,
+            const double        time,
+            const std::uint64_t nodes,
+            const std::uint64_t cells,
+            const unsigned int  dim,
+            const unsigned int  spacedim);
 
   /**
    * Record an attribute and associated dimensionality.
@@ -3411,12 +3411,12 @@ private:
   /**
    * The number of data nodes.
    */
-  unsigned int num_nodes;
+  std::uint64_t num_nodes;
 
   /**
    * The number of data cells.
    */
-  unsigned int num_cells;
+  std::uint64_t num_cells;
 
   /**
    * The dimension associated with the data.
index 34c6bad845599495c0b223ff0a25854850f6b5fb..3f709a5bf6fad9980a83d3ea53a659246f27e014 100644 (file)
@@ -7895,7 +7895,7 @@ DataOutInterface<dim, spacedim>::create_xdmf_entry(
   const double                      cur_time,
   const MPI_Comm &                  comm) const
 {
-  unsigned int local_node_cell_count[2], global_node_cell_count[2];
+  std::uint64_t local_node_cell_count[2], global_node_cell_count[2];
 
 #ifndef DEAL_II_WITH_HDF5
   // throw an exception, but first make sure the compiler does not warn about
@@ -7919,7 +7919,7 @@ DataOutInterface<dim, spacedim>::create_xdmf_entry(
   int       ierr   = MPI_Allreduce(local_node_cell_count,
                            global_node_cell_count,
                            2,
-                           MPI_UNSIGNED,
+                           MPI_UINT64_T,
                            MPI_SUM,
                            comm);
   AssertThrowMPI(ierr);
@@ -9075,34 +9075,34 @@ XDMFEntry::XDMFEntry()
 
 
 
-XDMFEntry::XDMFEntry(const std::string &filename,
-                     const double       time,
-                     const unsigned int nodes,
-                     const unsigned int cells,
-                     const unsigned int dim)
+XDMFEntry::XDMFEntry(const std::string & filename,
+                     const double        time,
+                     const std::uint64_t nodes,
+                     const std::uint64_t 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::XDMFEntry(const std::string & mesh_filename,
+                     const std::string & solution_filename,
+                     const double        time,
+                     const std::uint64_t nodes,
+                     const std::uint64_t 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)
+XDMFEntry::XDMFEntry(const std::string & mesh_filename,
+                     const std::string & solution_filename,
+                     const double        time,
+                     const std::uint64_t nodes,
+                     const std::uint64_t cells,
+                     const unsigned int  dim,
+                     const unsigned int  spacedim)
   : valid(true)
   , h5_sol_filename(solution_filename)
   , h5_mesh_filename(mesh_filename)

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.