8 #ifndef HYDRO_GODUNOV_CORNER_COUPLE_H
9 #define HYDRO_GODUNOV_CORNER_COUPLE_H
22 int i,
int j,
int k,
int n, amrex::Real dt, amrex::Real dx,
23 bool iconserv, amrex::Real lo, amrex::Real hi,
35 lo1 += - dt/(amrex::Real(3.0)*dx)*( state(i+1,j-1,k,n)*mac(i+1,j-1,k)
36 -state(i ,j-1,k,n)*mac(i ,j-1,k) )
37 + dt/(amrex::Real(3.0)*dx)*s(i,j-1,k,n)*(mac(i+1,j-1,k)-mac(i,j-1,k));
38 hi1 += - dt/(amrex::Real(3.0)*dx)*( state(i+1,j ,k,n)*mac(i+1,j ,k)
39 -state(i ,j ,k,n)*mac(i ,j ,k) )
40 + dt/(amrex::Real(3.0)*dx)*s(i,j ,k,n)*(mac(i+1,j ,k) - mac(i,j ,k));
43 lo1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i,j-1,k,n)*divu_cc(i,j-1,k) : amrex::Real(0.0);
44 hi1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i,j ,k,n)*divu_cc(i,j ,k) : amrex::Real(0.0);
49 int i,
int j,
int k,
int n, amrex::Real dt, amrex::Real dx,
50 bool iconserv, amrex::Real lo, amrex::Real hi,
62 lo1 += - dt/(amrex::Real(3.0)*dx)*(state(i+1,j,k-1,n)*mac(i+1,j,k-1)
63 - state(i ,j,k-1,n)*mac(i ,j,k-1))
64 + dt/(amrex::Real(3.0)*dx)*s(i,j,k-1,n)*(mac(i+1,j,k-1)-mac(i,j,k-1));
66 hi1 += - dt/(amrex::Real(3.0)*dx)*( state(i+1,j,k ,n)*mac(i+1,j,k )
67 -state(i ,j,k ,n)*mac(i ,j,k ) )
68 + dt/(amrex::Real(3.0)*dx)*s(i,j,k ,n)*(mac(i+1,j,k ) - mac(i,j,k ));
71 lo1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i,j,k-1,n)*divu_cc(i,j,k-1) : amrex::Real(0.0);
72 hi1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i,j,k ,n)*divu_cc(i,j,k ) : amrex::Real(0.0);
77 int i,
int j,
int k,
int n, amrex::Real dt, amrex::Real dy,
78 bool iconserv, amrex::Real lo, amrex::Real hi,
90 lo1 += - dt/(amrex::Real(3.0)*dy)*( state(i-1,j+1,k,n)*mac(i-1,j+1,k)
91 -state(i-1,j ,k,n)*mac(i-1,j ,k) )
92 + dt/(amrex::Real(3.0)*dy)*s(i-1,j,k,n)*(mac(i-1,j+1,k)-mac(i-1,j,k));
93 hi1 += - dt/(amrex::Real(3.0)*dy)*( state(i ,j+1,k,n)*mac(i ,j+1,k)
94 -state(i ,j ,k,n)*mac(i ,j ,k) )
95 + dt/(amrex::Real(3.0)*dy)*s(i,j,k,n)*(mac(i,j+1,k)-mac(i,j,k));
98 lo1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i-1,j,k,n)*divu_cc(i-1,j,k) : amrex::Real(0.0);
99 hi1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i ,j,k,n)*divu_cc(i ,j,k) : amrex::Real(0.0);
104 int i,
int j,
int k,
int n, amrex::Real dt, amrex::Real dy,
105 bool iconserv, amrex::Real lo, amrex::Real hi,
117 lo1 += - dt/(amrex::Real(3.0)*dy)*( state(i,j+1,k-1,n)*mac(i,j+1,k-1)
118 -state(i,j ,k-1,n)*mac(i,j ,k-1) )
119 + dt/(amrex::Real(3.0)*dy)*s(i,j,k-1,n)*(mac(i,j+1,k-1)-mac(i,j,k-1));
120 hi1 += - dt/(amrex::Real(3.0)*dy)*( state(i,j+1,k ,n)*mac(i,j+1,k )
121 -state(i,j ,k ,n)*mac(i,j ,k ) )
122 + dt/(amrex::Real(3.0)*dy)*s(i,j,k,n)*(mac(i,j+1,k) - mac(i,j,k));
125 lo1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i,j,k-1,n)*divu_cc(i,j,k-1) : amrex::Real(0.0);
126 hi1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i,j,k ,n)*divu_cc(i,j,k ) : amrex::Real(0.0);
131 int i,
int j,
int k,
int n, amrex::Real dt, amrex::Real dz,
132 bool iconserv, amrex::Real lo, amrex::Real hi,
144 lo1 += - dt/(amrex::Real(3.0)*dz)*( state(i-1,j,k+1,n)*mac(i-1,j,k+1)
145 -state(i-1,j,k ,n)*mac(i-1,j,k) )
146 + dt/(amrex::Real(3.0)*dz)*s(i-1,j,k,n)*(mac(i-1,j,k+1) - mac(i-1,j,k));
147 hi1 += - dt/(amrex::Real(3.0)*dz)*( state(i ,j,k+1,n)*mac(i ,j,k+1)
148 -state(i ,j,k ,n)*mac(i ,j,k) )
149 + dt/(amrex::Real(3.0)*dz)*s(i,j,k,n)*(mac(i,j,k+1) - mac(i,j,k));
152 lo1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i-1,j,k,n)*divu_cc(i-1,j,k) : amrex::Real(0.0);
153 hi1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i ,j,k,n)*divu_cc(i ,j,k) : amrex::Real(0.0);
158 int i,
int j,
int k,
int n, amrex::Real dt, amrex::Real dz,
159 bool iconserv, amrex::Real lo, amrex::Real hi,
171 lo1 += - dt/(amrex::Real(3.0)*dz)*( state(i,j-1,k+1,n)*mac(i,j-1,k+1)
172 -state(i,j-1,k ,n)*mac(i,j-1,k ) )
173 + dt/(amrex::Real(3.0)*dz)*s(i,j-1,k,n)*(mac(i,j-1,k+1)-mac(i,j-1,k));
174 hi1 += - dt/(amrex::Real(3.0)*dz)*( state(i,j ,k+1,n)*mac(i,j ,k+1)
175 -state(i,j ,k ,n)*mac(i,j ,k ) )
176 + dt/(amrex::Real(3.0)*dz)*s(i,j,k,n)*(mac(i,j,k+1) - mac(i,j,k));
179 lo1 += (iconserv) ? - dt/(amrex::Real(3.0)) * s(i,j-1,k,n)*divu_cc(i,j-1,k) : amrex::Real(0.0);
180 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:18
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:103
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:76
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:130
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:21
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:157
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:48