Skip to content

Commit

Permalink
make compatible with current IAMR (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
asalmgren authored Aug 12, 2024
1 parent a51a1b3 commit 3bcb1de
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
49 changes: 49 additions & 0 deletions Utils/hydro_compute_edgestate_and_flux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,55 @@ HydroUtils::ComputeFluxesOnBoxFromState (Box const& bx, int ncomp, MFIter& mfi,

}

void
HydroUtils::ComputeFluxesOnBoxFromState (Box const& bx, int ncomp, MFIter& mfi,
Array4<Real const> const& q,
AMREX_D_DECL(Array4<Real> const& flux_x,
Array4<Real> const& flux_y,
Array4<Real> const& flux_z),
AMREX_D_DECL(Array4<Real> const& face_x,
Array4<Real> const& face_y,
Array4<Real> const& face_z),
bool knownFaceState,
AMREX_D_DECL(Array4<Real const> const& u_mac,
Array4<Real const> const& v_mac,
Array4<Real const> const& w_mac),
AMREX_D_DECL(Array4<Real const> const& u_flux,
Array4<Real const> const& v_flux,
Array4<Real const> const& w_flux),
Array4<Real const> const& divu,
Array4<Real const> const& fq,
Geometry geom, Real l_dt,
Vector<BCRec> const& h_bcrec,
const BCRec* d_bcrec,
int const* iconserv,
#ifdef AMREX_USE_EB
const EBFArrayBoxFactory& ebfact,
Array4<Real const> const& values_on_eb_inflow,
#endif
bool godunov_use_ppm, bool godunov_use_forces_in_trans,
bool is_velocity, bool fluxes_are_area_weighted,
std::string const& advection_type,
int limiter_type,
bool allow_inflow_on_outflow,
amrex::Array4<int const> const& bc_arr)

{
ComputeFluxesOnBoxFromState(bx, ncomp, mfi, q, q,
AMREX_D_DECL(flux_x, flux_y, flux_z),
AMREX_D_DECL(face_x, face_y, face_z),
knownFaceState,
AMREX_D_DECL(u_mac, v_mac, w_mac),
AMREX_D_DECL(u_flux, v_flux, w_flux),
divu, fq, geom, l_dt, h_bcrec, d_bcrec, iconserv,
#ifdef AMREX_USE_EB
ebfact, values_on_eb_inflow,
#endif
godunov_use_ppm, godunov_use_forces_in_trans,
is_velocity, fluxes_are_area_weighted, advection_type,
limiter_type, allow_inflow_on_outflow, bc_arr);
}

void
HydroUtils::ComputeFluxesOnBoxFromState (Box const& bx, int ncomp, MFIter& mfi,
Array4<Real const> const& q,
Expand Down
34 changes: 34 additions & 0 deletions Utils/hydro_utils.H
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,40 @@ ComputeFluxesOnBoxFromState ( amrex::Box const& bx, int ncomp, amrex::MFIter& mf
int limiter_type = PPM::default_limiter,
bool allow_inflow_on_outflow = false,
amrex::Array4<int const> const& bc_arr = {});

void
ComputeFluxesOnBoxFromState ( amrex::Box const& bx, int ncomp, amrex::MFIter& mfi,
amrex::Array4<amrex::Real const> const& q,
AMREX_D_DECL(amrex::Array4<amrex::Real> const& flux_x,
amrex::Array4<amrex::Real> const& flux_y,
amrex::Array4<amrex::Real> const& flux_z),
AMREX_D_DECL(amrex::Array4<amrex::Real> const& face_x,
amrex::Array4<amrex::Real> const& face_y,
amrex::Array4<amrex::Real> const& face_z),
bool knownFaceState,
AMREX_D_DECL(amrex::Array4<amrex::Real const> const& u_mac,
amrex::Array4<amrex::Real const> const& v_mac,
amrex::Array4<amrex::Real const> const& w_mac),
AMREX_D_DECL(amrex::Array4<amrex::Real const> const& u_flux,
amrex::Array4<amrex::Real const> const& v_flux,
amrex::Array4<amrex::Real const> const& w_flux),
amrex::Array4<amrex::Real const> const& divu,
amrex::Array4<amrex::Real const> const& fq,
amrex::Geometry geom,
amrex::Real l_dt,
amrex::Vector<amrex::BCRec> const& h_bcrec,
const amrex::BCRec* d_bcrec,
int const* iconserv,
#ifdef AMREX_USE_EB
const amrex::EBFArrayBoxFactory& ebfact,
amrex::Array4<amrex::Real const> const& values_on_eb_inflow,
#endif
bool godunov_use_ppm, bool godunov_use_forces_in_trans,
bool is_velocity, bool fluxes_are_area_weighted,
std::string const& advection_type,
int limiter_type = PPM::default_limiter,
bool allow_inflow_on_outflow = false,
amrex::Array4<int const> const& bc_arr = {});
/**
* \brief Compute edge state and flux. Allows inflow on EB but NOT time-dependent inflow.
*
Expand Down

0 comments on commit 3bcb1de

Please sign in to comment.