Skip to content

Commit

Permalink
In diffuse_tensor_velocity, for momenta (rho_flag==3), multiply
Browse files Browse the repository at this point in the history
Unew by rho^(n+1) for RHS. i.e. we want
rho^(n+1) * Unew =
    rho^(n+1) * [(rho^n U^n - dt U dot grad U + ...)/rho^(n+1)]
  • Loading branch information
cgilet committed Apr 22, 2024
1 parent b3d12ab commit e456ccf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Diffusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ Diffusion::diffuse_tensor_velocity (Real dt,
const Box& bx = mfi.tilebox();
auto const& rhs = Rhs.array(mfi);
auto const& unew = U_new.array(mfi,Xvel);
auto const& rho = (rho_flag == 1) ? rho_half.array(mfi) : navier_stokes->get_old_data(State_Type).array(mfi,Density);
auto const& rho = (rho_flag == 1) ? rho_half.array(mfi) : navier_stokes->get_new_data(State_Type).array(mfi,Density);
auto const& deltarhs = (has_delta_rhs) ? delta_rhs->array(mfi,rhsComp) : U_new.array(mfi);
amrex::ParallelFor(bx, [rhs, unew, rho, deltarhs, has_delta_rhs, dt]
AMREX_GPU_DEVICE(int i, int j, int k) noexcept
Expand Down

0 comments on commit e456ccf

Please sign in to comment.