diff --git a/amr-wind/equation_systems/BCOps.H b/amr-wind/equation_systems/BCOps.H index 383cf4d515..5434e11d4e 100644 --- a/amr-wind/equation_systems/BCOps.H +++ b/amr-wind/equation_systems/BCOps.H @@ -39,16 +39,15 @@ struct BCOp>> { amrex::IntVect ng_diff(1); auto& field = m_fields.field; - const auto bc_time = (rho_state == FieldState::Old) - ? m_time.current_time() - : m_time.new_time(); if ((rho_state != FieldState::Old && rho_state != FieldState::New)) { amrex::Abort( "BCOps.H apply_bcs(): a state other than New or Old was used. " - "The method of setting bc_time must be evaluated before using " + "The time used for fillphysbc must be evaluated before using " "a different state for this routine."); } - field.fillphysbc(bc_time, ng_diff); + if (rho_state == FieldState::New) { + field.fillphysbc(m_time.new_time(), ng_diff); + } field.apply_bc_funcs(rho_state); } diff --git a/amr-wind/equation_systems/icns/icns_bcop.H b/amr-wind/equation_systems/icns/icns_bcop.H index 83a02652cc..9b119488e7 100644 --- a/amr-wind/equation_systems/icns/icns_bcop.H +++ b/amr-wind/equation_systems/icns/icns_bcop.H @@ -45,22 +45,21 @@ struct BCOp gradp.set_default_fillpatch_bc(m_time); } - /** Apply boundary conditions before a linear solve + /** Apply boundary conditions before a linear solve or compute_diff_term */ void apply_bcs(const FieldState rho_state) { amrex::IntVect ng_diff(1); auto& field = m_fields.field; - const auto bc_time = (rho_state == FieldState::Old) - ? m_time.current_time() - : m_time.new_time(); if ((rho_state != FieldState::Old && rho_state != FieldState::New)) { amrex::Abort( "icns_bcop.H apply_bcs(): a state other than New or Old was " - "used. The method of setting bc_time must be evaluated before " + "used. The time used for fillphysbc must be evaluated before " "using a different state for this routine.\n"); } - field.fillphysbc(bc_time, ng_diff); + if (rho_state == FieldState::New) { + field.fillphysbc(m_time.new_time(), ng_diff); + } field.apply_bc_funcs(rho_state); } diff --git a/amr-wind/equation_systems/vof/vof_bcop.H b/amr-wind/equation_systems/vof/vof_bcop.H index 3987288c5a..7fb122e1ff 100644 --- a/amr-wind/equation_systems/vof/vof_bcop.H +++ b/amr-wind/equation_systems/vof/vof_bcop.H @@ -31,16 +31,15 @@ struct BCOp { amrex::IntVect ng_diff(1); auto& field = m_fields.field; - const auto bc_time = (rho_state == FieldState::Old) - ? m_time.current_time() - : m_time.new_time(); if ((rho_state != FieldState::Old && rho_state != FieldState::New)) { amrex::Abort( "vof_bcop.H apply_bcs(): a state other than New or Old was " - "used. The method of setting bc_time must be evaluated before " + "used. The time used for fillphysbc must be evaluated before " "using a different state for this routine."); } - field.fillphysbc(bc_time, ng_diff); + if (rho_state == FieldState::New) { + field.fillphysbc(m_time.new_time(), ng_diff); + } field.apply_bc_funcs(rho_state); } diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f66583504c..0760915c89 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -232,6 +232,7 @@ add_test_re(zalesak_disk_godunov) add_test_re(dam_break_godunov) #add_test_re(sloshing_tank) add_test_re(abl_godunov_weno) +add_test_re(abl_godunov_wenoz_fixedpt) add_test_re(abl_godunov_ppm) add_test_re(abl_amd_wenoz) add_test_re(ib_ctv_godunov_weno)