AMReX-Hydro
AMReX-based hydro routines for low Mach number flows
 
Loading...
Searching...
No Matches
hydro_godunov.H
Go to the documentation of this file.
1/**
2 * \file hydro_godunov.H
3 *
4 * \addtogroup Godunov
5 * @{
6 */
7
8#ifndef HYDRO_GODUNOV_H
9#define HYDRO_GODUNOV_H
10
11#include <AMReX_MultiFabUtil.H>
12#include <AMReX_BCRec.H>
13#include <hydro_godunov_ppm.H>
14
15namespace Godunov {
16
17/**
18 * \brief Extrapolate the velocity to faces, for use as the pre-MAC velocity.
19 *
20 * \note Ghost-cell requirements: a_vel needs 3 filled ghost cells, and
21 * a_forces needs 1.
22 */
24 amrex::MultiFab const& a_forces,
26 amrex::MultiFab& a_vmac,
27 amrex::MultiFab& a_wmac ),
28 const amrex::Vector<amrex::BCRec> & h_bcrec,
29 const amrex::BCRec * d_bcrec,
30 const amrex::Geometry& geom, amrex::Real l_dt,
31 bool use_ppm, bool use_forces_in_trans,
32 int limiter_type = PPM::VanLeer,
33 bool allow_inflow_on_outflow = false,
34 amrex::iMultiFab const* BC_MF = nullptr);
35
37 amrex::Box const& ybx,
38 amrex::Box const& zbx),
41 amrex::Array4<amrex::Real> const& w_ad),
50 const amrex::Box& domain,
51 amrex::Real dt,
52 amrex::BCRec const* pbc,
53 bool use_forces_in_trans,
54 amrex::Array4<int const> const& bc_arr = {});
55
56void ExtrapVelToFacesOnBox (amrex::Box const& bx, int ncomp,
57 AMREX_D_DECL(amrex::Box const& xbx,
58 amrex::Box const& ybx,
59 amrex::Box const& zbx),
74 const amrex::Box& domain,
75 const amrex::Real* dx,
76 amrex::Real dt,
77 amrex::BCRec const* pbc,
78 bool use_forces_in_trans,
79 amrex::Real* p,
80 bool allow_inflow_on_outflow = false,
81 amrex::Array4<int const> const& bc_arr = {});
82
83/**
84 * \brief Compute the edge state of q.
85 *
86 * \note Ghost-cell requirements: q needs 3 filled ghost cells, the MAC
87 * velocities need 1, and divu needs 1.
88 * \note divu must be a valid Array4 in 3D for every component: it is read
89 * through the corner coupling when iconserv[n] is set, and through the
90 * final edge-state update when it is not. In 2D it is only read when
91 * iconserv[n] is not set.
92 */
93void ComputeEdgeState ( amrex::Box const& bx, int ncomp,
97 amrex::Array4<amrex::Real> const& yedge,
98 amrex::Array4<amrex::Real> const& zedge),
104 amrex::Geometry geom,
105 amrex::Real dt,
106 amrex::BCRec const* pbc,
107 int const* iconserv,
108 bool use_ppm, bool use_forces_in_trans,
109 bool is_velocity,
110 int limiter_type = PPM::VanLeer,
111 bool allow_inflow_on_outflow = false,
112 amrex::Array4<int const> const& bc_arr = {});
113}
114
115#endif
116/** @} */
#define AMREX_D_DECL(a, b, c)
amrex_real Real
Definition hydro_godunov.H:15
void ExtrapVelToFacesOnBox(amrex::Box const &bx, int ncomp, AMREX_D_DECL(amrex::Box const &xbx, amrex::Box const &ybx, amrex::Box const &zbx), AMREX_D_DECL(amrex::Array4< amrex::Real > const &qx, amrex::Array4< amrex::Real > const &qy, amrex::Array4< amrex::Real > const &qz), amrex::Array4< amrex::Real const > const &q, AMREX_D_DECL(amrex::Array4< amrex::Real const > const &u_ad, amrex::Array4< amrex::Real const > const &v_ad, amrex::Array4< amrex::Real const > const &w_ad), AMREX_D_DECL(amrex::Array4< amrex::Real > const &Imx, amrex::Array4< amrex::Real > const &Imy, amrex::Array4< amrex::Real > const &Imz), AMREX_D_DECL(amrex::Array4< amrex::Real > const &Ipx, amrex::Array4< amrex::Real > const &Ipy, amrex::Array4< amrex::Real > const &Ipz), amrex::Array4< amrex::Real const > const &f, const amrex::Box &domain, const amrex::Real *dx, amrex::Real dt, amrex::BCRec const *pbc, bool use_forces_in_trans, amrex::Real *p, bool allow_inflow_on_outflow=false, amrex::Array4< int const > const &bc_arr={})
void ExtrapVelToFaces(amrex::MultiFab const &a_vel, amrex::MultiFab const &a_forces, AMREX_D_DECL(amrex::MultiFab &a_umac, amrex::MultiFab &a_vmac, amrex::MultiFab &a_wmac), const amrex::Vector< amrex::BCRec > &h_bcrec, const amrex::BCRec *d_bcrec, const amrex::Geometry &geom, amrex::Real l_dt, bool use_ppm, bool use_forces_in_trans, int limiter_type=PPM::VanLeer, bool allow_inflow_on_outflow=false, amrex::iMultiFab const *BC_MF=nullptr)
Extrapolate the velocity to faces, for use as the pre-MAC velocity.
void ComputeAdvectiveVel(AMREX_D_DECL(amrex::Box const &xbx, amrex::Box const &ybx, amrex::Box const &zbx), AMREX_D_DECL(amrex::Array4< amrex::Real > const &u_ad, amrex::Array4< amrex::Real > const &v_ad, amrex::Array4< amrex::Real > const &w_ad), AMREX_D_DECL(amrex::Array4< amrex::Real const > const &Imx, amrex::Array4< amrex::Real const > const &Imy, amrex::Array4< amrex::Real const > const &Imz), AMREX_D_DECL(amrex::Array4< amrex::Real const > const &Ipx, amrex::Array4< amrex::Real const > const &Ipy, amrex::Array4< amrex::Real const > const &Ipz), amrex::Array4< amrex::Real const > const &vel, amrex::Array4< amrex::Real const > const &f, const amrex::Box &domain, amrex::Real dt, amrex::BCRec const *pbc, bool use_forces_in_trans, amrex::Array4< int const > const &bc_arr={})
void ComputeEdgeState(amrex::Box const &bx, int ncomp, amrex::Array4< amrex::Real const > const &q, amrex::Array4< amrex::Real const > const &qnph, AMREX_D_DECL(amrex::Array4< amrex::Real > const &xedge, amrex::Array4< amrex::Real > const &yedge, amrex::Array4< amrex::Real > const &zedge), AMREX_D_DECL(amrex::Array4< amrex::Real const > const &umac, amrex::Array4< amrex::Real const > const &vmac, amrex::Array4< amrex::Real const > const &wmac), amrex::Array4< amrex::Real const > const &divu, amrex::Array4< amrex::Real const > const &fq, amrex::Geometry geom, amrex::Real dt, amrex::BCRec const *pbc, int const *iconserv, bool use_ppm, bool use_forces_in_trans, bool is_velocity, int limiter_type=PPM::VanLeer, bool allow_inflow_on_outflow=false, amrex::Array4< int const > const &bc_arr={})
Compute the edge state of q.
@ VanLeer
Definition hydro_godunov_ppm.H:85