diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-02-04 16:28:48 +0100 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-02-04 16:28:48 +0100 |
| commit | ba9c23e4177ab9309f69155601578b118b2fd782 (patch) | |
| tree | 6b365d7a361eca6b15e7fd37c105724ed79f0639 /lib/core/c++/equilibrium.hpp | |
| parent | 2ae8aaa474f888ed7a5a3810cd916977df6d0dcf (diff) | |
| download | libs-lbm-ba9c23e4177ab9309f69155601578b118b2fd782.tar.gz | |
Weird missing vtk writes
Diffstat (limited to 'lib/core/c++/equilibrium.hpp')
| -rw-r--r-- | lib/core/c++/equilibrium.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/core/c++/equilibrium.hpp b/lib/core/c++/equilibrium.hpp index bb55d00..7d1324e 100644 --- a/lib/core/c++/equilibrium.hpp +++ b/lib/core/c++/equilibrium.hpp @@ -5,7 +5,7 @@ namespace kel { namespace lbm { template<typename T, typename Descriptor> -saw::data<sch::FixedArray<T, Descriptor::Q>> equilibrium(saw::data<T> rho, saw::data<sch::FixedArray<T,Descriptor::D>> vel){ +saw::data<sch::FixedArray<T, Descriptor::Q>> equilibrium(saw::data<sch::Scalar<T>> rho, saw::data<sch::Vector<T,Descriptor::D>> vel){ using dfi = df_info<T, Descriptor>; saw::data<sch::FixedArray<T,Descriptor::Q>> eq; @@ -17,7 +17,7 @@ saw::data<sch::FixedArray<T, Descriptor::Q>> equilibrium(saw::data<T> rho, saw:: // Velocity * Velocity meaning || vel ||_2^2 or <vel,vel>_2 saw::data<T> vel_vel{0.0}; for(uint64_t j = 0u; j < Descriptor::D; ++j){ - vel_vel = vel_vel + vel.at(j) * vel.at(j); + vel_vel = vel_vel + vel.at({{j}}) * vel.at({{j}}); } /** @@ -27,13 +27,13 @@ saw::data<sch::FixedArray<T, Descriptor::Q>> equilibrium(saw::data<T> rho, saw:: saw::data<T> vel_c{}; for(uint64_t j = 0u; j < Descriptor::D; ++j){ // <vel,c_i>_2 - vel_c = vel_c + (vel.at(j) * saw::data<T>{static_cast<saw::native_data_type<T>::type>(dfi::directions[i][j])}); + vel_c = vel_c + (vel.at({{j}}) * saw::data<T>{static_cast<saw::native_data_type<T>::type>(dfi::directions[i][j])}); } auto vel_c_cs2 = vel_c * saw::data<T>{dfi::inv_cs2}; eq.at(i).set( - dfi::weights[i] * rho.get() * + dfi::weights[i] * rho.at({}).get() * ( 1.0 + vel_c_cs2.get() |
