From 1e9da7b88acb1ab99b7e4f63fa17a2f9de3eb824 Mon Sep 17 00:00:00 2001 From: Sean Ingimarson Date: Mon, 18 Apr 2022 15:37:47 -0400 Subject: [PATCH] XDMFEntry commit 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 | 40 ++++++++++++++-------------- source/base/data_out_base.cc | 40 ++++++++++++++-------------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/include/deal.II/base/data_out_base.h b/include/deal.II/base/data_out_base.h index fc3ef8f44e..f5abc008fb 100644 --- a/include/deal.II/base/data_out_base.h +++ b/include/deal.II/base/data_out_base.h @@ -3321,33 +3321,33 @@ public: * cases where solution_filename == mesh_filename, and * dim==spacedim. */ - 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 dim==spacedim. */ - 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. diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index 34c6bad845..3f709a5bf6 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -7895,7 +7895,7 @@ DataOutInterface::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::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) -- 2.39.5