Skip to content
Snippets Groups Projects
Commit 7318dc56 authored by Sebastian Eibl's avatar Sebastian Eibl
Browse files

added vtk output to VBondModel benchmark

parent e488bad5
No related merge requests found
......@@ -27,9 +27,11 @@
#include "mesa_pd/kernel/cnt/Parameters.h"
#include "mesa_pd/kernel/cnt/VBondContact.h"
#include "mesa_pd/kernel/VelocityVerlet.h"
#include "mesa_pd/vtk/ParticleVtkOutput.h"
#include "core/Environment.h"
#include "core/math/Constants.h"
#include "vtk/VTKOutput.h"
namespace walberla {
using namespace walberla::mesa_pd;
......@@ -62,6 +64,17 @@ int main(int argc, char **argv)
}
data::Particle &&last_segment = *(ps->end() - 1);
WALBERLA_LOG_INFO_ON_ROOT("setting up VTK output");
auto vtkOutput = make_shared<mesa_pd::vtk::ParticleVtkOutput>(ps);
vtkOutput->addOutput<data::SelectParticlePosition>("position");
auto vtkWriter = walberla::vtk::createVTKOutput_PointData(vtkOutput,
"cnt",
1,
"vtk",
"particles",
false,
false);
WALBERLA_LOG_INFO_ON_ROOT("setting up interaction models");
kernel::cnt::VBondContact vbond;
kernel::VelocityVerletPreForceUpdate vv_pre(kernel::cnt::dT);
......@@ -73,6 +86,8 @@ int main(int argc, char **argv)
std::ofstream fout("output.txt");
for (auto i = 0; i < numSimulationSteps; ++i)
{
vtkWriter->write();
ps->forEachParticle(false,
kernel::SelectAll(),
ac,
......
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