Skip to content

Commit

Permalink
XDMFEntry commit
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Sean Ingimarson committed Apr 20, 2022
1 parent 91bff6e commit 03c5e76
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 39 deletions.
40 changes: 20 additions & 20 deletions include/deal.II/base/data_out_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -3321,33 +3321,33 @@ class XDMFEntry
* 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.
Expand Down Expand Up @@ -3411,12 +3411,12 @@ class XDMFEntry
/**
* 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.
Expand Down
38 changes: 19 additions & 19 deletions source/base/data_out_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 03c5e76

Please sign in to comment.