Skip to content
Snippets Groups Projects
Commit eec00ff2 authored by sniklas142's avatar sniklas142 Committed by Cristian Lalescu
Browse files

can read arbitrary iteration

parent cdef2c93
Branches
Tags
No related merge requests found
......@@ -101,6 +101,33 @@ int NSVE_field_stats<rnumber>::read_current_cvorticity(void)
}
return EXIT_SUCCESS;
}
template <typename rnumber>
int NSVE_field_stats<rnumber>::read_arbitrary_cvorticity(int iter)
{
TIMEZONE("NSVE_field_stats::read_arbitrary_cvorticity");
this->vorticity->real_space_representation = false;
if (this->bin_IO != NULL)
{
char itername[16];
sprintf(itername, "i%.5x", iter);
std::string native_binary_fname = (
this->simname +
std::string("_cvorticity_") +
std::string(itername));
this->bin_IO->read(
native_binary_fname,
this->vorticity->get_cdata());
}
else
{
this->vorticity->io(
this->simname + std::string("_fields.h5"),
"vorticity",
iter,
true);
}
return EXIT_SUCCESS;
}
template <typename rnumber>
int NSVE_field_stats<rnumber>::finalize(void)
......
......@@ -59,6 +59,7 @@ class NSVE_field_stats: public postprocess
virtual int finalize(void);
int read_current_cvorticity(void);
int read_arbitrary_cvorticity(int iter);
};
#endif//NSVE_FIELD_STATS_HPP
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment