diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-07-01 00:15:41 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-07-01 00:15:41 +0200 |
| commit | 89b1992988569add71f3b2f858a38a001d141d3b (patch) | |
| tree | b4d4519bb6df9b1f91778484cd5bc361c9356a47 /lib/core/c++/particle | |
| parent | 53ecaeeee3a24c016b4fd3c6a577ac22ac47775a (diff) | |
| parent | 761e4912e14324ccf713b9309336816cd3283b38 (diff) | |
| download | libs-lbm-89b1992988569add71f3b2f858a38a001d141d3b.tar.gz | |
Merge branch 'dev'
Diffstat (limited to 'lib/core/c++/particle')
| -rw-r--r-- | lib/core/c++/particle/porosity.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/core/c++/particle/porosity.hpp b/lib/core/c++/particle/porosity.hpp index 11185c5..2f39d2e 100644 --- a/lib/core/c++/particle/porosity.hpp +++ b/lib/core/c++/particle/porosity.hpp @@ -48,17 +48,17 @@ public: auto rad_high = rad + eps_h; if(s_dist.at({}) <= rad_low.at({})){ - por.at({}).set(1); + por.at({}).set(0); return por; } if(s_dist.at({}) >= rad_high.at({})){ - por.at({}).set(0); + por.at({}).set(1); return por; } { - typename saw::native_data_type<T>::type inner = (std::numbers::pi / ( eps.at({}).get() )) * (s_dist - rad_low).at({}).get(); - auto cos_inner = std::cos(inner); + typename saw::native_data_type<T>::type inner = (std::numbers::pi / ( 2 * eps.at({}).get() )) * (s_dist - rad_low).at({}).get(); + auto cos_inner = std::sin(inner); auto cos_i_2 = cos_inner * cos_inner; por.at({}).set(cos_i_2); } |
