@@ -9,7 +9,8 @@ ApplySpongeZoneBCsForCC (
9
9
const Geometry geom,
10
10
const Box& bx,
11
11
const Array4<Real>& cell_rhs,
12
- const Array4<const Real>& cell_data)
12
+ const Array4<const Real>& cell_data,
13
+ const Array4<const Real>& z_phys_cc)
13
14
{
14
15
// Domain cell size and real bounds
15
16
auto dx = geom.CellSizeArray ();
@@ -46,8 +47,6 @@ ApplySpongeZoneBCsForCC (
46
47
int domhi_x = domain.bigEnd (0 ) + 1 ;
47
48
int domlo_y = domain.smallEnd (1 );
48
49
int domhi_y = domain.bigEnd (1 ) + 1 ;
49
- int domlo_z = domain.smallEnd (2 );
50
- int domhi_z = domain.bigEnd (2 ) + 1 ;
51
50
52
51
if (use_xlo_sponge_damping)AMREX_ALWAYS_ASSERT (xlo_sponge_end > ProbLoArr[0 ]);
53
52
if (use_xhi_sponge_damping)AMREX_ALWAYS_ASSERT (xhi_sponge_start < ProbHiArr[0 ]);
@@ -60,11 +59,10 @@ ApplySpongeZoneBCsForCC (
60
59
{
61
60
int ii = amrex::min (amrex::max (i, domlo_x), domhi_x);
62
61
int jj = amrex::min (amrex::max (j, domlo_y), domhi_y);
63
- int kk = amrex::min (amrex::max (k, domlo_z), domhi_z);
64
62
65
63
Real x = ProbLoArr[0 ] + (ii+0.5 ) * dx[0 ];
66
64
Real y = ProbLoArr[1 ] + (jj+0.5 ) * dx[1 ];
67
- Real z = ProbLoArr[ 2 ] + (kk+ 0.5 ) * dx[ 2 ] ;
65
+ Real z = z_phys_cc (i,j,k) ;
68
66
69
67
// x left sponge
70
68
if (use_xlo_sponge_damping){
@@ -125,7 +123,9 @@ ApplySpongeZoneBCsForMom (
125
123
const Array4<Real>& rho_w_rhs,
126
124
const Array4<const Real>& rho_u,
127
125
const Array4<const Real>& rho_v,
128
- const Array4<const Real>& rho_w)
126
+ const Array4<const Real>& rho_w,
127
+ const Array4<const Real>& z_phys_nd,
128
+ const Array4<const Real>& z_phys_cc)
129
129
{
130
130
// Domain cell size and real bounds
131
131
auto dx = geom.CellSizeArray ();
@@ -165,8 +165,6 @@ ApplySpongeZoneBCsForMom (
165
165
int domhi_x = domain.bigEnd (0 ) + 1 ;
166
166
int domlo_y = domain.smallEnd (1 );
167
167
int domhi_y = domain.bigEnd (1 ) + 1 ;
168
- int domlo_z = domain.smallEnd (2 );
169
- int domhi_z = domain.bigEnd (2 ) + 1 ;
170
168
171
169
if (use_xlo_sponge_damping)AMREX_ALWAYS_ASSERT (xlo_sponge_end > ProbLoArr[0 ]);
172
170
if (use_xhi_sponge_damping)AMREX_ALWAYS_ASSERT (xhi_sponge_start < ProbHiArr[0 ]);
@@ -179,11 +177,10 @@ ApplySpongeZoneBCsForMom (
179
177
{
180
178
int ii = amrex::min (amrex::max (i, domlo_x), domhi_x);
181
179
int jj = amrex::min (amrex::max (j, domlo_y), domhi_y);
182
- int kk = amrex::min (amrex::max (k, domlo_z), domhi_z);
183
180
184
181
Real x = ProbLoArr[0 ] + ii * dx[0 ];
185
182
Real y = ProbLoArr[1 ] + (jj+0.5 ) * dx[1 ];
186
- Real z = ProbLoArr[ 2 ] + (kk+ 0.5 ) * dx[ 2 ] ;
183
+ Real z = z_phys_cc (i,j,k) ;
187
184
188
185
// x lo sponge
189
186
if (use_xlo_sponge_damping){
@@ -238,11 +235,10 @@ ApplySpongeZoneBCsForMom (
238
235
{
239
236
int ii = amrex::min (amrex::max (i, domlo_x), domhi_x);
240
237
int jj = amrex::min (amrex::max (j, domlo_y), domhi_y);
241
- int kk = amrex::min (amrex::max (k, domlo_z), domhi_z);
242
238
243
239
Real x = ProbLoArr[0 ] + (ii+0.5 ) * dx[0 ];
244
240
Real y = ProbLoArr[1 ] + jj * dx[1 ];
245
- Real z = ProbLoArr[ 2 ] + (kk+ 0.5 ) * dx[ 2 ] ;
241
+ Real z = z_phys_cc (i,j,k) ;
246
242
247
243
// x lo sponge
248
244
if (use_xlo_sponge_damping){
@@ -297,11 +293,10 @@ ApplySpongeZoneBCsForMom (
297
293
{
298
294
int ii = amrex::min (amrex::max (i, domlo_x), domhi_x);
299
295
int jj = amrex::min (amrex::max (j, domlo_y), domhi_y);
300
- int kk = amrex::min (amrex::max (k, domlo_z), domhi_z);
301
296
302
297
Real x = ProbLoArr[0 ] + (ii+0.5 ) * dx[0 ];
303
298
Real y = ProbLoArr[1 ] + (jj+0.5 ) * dx[1 ];
304
- Real z = ProbLoArr[ 2 ] + kk * dx[ 2 ] ;
299
+ Real z = z_phys_nd (i,j,k) ;
305
300
306
301
// x left sponge
307
302
if (use_xlo_sponge_damping){
0 commit comments