Skip to content

Commit

Permalink
Fix for when a new level is created (#98)
Browse files Browse the repository at this point in the history
Also correct incflo.H include guard, a typo and a couple outdated
comments.
  • Loading branch information
cgilet authored Apr 16, 2024
1 parent dda01f2 commit 9c46952
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
1 change: 1 addition & 0 deletions src/incflo.H
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#ifndef INCFLO_H_
#define INCFLO_H_

#include <AMReX_AmrCore.H>
#include <AMReX_MultiFabUtil.H>
Expand Down
6 changes: 4 additions & 2 deletions src/incflo_apply_predictor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(),
Expand Down
7 changes: 3 additions & 4 deletions src/incflo_regrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Hydro::MacProjector>(Geom(0,finest_level),
macproj = std::make_unique<Hydro::MacProjector>(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<Hydro::MacProjector>(Geom(0,finest_level));
macproj = std::make_unique<Hydro::MacProjector>(Geom(0,lev));
#endif
}

Expand Down

0 comments on commit 9c46952

Please sign in to comment.