ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_NumericalDiffusion.H
Go to the documentation of this file.
1 #ifndef ERF_NUMERICALDIFFUSION_H_
2 #define ERF_NUMERICALDIFFUSION_H_
3 
4 #include <AMReX.H>
5 #include <ERF_DataStruct.H>
6 #include <AMReX_MultiFab.H>
7 
8 AMREX_GPU_DEVICE
9 AMREX_FORCE_INLINE
10 amrex::Real
11 calc_fifth_order_deriv (const amrex::Real& dnp2,
12  const amrex::Real& dnp1,
13  const amrex::Real& dn,
14  const amrex::Real& dnm1,
15  const amrex::Real& dnm2,
16  const amrex::Real& dnm3)
17 {
18  amrex::Real interp = 10. * (dn - dnm1)
19  - 5. * (dnp1 - dnm2)
20  + (dnp2 - dnm3);
21  return interp;
22 }
23 
24 void NumericalDiffusion_Scal (const amrex::Box& bx,
25  const int start_comp,
26  const int num_comp,
27  const amrex::Real dt,
28  const amrex::Real num_diff_coeff,
29  const amrex::Array4<const amrex::Real>& prim_data,
30  const amrex::Array4<const amrex::Real>& cell_data,
31  const amrex::Array4< amrex::Real>& rhs,
32  const amrex::Array4<const amrex::Real>& mf);
33 
34 void NumericalDiffusion_Xmom (const amrex::Box& bx,
35  const amrex::Real dt,
36  const amrex::Real num_diff_coeff,
37  const amrex::Array4<const amrex::Real>& prim_data,
38  const amrex::Array4<const amrex::Real>& cell_data,
39  const amrex::Array4< amrex::Real>& rhs,
40  const amrex::Array4<const amrex::Real>& mf);
41 
42 void NumericalDiffusion_Ymom (const amrex::Box& bx,
43  const amrex::Real dt,
44  const amrex::Real num_diff_coeff,
45  const amrex::Array4<const amrex::Real>& prim_data,
46  const amrex::Array4<const amrex::Real>& cell_data,
47  const amrex::Array4< amrex::Real>& rhs,
48  const amrex::Array4<const amrex::Real>& mf);
49 #endif
void NumericalDiffusion_Scal(const amrex::Box &bx, const int start_comp, const int num_comp, const amrex::Real dt, const amrex::Real num_diff_coeff, const amrex::Array4< const amrex::Real > &prim_data, const amrex::Array4< const amrex::Real > &cell_data, const amrex::Array4< amrex::Real > &rhs, const amrex::Array4< const amrex::Real > &mf)
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real calc_fifth_order_deriv(const amrex::Real &dnp2, const amrex::Real &dnp1, const amrex::Real &dn, const amrex::Real &dnm1, const amrex::Real &dnm2, const amrex::Real &dnm3)
Definition: ERF_NumericalDiffusion.H:11
void NumericalDiffusion_Xmom(const amrex::Box &bx, const amrex::Real dt, const amrex::Real num_diff_coeff, const amrex::Array4< const amrex::Real > &prim_data, const amrex::Array4< const amrex::Real > &cell_data, const amrex::Array4< amrex::Real > &rhs, const amrex::Array4< const amrex::Real > &mf)
void NumericalDiffusion_Ymom(const amrex::Box &bx, const amrex::Real dt, const amrex::Real num_diff_coeff, const amrex::Array4< const amrex::Real > &prim_data, const amrex::Array4< const amrex::Real > &cell_data, const amrex::Array4< amrex::Real > &rhs, const amrex::Array4< const amrex::Real > &mf)