AMReX-Hydro
AMReX-based hydro routines for low Mach number flows
hydro_bds.H
Go to the documentation of this file.
1 /**
2  * \file hydro_bds.H
3  *
4  * \addtogroup BDS
5  * @{
6  */
7 
8 #ifndef HYDRO_BDS_H
9 #define HYDRO_BDS_H
10 
11 #include <AMReX_MultiFabUtil.H>
12 #include <AMReX_BCRec.H>
13 
14 /**
15  * Collection of routines for the BDS (Bell-Dawson-Shubin) algorithm.
16  */
17 namespace BDS {
18 
19 /**
20  * Uses the Bell-Dawson-Shubin (BDS) algorithm, a higher order Godunov
21  * method for scalar conservation laws in three dimensions, to compute
22  * edge states.
23  *
24  * \param [in] bx Current grid patch
25  * \param [in] ncomp Number of components to work on
26  * \param [in] q Array4 of state, starting at component of interest
27  * \param [in,out] xedge Array4 containing x-edges, starting at component of interest
28  * \param [in,out] yedge Array4 containing y-edges, starting at component of interest
29  * \param [in,out] zedge Array4 containing z-edges, starting at component of interest
30  * \param [in] umac x-Face velocities.
31  * \param [in] vmac y-Face velocities.
32  * \param [in] wmac z-Face velocities.
33  * \param [in] fq Array4 for forces, starting at component of interest
34  * \param [in] geom Level geometry.
35  * \param [in] l_dt Time step.
36  * \param [in] h_bcrec Boundary conditions (host).
37  * \param [in] pbc Boundary conditions (device).
38  * \param [in] iconserv If true, use conservative form, otherwise use convective.
39  * \param [in] is_velocity Indicates a component is velocity so boundary conditions can
40  * be properly addressed. The header hydro_constants.H
41  * defines the component position by [XYZ]VEL macro.
42  */
43 
44 void ComputeEdgeState ( amrex::Box const& bx, int ncomp,
47  amrex::Array4<amrex::Real> const& yedge,
48  amrex::Array4<amrex::Real> const& zedge),
54  amrex::Geometry geom,
55  amrex::Real l_dt,
56  amrex::Vector<amrex::BCRec> const& h_bcrec,
57  amrex::BCRec const* pbc,
58  int const* iconserv,
59  bool is_velocity);
60 
61 /**
62  * Compute bilinear slopes for BDS algorithm.
63  *
64  * \param [in] bx Current grid patch
65  * \param [in] geom Level geometry.
66  * \param [in] icomp Component of the state Array4.
67  * \param [in] s Array4<const> of state vector.
68  * \param [out] slopes Array4 to store slope information.
69  * \param [in] h_bcrec Boundary conditions (host).
70  *
71  */
72 
73 void ComputeSlopes ( amrex::Box const& bx,
74  const amrex::Geometry& geom,
75  int icomp,
77  amrex::Array4<amrex::Real > const& slopes,
78  amrex::Vector<amrex::BCRec> const& h_bcrec);
79 
80 /**
81  * Compute Conc for BDS algorithm.
82  *
83  * \param [in] bx Current grid patch
84  * \param [in] geom Level geometry.
85  * \param [in] icomp Component of the Array4s.
86  * \param [in] s Array4 of state.
87  * \param [in,out] sedgex Array4 containing x-edges.
88  * \param [in,out] sedgey Array4 containing y-edges.
89  * \param [in,out] sedgez Array4 containing z-edges.
90  * \param [in] slopes Array4 containing slope information.
91  * \param [in] umac Array4 for u-face velocity.
92  * \param [in] vmac Array4 for v-face velocity.
93  * \param [in] wmac Array4 for z-face velocity.
94  * \param [in] force Array4 for forces.
95  * \param [in] iconserv If true, use conservative form, otherwise use convective.
96  * \param [in] dt Time step.
97  * \param [in] h_bcrec Boundary conditions (host).
98  * \param [in] pbc Boundary conditions (device).
99  * \param [in] is_velocity Indicates a component is velocity so boundary conditions can
100  * be properly addressed. The header hydro_constants.H
101  * defines the component position by [XYZ]VEL macro.
102  *
103  *
104  */
105 
106 void ComputeConc ( amrex::Box const& bx,
107  const amrex::Geometry& geom,
108  int icomp,
111  amrex::Array4<amrex::Real > const& sedgey,
112  amrex::Array4<amrex::Real > const& sedgez),
113  amrex::Array4<amrex::Real const> const& slopes,
119  int const* iconserv,
120  amrex::Real dt,
121  amrex::Vector<amrex::BCRec> const& h_bcrec,
122  amrex::BCRec const* pbc,
123  bool is_velocity);
124 
125 }
126 #endif
127 /** @} */
#define AMREX_D_DECL(a, b, c)
Definition: hydro_bds.H:17
void ComputeConc(amrex::Box const &bx, const amrex::Geometry &geom, int icomp, amrex::Array4< amrex::Real const > const &s, AMREX_D_DECL(amrex::Array4< amrex::Real > const &sedgex, amrex::Array4< amrex::Real > const &sedgey, amrex::Array4< amrex::Real > const &sedgez), amrex::Array4< amrex::Real const > const &slopes, 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 &force, int const *iconserv, amrex::Real dt, amrex::Vector< amrex::BCRec > const &h_bcrec, amrex::BCRec const *pbc, bool is_velocity)
void ComputeSlopes(amrex::Box const &bx, const amrex::Geometry &geom, int icomp, amrex::Array4< amrex::Real const > const &s, amrex::Array4< amrex::Real > const &slopes, amrex::Vector< amrex::BCRec > const &h_bcrec)
void ComputeEdgeState(amrex::Box const &bx, int ncomp, amrex::Array4< amrex::Real const > const &q, 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 l_dt, amrex::Vector< amrex::BCRec > const &h_bcrec, amrex::BCRec const *pbc, int const *iconserv, bool is_velocity)