Skip to content
Snippets Groups Projects
Commit 316aa16b authored by Lukas Werner's avatar Lukas Werner
Browse files

Changed type of filename timestep width

parent 78eb687b
No related merge requests found
......@@ -115,7 +115,7 @@ Raytracer::Raytracer(const shared_ptr<BlockStorage> forest, const BlockDataID st
WALBERLA_ABORT("Cannot enable local image output without image_output_directory parameter being set.");
}
filenameTimestepWidth_ = config.getParameter<int8_t>("filenameTimestepWidth", int8_t(5));
filenameTimestepWidth_ = config.getParameter<uint8_t>("filenameTimestepWidth", uint8_t(5));
cameraPosition_ = config.getParameter<Vec3>("cameraPosition");
lookAtPoint_ = config.getParameter<Vec3>("lookAt");
......@@ -152,7 +152,7 @@ void Raytracer::setupView_() {
*/
void Raytracer::setupFilenameRankWidth_() {
int numProcesses = mpi::MPIManager::instance()->numProcesses();
filenameRankWidth_ = int8_c(log10(numProcesses))+1;
filenameRankWidth_ = uint8_c(log10(numProcesses))+1;
}
/*!\brief Generates the filename for output files.
......
......@@ -101,10 +101,10 @@ private:
bool localImageOutputEnabled_; //!< Enable / disable writing images of the local process to file.
std::string imageOutputDirectory_; //!< Path to the image output directory.
int8_t filenameTimestepWidth_; /*!< Width of the timestep number in output filenames.
* Use e.g. 5 for ranges from 1 to 99 999: Will result in
* filenames like image_00001.png up to image_99999.png. */
int8_t filenameRankWidth_; //!< Width of the mpi rank part in a filename.
uint8_t filenameTimestepWidth_; /*!< Width of the timestep number in output filenames.
* Use e.g. 5 for ranges from 1 to 99 999: Will result in
* filenames like image_00001.png up to image_99999.png. */
uint8_t filenameRankWidth_; //!< Width of the mpi rank part in a filename.
std::function<ShadingParameters (const BodyID)> bodyToShadingParamsFunction_; /*!< Function which returns a
* ShadingParameters struct
* given the specified body. */
......@@ -139,7 +139,7 @@ public:
inline bool getImageOutputEnabled() const;
inline bool getLocalImageOutputEnabled() const;
inline const std::string& getImageOutputDirectory() const;
inline int8_t getFilenameTimestepWidth() const;
inline uint8_t getFilenameTimestepWidth() const;
//@}
/*!\name Set functions */
......@@ -150,7 +150,7 @@ public:
inline void setImageOutputEnabled(const bool enabled);
inline void setLocalImageOutputEnabled(const bool enabled);
inline void setImageOutputDirectory(const std::string& path);
inline void setFilenameTimestepWidth(int8_t width);
inline void setFilenameTimestepWidth(uint8_t width);
//@}
/*!\name Functions */
......@@ -283,7 +283,7 @@ inline const std::string& Raytracer::getImageOutputDirectory() const {
/*!\brief Returns width of the timestep number in output filenames.
* \return Width of the timestep part in filenames.
*/
inline int8_t Raytracer::getFilenameTimestepWidth() const {
inline uint8_t Raytracer::getFilenameTimestepWidth() const {
return filenameTimestepWidth_;
}
......@@ -343,7 +343,7 @@ inline void Raytracer::setImageOutputDirectory(const std::string& path) {
/*!\brief Set width of timestep number in output filenames.
* \param width Width of timestep part in a filename.
*/
inline void Raytracer::setFilenameTimestepWidth(int8_t width) {
inline void Raytracer::setFilenameTimestepWidth(uint8_t width) {
filenameTimestepWidth_ = width;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment