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

Method buildModel

Simulator/SimulatorBase.cpp:808–830  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

806
807
808void SimulatorBase::buildModel()
809{
810 initFluidData();
811
812 createEmitters();
813 createAnimationFields();
814
815 Simulation *sim = Simulation::getCurrent();
816
817 if (sim->getTimeStep())
818 sim->getTimeStep()->resize();
819
820 if (!sim->is2DSimulation())
821 {
822 sim->setValue(Simulation::KERNEL_METHOD, Simulation::ENUM_KERNEL_PRECOMPUTED_CUBIC);
823 sim->setValue(Simulation::GRAD_KERNEL_METHOD, Simulation::ENUM_GRADKERNEL_PRECOMPUTED_CUBIC);
824 }
825 else
826 {
827 sim->setValue(Simulation::KERNEL_METHOD, Simulation::ENUM_KERNEL_CUBIC_2D);
828 sim->setValue(Simulation::GRAD_KERNEL_METHOD, Simulation::ENUM_GRADKERNEL_CUBIC_2D);
829 }
830}
831
832void SimulatorBase::reset()
833{

Callers

nothing calls this directly

Calls 4

getTimeStepMethod · 0.80
is2DSimulationMethod · 0.80
resizeMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected