Skip to content

Commit

Permalink
fix oops from previous PR (erf-model#1909)
Browse files Browse the repository at this point in the history
  • Loading branch information
asalmgren authored Oct 24, 2024
1 parent d151417 commit cee2934
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Source/ERF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ ERF::InitData_post ()
base_state[lev].FillBoundary(geom[lev].periodicity());

// For moving terrain only
if (solverChoice.terrain_type != TerrainType::Static) {
if (solverChoice.terrain_type == TerrainType::Moving) {
MultiFab::Copy(base_state_new[lev],base_state[lev],0,0,BaseState::num_comps,base_state[lev].nGrowVect());
base_state_new[lev].FillBoundary(geom[lev].periodicity());
}
Expand Down
6 changes: 3 additions & 3 deletions Source/ERF_make_new_arrays.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ERF::init_stuff (int lev, const BoxArray& ba, const DistributionMapping& dm,
tmp_base_state.define(ba,dm,BaseState::num_comps,3);
tmp_base_state.setVal(0.);

if (solverChoice.use_terrain && solverChoice.terrain_type != TerrainType::Static) {
if (solverChoice.use_terrain && solverChoice.terrain_type == TerrainType::Moving) {
base_state_new[lev].define(ba,dm,BaseState::num_comps,3);
base_state_new[lev].setVal(0.);
}
Expand All @@ -42,7 +42,7 @@ ERF::init_stuff (int lev, const BoxArray& ba, const DistributionMapping& dm,
if (solverChoice.use_terrain) {
z_phys_cc[lev] = std::make_unique<MultiFab>(ba,dm,1,1);

if (solverChoice.terrain_type != TerrainType::Static)
if (solverChoice.terrain_type == TerrainType::Moving)
{
detJ_cc_new[lev] = std::make_unique<MultiFab>(ba,dm,1,1);
detJ_cc_src[lev] = std::make_unique<MultiFab>(ba,dm,1,1);
Expand All @@ -65,7 +65,7 @@ ERF::init_stuff (int lev, const BoxArray& ba, const DistributionMapping& dm,
int ngrow = ComputeGhostCells(solverChoice.advChoice, solverChoice.use_NumDiff) + 2;
tmp_zphys_nd = std::make_unique<MultiFab>(ba_nd,dm,1,IntVect(ngrow,ngrow,ngrow));

if (solverChoice.terrain_type != TerrainType::Static) {
if (solverChoice.terrain_type == TerrainType::Moving) {
z_phys_nd_new[lev] = std::make_unique<MultiFab>(ba_nd,dm,1,IntVect(ngrow,ngrow,ngrow));
z_phys_nd_src[lev] = std::make_unique<MultiFab>(ba_nd,dm,1,IntVect(ngrow,ngrow,ngrow));
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Utils/ERF_PoissonSolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void ERF::project_velocities (int lev, Real l_dt, Vector<MultiFab>& mom_mf, Mult

MLPoisson mlpoisson(geom_tmp, ba_tmp, dm_tmp, info);

MultiFab r_hse(base_state[lev], make_alias, Basestate::r0_comp, 1);
MultiFab r_hse(base_state[lev], make_alias, BaseState::r0_comp, 1);

auto bclo = get_projection_bc(Orientation::low);
auto bchi = get_projection_bc(Orientation::high);
Expand Down

0 comments on commit cee2934

Please sign in to comment.