Skip to content

Commit

Permalink
Anelastic: multiply/divide all components of velocity (#1184)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbkuhn authored Aug 5, 2024
1 parent 2fbd345 commit 65aa85d
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions amr-wind/projection/incflo_apply_nodal_projection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,11 @@ void incflo::ApplyProjection(

if (is_anelastic) {
for (int lev = 0; lev <= finest_level; ++lev) {
amrex::Multiply(
velocity(lev), (*ref_density)(lev), 0, 0, density[lev]->nComp(),
0);
for (int idim = 0; idim < velocity.num_comp(); ++idim) {
amrex::Multiply(
velocity(lev), (*ref_density)(lev), 0, idim,
density[lev]->nComp(), 0);
}
}
}

Expand Down Expand Up @@ -435,9 +437,11 @@ void incflo::ApplyProjection(

if (is_anelastic) {
for (int lev = 0; lev <= finest_level; ++lev) {
amrex::Divide(
velocity(lev), (*ref_density)(lev), 0, 0, density[lev]->nComp(),
0);
for (int idim = 0; idim < velocity.num_comp(); ++idim) {
amrex::Divide(
velocity(lev), (*ref_density)(lev), 0, idim,
density[lev]->nComp(), 0);
}
}
}

Expand Down

0 comments on commit 65aa85d

Please sign in to comment.