MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / DebugTools

Method DebugTools

SPlisHSPlasH/Utilities/DebugTools.cpp:13–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11int DebugTools::DETERMINE_VELOCITY_CHANGES = -1;
12
13DebugTools::DebugTools() :
14 ParameterObject()
15{
16 m_determineThreadIds = false;
17 m_determineNumNeighbors = false;
18 m_determineVelocityChanges = false;
19
20 Simulation* sim = Simulation::getCurrent();
21 const unsigned int nModels = sim->numberOfFluidModels();
22 for (unsigned int fluidModelIndex = 0; fluidModelIndex < nModels; fluidModelIndex++)
23 {
24 FluidModel* model = sim->getFluidModel(fluidModelIndex);
25 model->addField({ "threadId", FieldType::UInt, [this, fluidModelIndex](const unsigned int i) -> unsigned int* { return &m_threadIds[fluidModelIndex][i]; } });
26 model->addField({ "numNeighbors", FieldType::UInt, [this, fluidModelIndex](const unsigned int i) -> unsigned int* { return &m_numNeighbors[fluidModelIndex][i]; } });
27 model->addField({ "velocityChanges", FieldType::Vector3, [this, fluidModelIndex](const unsigned int i) -> Real* { return &m_velocityChanges[fluidModelIndex][i][0]; } });
28 }
29}
30
31DebugTools::~DebugTools()
32{

Callers

nothing calls this directly

Calls 3

numberOfFluidModelsMethod · 0.80
getFluidModelMethod · 0.80
addFieldMethod · 0.80

Tested by

no test coverage detected