From 8d5bf80ec696a37a317ccf37dca4afe9739f6e68 Mon Sep 17 00:00:00 2001 From: yggdrasil75 Date: Mon, 1 Dec 2025 05:36:52 -0500 Subject: [PATCH] I need to make a material class. --- util/simblocks/temp.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/util/simblocks/temp.hpp b/util/simblocks/temp.hpp index 5837322..4b51f4e 100644 --- a/util/simblocks/temp.hpp +++ b/util/simblocks/temp.hpp @@ -36,9 +36,8 @@ public: float specific_heat = 900.0; float diffusivity = 2000.0; - Temp(float temp) : temp(temp) { - - }; + Temp() : temp(0.0) {}; + Temp(float temp) : temp(temp) {}; Temp(const Vec2& testPos, const std::unordered_map& others) { TIME_FUNCTION; @@ -78,9 +77,9 @@ public: return num / den; } - void calLapl(const Vec2& testPos, const std::unordered_map& others) { + void calLapl(const Vec2& testPos, const std::unordered_map& others, float deltaTime) { //TIME_FUNCTION; - float dt = 0.032; + float dt = deltaTime; float sumWeights = 0.0f; float sumTempWeights = 0.0f; float searchRadius = 25.0f;