From 9c4695252b4216ab2db33b42bedd25eb17a68fb4 Mon Sep 17 00:00:00 2001 From: Candace Gilet Date: Mon, 15 Apr 2024 21:55:35 -0400 Subject: [PATCH] Fix for when a new level is created (#98) Also correct incflo.H include guard, a typo and a couple outdated comments. --- .github/workflows/docs.yml | 2 +- src/incflo.H | 1 + src/incflo_apply_predictor.cpp | 6 ++++-- src/incflo_regrid.cpp | 7 +++---- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9c06450e..9151622c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -31,5 +31,5 @@ jobs: ssh-key: ${{ secrets.DEPLOY_KEY }} branch: gh-pages # The branch the action should deploy to. folder: Docs/sphinx_documentation/build/html # The folder the action should deploy. - target_folder: docs_html # The folder the action should deploy to. + target-folder: docs_html # The folder the action should deploy to. clean: false # Do not remove existing files from the deploy target. diff --git a/src/incflo.H b/src/incflo.H index ac042e7c..9738c817 100644 --- a/src/incflo.H +++ b/src/incflo.H @@ -1,4 +1,5 @@ #ifndef INCFLO_H_ +#define INCFLO_H_ #include #include diff --git a/src/incflo_apply_predictor.cpp b/src/incflo_apply_predictor.cpp index f353cadf..34f3b71e 100644 --- a/src/incflo_apply_predictor.cpp +++ b/src/incflo_apply_predictor.cpp @@ -11,7 +11,10 @@ using namespace amrex; // else // conv_u = - del dot (rho u u) // conv_r = - div( u rho ) -// conv_t = - div( u trac ) +// if (m_iconserv_tracer) then +// conv_t = - div( u trac ) +// else +// conv_t = - u dot grad trac // eta_old = visosity at m_cur_time // if (m_diff_type == DiffusionType::Explicit) // divtau _old = div( eta ( (grad u) + (grad u)^T ) ) / rho^n @@ -168,7 +171,6 @@ void incflo::ApplyPredictor (bool incremental_projection) // Compute the explicit advective terms R_u^(n+1/2), R_s^(n+1/2) and R_t^(n+1/2) // if (advection_type == "MOL" ) // Compute the explicit advective terms R_u^n , R_s^n and R_t^n - // Note that "get_conv_tracer_old" returns div(rho u tracer) // ************************************************************************************* compute_convective_term(get_conv_velocity_old(), get_conv_density_old(), get_conv_tracer_old(), get_velocity_old_const(), get_density_old_const(), get_tracer_old_const(), diff --git a/src/incflo_regrid.cpp b/src/incflo_regrid.cpp index 802de0dd..278ace38 100644 --- a/src/incflo_regrid.cpp +++ b/src/incflo_regrid.cpp @@ -43,18 +43,17 @@ void incflo::MakeNewLevelFromCoarse (int lev, m_leveldata[lev] = std::move(new_leveldata); m_factory[lev] = std::move(new_fact); - //make_mixedBC_mask(lev, ba, dm); - m_diffusion_tensor_op.reset(); m_diffusion_scalar_op.reset(); + // Note: finest_level has not yet been updated and so we use lev #ifdef AMREX_USE_EB - macproj = std::make_unique(Geom(0,finest_level), + macproj = std::make_unique(Geom(0,lev), MLMG::Location::FaceCentroid, // Location of mac_vec MLMG::Location::FaceCentroid, // Location of beta MLMG::Location::CellCenter ); // Location of solution variable phi #else - macproj = std::make_unique(Geom(0,finest_level)); + macproj = std::make_unique(Geom(0,lev)); #endif }