From 51a044e3160df05ad56102d3b8b1e0087c60d111 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Mon, 4 Aug 2025 16:16:17 +0200 Subject: emits weird behaviour on particles --- c++/particle/geometry/circle.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'c++/particle/geometry/circle.hpp') diff --git a/c++/particle/geometry/circle.hpp b/c++/particle/geometry/circle.hpp index 77fa9d8..069a1a5 100644 --- a/c++/particle/geometry/circle.hpp +++ b/c++/particle/geometry/circle.hpp @@ -23,15 +23,15 @@ public: uint64_t size = rad_i + 2*boundary_nodes; grid = {{{size,size}}}; - saw::data delta_x{2.0 / rad_i}; + saw::data delta_x{static_cast::type>(2.0 / static_cast(rad_i))}; saw::data center = (saw::data{1.0} + saw::data{2.0} * saw::data{static_cast::type>(boundary_nodes)/rad_i}); for(uint64_t i = 0; i < size; ++i){ for(uint64_t j = 0; j < size; ++j){ grid.at({{i,j}}).set(0); if(i >= boundary_nodes and j >= boundary_nodes and i < (rad_i + boundary_nodes) and j < (rad_i + boundary_nodes) ){ - saw::data fi = saw::data{0.5+static_cast::type>(i)} * delta_x - center; - saw::data fj = saw::data{0.5+static_cast::type>(j)} * delta_x - center; + saw::data fi = saw::data{static_cast::type>(0.5+i)} * delta_x - center; + saw::data fj = saw::data{static_cast::type>(0.5+j)} * delta_x - center; auto norm_f_ij = fi*fi + fj*fj; if(norm_f_ij.get() <= 1){ -- cgit v1.2.3