This commit is contained in:
yggdrasil75
2025-11-26 05:26:59 -05:00
parent d8515ffbaa
commit 70b3100141
4 changed files with 118 additions and 13 deletions

View File

@@ -33,7 +33,6 @@ protected:
public:
double temp;
Temp(float temp) : temp(temp) {
//std::cout << "setting temp to: " << temp << std::endl;
};
Temp(const Vec2& testPos, const std::unordered_map<Vec2, Temp>& others) {
@@ -133,7 +132,7 @@ public:
}
if (validNeighbors > 0) {
laplacian /= (gridSpacing * gridSpacing);
laplacian /= (validNeighbors * gridSpacing * gridSpacing);
double tempChange = thermalDiffusivity * timeStep * laplacian;
return currentTemp + tempChange;