From ae8711ba90ac2a47ea7654dc873927fb2783ff91 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Fri, 18 Apr 2025 16:25:30 +0200 Subject: wip rendering in terminal and extracting example code to files --- c++/equilibrium.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'c++/equilibrium.hpp') diff --git a/c++/equilibrium.hpp b/c++/equilibrium.hpp index ac36dbc..bb55d00 100644 --- a/c++/equilibrium.hpp +++ b/c++/equilibrium.hpp @@ -13,14 +13,20 @@ saw::data> equilibrium(saw::data rho, saw:: // 0.0 // / \ // | | + // + // Velocity * Velocity meaning || vel ||_2^2 or _2 saw::data vel_vel{0.0}; for(uint64_t j = 0u; j < Descriptor::D; ++j){ vel_vel = vel_vel + vel.at(j) * vel.at(j); } + /** + * Calculate equilibrium + */ for(uint64_t i = 0u; i < eq.template get_dim_size<0u>(); ++i){ saw::data vel_c{}; for(uint64_t j = 0u; j < Descriptor::D; ++j){ + // _2 vel_c = vel_c + (vel.at(j) * saw::data{static_cast::type>(dfi::directions[i][j])}); } -- cgit v1.2.3