We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
current code for the computation of the bulk velocity below:
for (auto& pop : populations_) { auto& flux = pop.flux(); auto& fx = flux.getComponent(Component::X); auto& fy = flux.getComponent(Component::Y); auto& fz = flux.getComponent(Component::Z); std::transform(std::begin(vx), std::end(vx), std::begin(fx), std::begin(vx), std::plus<typename field_type::type>{}); std::transform(std::begin(vy), std::end(vy), std::begin(fy), std::begin(vy), std::plus<typename field_type::type>{}); std::transform(std::begin(vz), std::end(vz), std::begin(fz), std::begin(vz), std::plus<typename field_type::type>{}); } std::transform(std::begin(vx), std::end(vx), std::begin(*rho_), std::begin(vx), std::divides<typename field_type::type>{}); std::transform(std::begin(vy), std::end(vy), std::begin(*rho_), std::begin(vy), std::divides<typename field_type::type>{}); std::transform(std::begin(vz), std::end(vz), std::begin(*rho_), std::begin(vz), std::divides<typename field_type::type>{});
does sum_pop(flux_pop)/sum_pop(rho_pop)
where rho_pop is just the particle density of the population pop.
This is wrong when populations have different masses.
It should be.:
sum_pop(mass_pop * flux_pop)/sum_pop(mass_pop*rho_pop)
The text was updated successfully, but these errors were encountered:
closed , done by #783
Sorry, something went wrong.
nicolasaunai
No branches or pull requests
current code for the computation of the bulk velocity below:
does sum_pop(flux_pop)/sum_pop(rho_pop)
where rho_pop is just the particle density of the population pop.
This is wrong when populations have different masses.
It should be.:
sum_pop(mass_pop * flux_pop)/sum_pop(mass_pop*rho_pop)
The text was updated successfully, but these errors were encountered: