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

Switch to core/Filesystem.h

parent f39a0f6f
Branches
Tags
No related merge requests found
...@@ -289,8 +289,6 @@ void Raytracer::writeDepthsToFile(const std::vector<BodyIntersectionInfo>& inter ...@@ -289,8 +289,6 @@ void Raytracer::writeDepthsToFile(const std::vector<BodyIntersectionInfo>& inter
*/ */
void Raytracer::writeDepthsToFile(const std::vector<BodyIntersectionInfo>& intersectionsBuffer, void Raytracer::writeDepthsToFile(const std::vector<BodyIntersectionInfo>& intersectionsBuffer,
const std::string& fileName) const { const std::string& fileName) const {
namespace fs = boost::filesystem;
real_t inf = std::numeric_limits<real_t>::max(); real_t inf = std::numeric_limits<real_t>::max();
real_t t_max = 1; real_t t_max = 1;
...@@ -308,9 +306,9 @@ void Raytracer::writeDepthsToFile(const std::vector<BodyIntersectionInfo>& inter ...@@ -308,9 +306,9 @@ void Raytracer::writeDepthsToFile(const std::vector<BodyIntersectionInfo>& inter
t_max = forest_->getDomain().maxDistance(cameraPosition_); t_max = forest_->getDomain().maxDistance(cameraPosition_);
fs::path dir (getTBufferOutputDirectory()); filesystem::path dir (getTBufferOutputDirectory());
fs::path file (fileName); filesystem::path file (fileName);
fs::path fullPath = dir / file; filesystem::path fullPath = dir / file;
std::vector<u_char> lodeTBuffer(pixelsHorizontal_*pixelsVertical_); std::vector<u_char> lodeTBuffer(pixelsHorizontal_*pixelsVertical_);
...@@ -353,11 +351,9 @@ void Raytracer::writeImageToFile(const std::vector<BodyIntersectionInfo>& inters ...@@ -353,11 +351,9 @@ void Raytracer::writeImageToFile(const std::vector<BodyIntersectionInfo>& inters
*/ */
void Raytracer::writeImageToFile(const std::vector<BodyIntersectionInfo>& intersectionsBuffer, void Raytracer::writeImageToFile(const std::vector<BodyIntersectionInfo>& intersectionsBuffer,
const std::string& fileName) const { const std::string& fileName) const {
namespace fs = boost::filesystem; filesystem::path dir = getImageOutputDirectory();
filesystem::path file (fileName);
fs::path dir = getImageOutputDirectory(); filesystem::path fullPath = dir / file;
fs::path file (fileName);
fs::path fullPath = dir / file;
std::vector<u_char> lodeImageBuffer(pixelsHorizontal_*pixelsVertical_*3); std::vector<u_char> lodeImageBuffer(pixelsHorizontal_*pixelsVertical_*3);
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <core/math/Vector3.h> #include <core/math/Vector3.h>
#include <core/mpi/all.h> #include <core/mpi/all.h>
#include <core/config/Config.h> #include <core/config/Config.h>
#include <boost/filesystem.hpp> #include <core/Filesystem.h>
#include <core/timing/TimingTree.h> #include <core/timing/TimingTree.h>
#include <functional> #include <functional>
#include "Ray.h" #include "Ray.h"
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
#include "core/mpi/all.h" #include "core/mpi/all.h"
#include <stddef.h> #include <stddef.h>
using namespace walberla;
using namespace walberla::pe; using namespace walberla::pe;
using namespace walberla::timing; using namespace walberla::timing;
...@@ -362,10 +361,8 @@ inline void Raytracer::setTBufferOutputEnabled(const bool enabled) { ...@@ -362,10 +361,8 @@ inline void Raytracer::setTBufferOutputEnabled(const bool enabled) {
* \param enabled Set to true / false to enable / disable tbuffer output. * \param enabled Set to true / false to enable / disable tbuffer output.
*/ */
inline void Raytracer::setTBufferOutputDirectory(const std::string& path) { inline void Raytracer::setTBufferOutputDirectory(const std::string& path) {
namespace fs = boost::filesystem; filesystem::path dir (path);
WALBERLA_CHECK(filesystem::exists(dir) && filesystem::is_directory(dir), "Tbuffer output directory " << path << " is invalid.");
fs::path dir (path);
WALBERLA_CHECK(fs::exists(dir) && fs::is_directory(dir), "Tbuffer output directory " << path << " is invalid.");
tBufferOutputDirectory_ = path; tBufferOutputDirectory_ = path;
} }
...@@ -388,10 +385,8 @@ inline void Raytracer::setLocalImageOutputEnabled(const bool enabled) { ...@@ -388,10 +385,8 @@ inline void Raytracer::setLocalImageOutputEnabled(const bool enabled) {
* \param enabled Set to true / false to enable / disable image output. * \param enabled Set to true / false to enable / disable image output.
*/ */
inline void Raytracer::setImageOutputDirectory(const std::string& path) { inline void Raytracer::setImageOutputDirectory(const std::string& path) {
namespace fs = boost::filesystem; filesystem::path dir (path);
WALBERLA_CHECK(filesystem::exists(dir) && filesystem::is_directory(dir), "Image output directory " << path << " is invalid.");
fs::path dir (path);
WALBERLA_CHECK(fs::exists(dir) && fs::is_directory(dir), "Image output directory " << path << " is invalid.");
imageOutputDirectory_ = path; imageOutputDirectory_ = path;
} }
......
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