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

Method TimeStepPBF

SPlisHSPlasH/PBF/TimeStepPBF.cpp:28–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26
27
28TimeStepPBF::TimeStepPBF() :
29 TimeStep()
30{
31 m_simulationData.init();
32 m_iterations = 0;
33 m_minIterations = 2;
34 m_maxIterations = 100;
35 m_maxError = static_cast<Real>(0.01);
36 m_velocityUpdateMethod = 0;
37
38 Simulation *sim = Simulation::getCurrent();
39 const unsigned int nModels = sim->numberOfFluidModels();
40 for (unsigned int fluidModelIndex = 0; fluidModelIndex < nModels; fluidModelIndex++)
41 {
42 FluidModel *model = sim->getFluidModel(fluidModelIndex);
43 model->addField({ "lambda", METHOD_NAME, FieldType::Scalar, [this, fluidModelIndex](const unsigned int i) -> Real* { return &m_simulationData.getLambda(fluidModelIndex, i); } });
44 model->addField({ "deltaX", METHOD_NAME, FieldType::Vector3, [this, fluidModelIndex](const unsigned int i) -> Real* { return &m_simulationData.getDeltaX(fluidModelIndex, i)[0]; } });
45 }
46}
47
48TimeStepPBF::~TimeStepPBF(void)
49{

Callers

nothing calls this directly

Calls 4

numberOfFluidModelsMethod · 0.80
getFluidModelMethod · 0.80
addFieldMethod · 0.80
initMethod · 0.45

Tested by

no test coverage detected