Commit 2ca45a0d authored by Lukas Werner's avatar Lukas Werner
Browse files

Added Raytracer to ConfinedGasExtended

parent 2d9b07a5
Pipeline #6918 failed with stage
in 23 minutes and 3 seconds
......@@ -5,5 +5,15 @@ ConfinedGasExtended
simulationDomain < 20, 20, 20 >;
blocks < 2, 2, 2 >;
isPeriodic < 0, 0, 0 >;
raytracerSkippedSteps 10;
setupRun false;
}
Raytracing {
image_x 640;
image_y 480;
fov_vertical 49.13;
tbuffer_output_directory /Users/ng/Desktop/walberla;
cameraPosition < -25, 10, 10 >;
lookAt < -5, 10, 10 >;
upVector < 0, 0, 1 >;
}
\ No newline at end of file
......@@ -31,10 +31,12 @@
#include <core/waLBerlaBuildInfo.h>
#include <postprocessing/sqlite/SQLite.h>
#include <vtk/VTKOutput.h>
#include <pe/raytracing/Raytracer.h>
using namespace walberla;
using namespace walberla::pe;
using namespace walberla::timing;
using namespace walberla::pe::raytracing;
typedef boost::tuple<Sphere, Plane> BodyTuple ;
......@@ -103,6 +105,10 @@ int main( int argc, char ** argv )
WALBERLA_LOG_INFO_ON_ROOT("visSpacing: " << visSpacing);
const std::string path = mainConf.getParameter<std::string>("path", "vtk_out" );
WALBERLA_LOG_INFO_ON_ROOT("path: " << path);
const int raytracerSkippedSteps = mainConf.getParameter<int>("raytracerSkippedSteps", 10 );
WALBERLA_LOG_INFO_ON_ROOT("raytracerSkippedSteps: " << raytracerSkippedSteps);
integerProperties["raytracerSkippedSteps"] = raytracerSkippedSteps;
WALBERLA_LOG_INFO_ON_ROOT("syncShadowOwners: " << syncShadowOwners);
integerProperties["syncShadowOwners"] = syncShadowOwners;
......@@ -139,6 +145,12 @@ int main( int argc, char ** argv )
auto ccdID = forest->addBlockData(ccd::createHashGridsDataHandling( globalBodyStorage, storageID ), "CCD");
auto fcdID = forest->addBlockData(fcd::createGenericFCDDataHandling<BodyTuple, fcd::AnalyticCollideFunctor>(), "FCD");
WALBERLA_LOG_INFO_ON_ROOT("*** RAYTRACER ***");
if (cfg == NULL) {
WALBERLA_ABORT("raytracer needs a working config");
}
Raytracer raytracer(forest, storageID, cfg->getBlock("Raytracing"));
WALBERLA_LOG_INFO_ON_ROOT("*** INTEGRATOR ***");
cr::HCSITS cr(globalBodyStorage, forest, storageID, ccdID, fcdID);
cr.setMaxIterations( 10 );
......@@ -243,6 +255,10 @@ int main( int argc, char ** argv )
vtkSphereOutput->write( );
//! [VTK Output]
}
if ( i % raytracerSkippedSteps == 0) {
raytracer.rayTrace<BodyTuple>(size_t(i));
}
}
tp["Total"].end();
tt.stop("Simulation Loop");
......
Markdown is supported
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