8 #ifndef HYDRO_GODUNOV_CORNER_COUPLE_H
9 #define HYDRO_GODUNOV_CORNER_COUPLE_H
20 int i,
int j,
int k,
int n, amrex::Real dt, amrex::Real dx,
21 bool iconserv, amrex::Real lo, amrex::Real hi,
33 lo1 += - dt/(amrex::Real(3.0)*dx)*( state(i+1,j-1,k,n)*mac(i+1,j-1,k)
34 -state(i ,j-1,k,n)*mac(i ,j-1,k) )
35 + dt/(amrex::Real(3.0)*dx)*s(i,j-1,k,n)*(mac(i+1,j-1,k)-mac(i,j-1,k));
36 hi1 += - dt/(amrex::Real(3.0)*dx)*( state(i+1,j ,k,n)*mac(i+1,j ,k)
37 -state(i ,j ,k,n)*mac(i ,j ,k) )
38 + dt/(amrex::Real(3.0)*dx)*s(i,j ,k,n)*(mac(i+1,j ,k) - mac(i,j ,k));
41 lo1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i,j-1,k,n)*divu_cc(i,j-1,k) : amrex::Real(0.0);
42 hi1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i,j ,k,n)*divu_cc(i,j ,k) : amrex::Real(0.0);
47 int i,
int j,
int k,
int n, amrex::Real dt, amrex::Real dx,
48 bool iconserv, amrex::Real lo, amrex::Real hi,
60 lo1 += - dt/(amrex::Real(3.0)*dx)*(state(i+1,j,k-1,n)*mac(i+1,j,k-1)
61 - state(i ,j,k-1,n)*mac(i ,j,k-1))
62 + dt/(amrex::Real(3.0)*dx)*s(i,j,k-1,n)*(mac(i+1,j,k-1)-mac(i,j,k-1));
64 hi1 += - dt/(amrex::Real(3.0)*dx)*( state(i+1,j,k ,n)*mac(i+1,j,k )
65 -state(i ,j,k ,n)*mac(i ,j,k ) )
66 + dt/(amrex::Real(3.0)*dx)*s(i,j,k ,n)*(mac(i+1,j,k ) - mac(i,j,k ));
69 lo1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i,j,k-1,n)*divu_cc(i,j,k-1) : amrex::Real(0.0);
70 hi1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i,j,k ,n)*divu_cc(i,j,k ) : amrex::Real(0.0);
75 int i,
int j,
int k,
int n, amrex::Real dt, amrex::Real dy,
76 bool iconserv, amrex::Real lo, amrex::Real hi,
88 lo1 += - dt/(amrex::Real(3.0)*dy)*( state(i-1,j+1,k,n)*mac(i-1,j+1,k)
89 -state(i-1,j ,k,n)*mac(i-1,j ,k) )
90 + dt/(amrex::Real(3.0)*dy)*s(i-1,j,k,n)*(mac(i-1,j+1,k)-mac(i-1,j,k));
91 hi1 += - dt/(amrex::Real(3.0)*dy)*( state(i ,j+1,k,n)*mac(i ,j+1,k)
92 -state(i ,j ,k,n)*mac(i ,j ,k) )
93 + dt/(amrex::Real(3.0)*dy)*s(i,j,k,n)*(mac(i,j+1,k)-mac(i,j,k));
96 lo1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i-1,j,k,n)*divu_cc(i-1,j,k) : amrex::Real(0.0);
97 hi1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i ,j,k,n)*divu_cc(i ,j,k) : amrex::Real(0.0);
102 int i,
int j,
int k,
int n, amrex::Real dt, amrex::Real dy,
103 bool iconserv, amrex::Real lo, amrex::Real hi,
115 lo1 += - dt/(amrex::Real(3.0)*dy)*( state(i,j+1,k-1,n)*mac(i,j+1,k-1)
116 -state(i,j ,k-1,n)*mac(i,j ,k-1) )
117 + dt/(amrex::Real(3.0)*dy)*s(i,j,k-1,n)*(mac(i,j+1,k-1)-mac(i,j,k-1));
118 hi1 += - dt/(amrex::Real(3.0)*dy)*( state(i,j+1,k ,n)*mac(i,j+1,k )
119 -state(i,j ,k ,n)*mac(i,j ,k ) )
120 + dt/(amrex::Real(3.0)*dy)*s(i,j,k,n)*(mac(i,j+1,k) - mac(i,j,k));
123 lo1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i,j,k-1,n)*divu_cc(i,j,k-1) : amrex::Real(0.0);
124 hi1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i,j,k ,n)*divu_cc(i,j,k ) : amrex::Real(0.0);
129 int i,
int j,
int k,
int n, amrex::Real dt, amrex::Real dz,
130 bool iconserv, amrex::Real lo, amrex::Real hi,
142 lo1 += - dt/(amrex::Real(3.0)*dz)*( state(i-1,j,k+1,n)*mac(i-1,j,k+1)
143 -state(i-1,j,k ,n)*mac(i-1,j,k) )
144 + dt/(amrex::Real(3.0)*dz)*s(i-1,j,k,n)*(mac(i-1,j,k+1) - mac(i-1,j,k));
145 hi1 += - dt/(amrex::Real(3.0)*dz)*( state(i ,j,k+1,n)*mac(i ,j,k+1)
146 -state(i ,j,k ,n)*mac(i ,j,k) )
147 + dt/(amrex::Real(3.0)*dz)*s(i,j,k,n)*(mac(i,j,k+1) - mac(i,j,k));
150 lo1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i-1,j,k,n)*divu_cc(i-1,j,k) : amrex::Real(0.0);
151 hi1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i ,j,k,n)*divu_cc(i ,j,k) : amrex::Real(0.0);
156 int i,
int j,
int k,
int n, amrex::Real dt, amrex::Real dz,
157 bool iconserv, amrex::Real lo, amrex::Real hi,
169 lo1 += - dt/(amrex::Real(3.0)*dz)*( state(i,j-1,k+1,n)*mac(i,j-1,k+1)
170 -state(i,j-1,k ,n)*mac(i,j-1,k ) )
171 + dt/(amrex::Real(3.0)*dz)*s(i,j-1,k,n)*(mac(i,j-1,k+1)-mac(i,j-1,k));
172 hi1 += - dt/(amrex::Real(3.0)*dz)*( state(i,j ,k+1,n)*mac(i,j ,k+1)
173 -state(i,j ,k ,n)*mac(i,j ,k ) )
174 + dt/(amrex::Real(3.0)*dz)*s(i,j,k,n)*(mac(i,j,k+1) - mac(i,j,k));
177 lo1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i,j-1,k,n)*divu_cc(i,j-1,k) : amrex::Real(0.0);
178 hi1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i,j ,k,n)*divu_cc(i,j ,k) : amrex::Real(0.0);
#define AMREX_FORCE_INLINE
#define AMREX_GPU_HOST_DEVICE
Definition: hydro_godunov_corner_couple.H:16
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void AddCornerCoupleTermZY(amrex::Real &lo1, amrex::Real &hi1, int i, int j, int k, int n, amrex::Real dt, amrex::Real dy, bool iconserv, amrex::Real lo, amrex::Real hi, amrex::Array4< amrex::Real const > const &s, amrex::Array4< amrex::Real const > const &divu_cc, amrex::Array4< amrex::Real const > const &mac, amrex::Array4< amrex::Real const > const &state)
Definition: hydro_godunov_corner_couple.H:101
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void AddCornerCoupleTermXY(amrex::Real &lo1, amrex::Real &hi1, int i, int j, int k, int n, amrex::Real dt, amrex::Real dy, bool iconserv, amrex::Real lo, amrex::Real hi, amrex::Array4< amrex::Real const > const &s, amrex::Array4< amrex::Real const > const &divu_cc, amrex::Array4< amrex::Real const > const &mac, amrex::Array4< amrex::Real const > const &state)
Definition: hydro_godunov_corner_couple.H:74
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void AddCornerCoupleTermXZ(amrex::Real &lo1, amrex::Real &hi1, int i, int j, int k, int n, amrex::Real dt, amrex::Real dz, bool iconserv, amrex::Real lo, amrex::Real hi, amrex::Array4< amrex::Real const > const &s, amrex::Array4< amrex::Real const > const &divu_cc, amrex::Array4< amrex::Real const > const &mac, amrex::Array4< amrex::Real const > const &state)
Definition: hydro_godunov_corner_couple.H:128
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void AddCornerCoupleTermYX(amrex::Real &lo1, amrex::Real &hi1, int i, int j, int k, int n, amrex::Real dt, amrex::Real dx, bool iconserv, amrex::Real lo, amrex::Real hi, amrex::Array4< amrex::Real const > const &s, amrex::Array4< amrex::Real const > const &divu_cc, amrex::Array4< amrex::Real const > const &mac, amrex::Array4< amrex::Real const > const &state)
Definition: hydro_godunov_corner_couple.H:19
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void AddCornerCoupleTermYZ(amrex::Real &lo1, amrex::Real &hi1, int i, int j, int k, int n, amrex::Real dt, amrex::Real dz, bool iconserv, amrex::Real lo, amrex::Real hi, amrex::Array4< amrex::Real const > const &s, amrex::Array4< amrex::Real const > const &divu_cc, amrex::Array4< amrex::Real const > const &mac, amrex::Array4< amrex::Real const > const &state)
Definition: hydro_godunov_corner_couple.H:155
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void AddCornerCoupleTermZX(amrex::Real &lo1, amrex::Real &hi1, int i, int j, int k, int n, amrex::Real dt, amrex::Real dx, bool iconserv, amrex::Real lo, amrex::Real hi, amrex::Array4< amrex::Real const > const &s, amrex::Array4< amrex::Real const > const &divu_cc, amrex::Array4< amrex::Real const > const &mac, amrex::Array4< amrex::Real const > const &state)
Definition: hydro_godunov_corner_couple.H:46