Block-Structured AMR Software Framework
 
Loading...
Searching...
No Matches
AMReX_MLNodeLap_1D_K.H
Go to the documentation of this file.
1#ifndef AMREX_MLNODELAP_1D_K_H_
2#define AMREX_MLNODELAP_1D_K_H_
3#include <AMReX_Config.H>
4
5namespace amrex {
6
8void mlndlap_zero_fine (int i, int, int, Array4<Real> const& phi,
9 Array4<int const> const& msk, int fine_flag) noexcept
10{
11 // Testing if the node is covered by a fine level in computing
12 // coarse sync residual
13 if (msk(i-1,0,0) == fine_flag &&
14 msk(i ,0,0) == fine_flag)
15 {
16 phi(i,0,0) = Real(0.0);
17 }
18}
19
21void mlndlap_avgdown_coeff_x (int i, int, int, Array4<Real> const& crse,
22 Array4<Real const> const& fine) noexcept
23{
24 Real a = fine(2*i ,0,0);
25 Real b = fine(2*i+1,0,0);
26 crse(i,0,0) = Real(2.0)*a*b/(a+b);
27}
28
30void mlndlap_semi_avgdown_coeff (int i, int j, int k, Array4<Real> const& crse,
31 Array4<Real const> const& fine, int) noexcept
32{
34}
35
37Real mlndlap_adotx_c (int i, int, int, Array4<Real const> const& x,
38 Real sigma, Array4<int const> const& msk,
39 GpuArray<Real,AMREX_SPACEDIM> const& dxinv) noexcept
40{
41 if (msk(i,0,0)) {
42 return Real(0.0);
43 } else {
44 Real y = x(i-1,0,0)
45 + x(i+1,0,0)
46 + x(i ,0,0)*Real(-2.0);
47 return dxinv[0]*dxinv[0] * y * sigma;
48 }
49}
50
52Real mlndlap_adotx_ha (int i, int, int, Array4<Real const> const& x,
53 Array4<Real const> const& sx, Array4<int const> const& msk,
54 GpuArray<Real,AMREX_SPACEDIM> const& dxinv) noexcept
55{
56 if (msk(i,0,0)) {
57 return Real(0.0);
58 } else {
59 Real y = (x(i+1,0,0) - x(i ,0,0)) * sx(i ,0,0)
60 - (x(i ,0,0) - x(i-1,0,0)) * sx(i-1,0,0);
61 return dxinv[0]*dxinv[0] * y;
62 }
63}
64
66Real mlndlap_adotx_aa (int i, int j, int k, Array4<Real const> const& x,
67 Array4<Real const> const& sx, Array4<int const> const& msk,
68 GpuArray<Real,AMREX_SPACEDIM> const& dxinv) noexcept
69{
70 return mlndlap_adotx_ha(i,j,k,x,sx,msk,dxinv);
71}
72
74void mlndlap_normalize_ha (int i, int, int, Array4<Real> const& x,
75 Array4<Real const> const& sx, Array4<int const> const& msk,
76 GpuArray<Real,AMREX_SPACEDIM> const& dxinv) noexcept
77{
78 if (!msk(i,0,0)) {
79 x(i,0,0) /= -dxinv[0]*dxinv[0] * (sx(i-1,0,0)+sx(i,0,0));
80 }
81}
82
84void mlndlap_normalize_aa (int i, int j, int k, Array4<Real> const& x,
85 Array4<Real const> const& sx, Array4<int const> const& msk,
86 GpuArray<Real,AMREX_SPACEDIM> const& dxinv) noexcept
87{
88 mlndlap_normalize_ha(i,j,k,x,sx,msk,dxinv);
89}
90
92void mlndlap_jacobi_ha (int i, int, int, Array4<Real> const& sol, Real Ax,
93 Array4<Real const> const& rhs, Array4<Real const> const& sx,
94 Array4<int const> const& msk,
95 GpuArray<Real,AMREX_SPACEDIM> const& dxinv) noexcept
96{
97 if (msk(i,0,0)) {
98 sol(i,0,0) = Real(0.0);
99 } else {
100 sol(i,0,0) += Real(2.0/3.0) * (rhs(i,0,0) - Ax)
101 / (-dxinv[0]*dxinv[0] * (sx(i-1,0,0)+sx(i,0,0)));
102 }
103}
104
105inline
106void mlndlap_jacobi_ha (Box const& bx, Array4<Real> const& sol, Array4<Real const> const& Ax,
107 Array4<Real const> const& rhs, Array4<Real const> const& sx,
108 Array4<int const> const& msk,
109 GpuArray<Real,AMREX_SPACEDIM> const& dxinv) noexcept
110{
111 Real fac = -dxinv[0]*dxinv[0];
112
113 amrex::LoopConcurrentOnCpu(bx, [&] (int i, int, int) noexcept
114 {
115 if (msk(i,0,0)) {
116 sol(i,0,0) = Real(0.0);
117 } else {
118 sol(i,0,0) += Real(2.0/3.0) * (rhs(i,0,0) - Ax(i,0,0))
119 / (fac * (sx(i-1,0,0)+sx(i,0,0)));
120 }
121 });
122}
123
125void mlndlap_jacobi_aa (int i, int j, int k, Array4<Real> const& sol, Real Ax,
126 Array4<Real const> const& rhs, Array4<Real const> const& sig,
127 Array4<int const> const& msk, GpuArray<Real,AMREX_SPACEDIM> const& dxinv) noexcept
128{
129 mlndlap_jacobi_ha(i,j,k,sol,Ax,rhs,sig,msk,dxinv);
130}
131
132inline
133void mlndlap_jacobi_aa (Box const& bx, Array4<Real> const& sol, Array4<Real const> const& Ax,
134 Array4<Real const> const& rhs, Array4<Real const> const& sig,
135 Array4<int const> const& msk, GpuArray<Real,AMREX_SPACEDIM> const& dxinv) noexcept
136{
137 mlndlap_jacobi_ha(bx,sol,Ax,rhs,sig,msk,dxinv);
138}
139
141void mlndlap_jacobi_c (int i, int, int, Array4<Real> const& sol, Real Ax,
142 Array4<Real const> const& rhs, Real sig,
143 Array4<int const> const& msk, GpuArray<Real,AMREX_SPACEDIM> const& dxinv) noexcept
144{
145 if (msk(i,0,0)) {
146 sol(i,0,0) = Real(0.0);
147 } else {
148 sol(i,0,0) += Real(2.0/3.0) * (rhs(i,0,0) - Ax)
149 / (-dxinv[0]*dxinv[0]*Real(2.0)*sig);
150 }
151}
152
153inline
154void mlndlap_jacobi_c (Box const& bx, Array4<Real> const& sol, Array4<Real const> const& Ax,
155 Array4<Real const> const& rhs, Real sig,
156 Array4<int const> const& msk, GpuArray<Real,AMREX_SPACEDIM> const& dxinv) noexcept
157{
158 amrex::LoopConcurrentOnCpu(bx, [&] (int i, int, int) noexcept
159 {
160 if (msk(i,0,0)) {
161 sol(i,0,0) = Real(0.0);
162 } else {
163 sol(i,0,0) += Real(2.0/3.0) * (rhs(i,0,0) - Ax(i,0,0))
164 / (-dxinv[0]*dxinv[0]*Real(2.0)*sig);
165 }
166 });
167}
168
169inline
170void mlndlap_gauss_seidel_ha (Box const& bx, Array4<Real> const& sol,
171 Array4<Real const> const& rhs,
172 Array4<Real const> const& sx,
173 Array4<int const> const& msk,
174 GpuArray<Real,AMREX_SPACEDIM> const& dxinv) noexcept
175{
176 Real fac = dxinv[0]*dxinv[0];
177
178 amrex::LoopOnCpu(bx, [&] (int i, int, int) noexcept
179 {
180 if (msk(i,0,0)) {
181 sol(i,0,0) = Real(0.0);
182 } else {
183 Real s0 = Real(-1.0) * fac * (sx(i-1,0,0)+sx(i,0,0));
184 Real Ax = sol(i-1,0,0)*fac*sx(i-1,0,0)
185 + sol(i+1,0,0)*fac*sx(i ,0,0)
186 + sol(i ,0,0)*s0;
187 sol(i,0,0) += (rhs(i,0,0) - Ax) / s0;
188 }
189 });
190}
191
192inline
193void mlndlap_gauss_seidel_aa (Box const& bx, Array4<Real> const& sol,
194 Array4<Real const> const& rhs,
195 Array4<Real const> const& sx,
196 Array4<int const> const& msk,
197 GpuArray<Real,AMREX_SPACEDIM> const& dxinv) noexcept
198{
199 mlndlap_gauss_seidel_ha(bx,sol,rhs,sx,msk,dxinv);
200}
201
202inline
203void mlndlap_gauss_seidel_c (Box const& bx, Array4<Real> const& sol,
204 Array4<Real const> const& rhs, Real sig,
205 Array4<int const> const& msk,
206 GpuArray<Real,AMREX_SPACEDIM> const& dxinv) noexcept
207{
208 Real fac = dxinv[0]*dxinv[0];
209
210 amrex::LoopOnCpu(bx, [&] (int i, int, int) noexcept
211 {
212 if (msk(i,0,0)) {
213 sol(i,0,0) = Real(0.0);
214 } else {
215 Real s0 = Real(-2.0) * fac * sig;
216 Real Ax = sol(i-1,0,0)*fac*sig
217 + sol(i+1,0,0)*fac*sig
218 + sol(i ,0,0)*s0;
219 sol(i,0,0) += (rhs(i,0,0) - Ax) / s0;
220 }
221 });
222}
223
224inline
227 Array4<int const> const&, GpuArray<Real,AMREX_SPACEDIM> const&) noexcept
228{
229 amrex::Abort("mlndlap_gauss_seidel_with_line_solve_aa: not implemented in 1D");
230}
231
233void mlndlap_interpadd_c (int i, int , int, Array4<Real> const& fine,
235 Array4<int const> const& msk) noexcept
236{
237 if (!msk(i,0,0)) {
238 int ic = amrex::coarsen(i,2);
239 bool i_is_odd = (ic*2 != i);
240 if (i_is_odd) {
241 // Node on X line
242 fine(i,0,0) += Real(0.5) * (crse(ic,0,0)+crse(ic+1,0,0));
243 } else {
244 // Node coincident with coarse node
245 fine(i,0,0) += crse(ic,0,0);
246 }
247 }
248}
249
251void mlndlap_interpadd_aa (int i, int , int, Array4<Real> const& fine,
252 Array4<Real const> const& crse, Array4<Real const> const& sig,
253 Array4<int const> const& msk) noexcept
254{
255 if (!msk(i,0,0)) {
256 int ic = amrex::coarsen(i,2);
257 bool i_is_odd = (ic*2 != i);
258 if (i_is_odd) {
259 // Node on X line
260 fine(i,0,0) += (sig(i-1,0,0)*crse(ic,0,0) + sig(i,0,0)*crse(ic+1,0,0))
261 / (sig(i-1,0,0) + sig(i,0,0));
262 } else {
263 // Node coincident with coarse node
264 fine(i,0,0) += crse(ic,0,0);
265 }
266 }
267}
268
270void mlndlap_semi_interpadd_aa (int /*i*/, int /*j*/, int /*k*/, Array4<Real> const&,
272 Array4<int const> const&, int) noexcept
273{}
274
276void mlndlap_interpadd_ha (int i, int j, int k, Array4<Real> const& fine,
277 Array4<Real const> const& crse, Array4<Real const> const& sig,
278 Array4<int const> const& msk) noexcept
279{
280 mlndlap_interpadd_aa(i,j,k,fine,crse,sig,msk);
281}
282
284void mlndlap_divu (int i, int, int, Array4<Real> const& rhs, Array4<Real const> const& vel,
285 Array4<int const> const& msk, GpuArray<Real,AMREX_SPACEDIM> const& dxinv,
286 Box const&,
289{
290 Real fac = dxinv[0];
291 if (msk(i,0,0)) {
292 rhs(i,0,0) = Real(0.0);
293 } else {
294 rhs(i,0,0) = fac*(vel(i,0,0)-vel(i-1,0,0));
295 }
296}
297
299Real mlndlap_rhcc (int i, int, int, Array4<Real const> const& rhcc,
300 Array4<int const> const& msk) noexcept
301{
302 Real r;
303 if (msk(i,0,0)) {
304 r = Real(0.0);
305 } else {
306 r = Real(0.5) * (rhcc(i-1,0,0)+rhcc(i,0,0));
307 }
308 return r;
309}
310
312void mlndlap_mknewu (int i, int, int, Array4<Real> const& u,
313 Array4<Real const> const& p,
314 Array4<Real const> const& sig,
315 GpuArray<Real,AMREX_SPACEDIM> const& dxinv) noexcept
316{
317 Real fac = dxinv[0];
318 u(i,0,0) -= sig(i,0,0)*fac*(p(i+1,0,0)-p(i,0,0));
319}
320
322void mlndlap_mknewu_c (int i, int, int, Array4<Real> const& u,
323 Array4<Real const> const& p,
324 Real sig, GpuArray<Real,AMREX_SPACEDIM> const& dxinv) noexcept
325{
326 Real fac = dxinv[0];
327 u(i,0,0) -= sig*fac*(p(i+1,0,0)-p(i,0,0));
328}
329
330template <int rr>
332void mlndlap_rhcc_fine_contrib (int /*i*/, int /*j*/, int /*k*/, Box const&,
333 Array4<Real> const&, Array4<Real const> const&,
334 Array4<int const> const&) noexcept
335{}
336
338void mlndlap_divu_cf_contrib (int, int, int, Array4<Real> const&,
345 bool) noexcept
346{}
347
349void mlndlap_crse_resid (int /*i*/, int /*j*/, int /*k*/, Array4<Real> const&,
353 bool) noexcept
354{}
355
357void mlndlap_res_cf_contrib (int /*i*/, int /*j*/, int /*k*/, Array4<Real> const&,
361 Array4<Real const> const&,
362 GpuArray<Real,AMREX_SPACEDIM> const&, Box const&,
365 bool) noexcept
366{}
367
369void mlndlap_res_cf_contrib_cs (int /*i*/, int /*j*/, int /*k*/, Array4<Real> const&,
371 Real, Array4<int const> const&,
373 Array4<Real const> const&,
374 GpuArray<Real,AMREX_SPACEDIM> const&, Box const&,
377 bool) noexcept
378{}
379
382 Array4<Real const> const&,
383 GpuArray<Real,AMREX_SPACEDIM> const&) noexcept
384{}
385
387void mlndlap_set_stencil_s0 (int /*i*/, int /*j*/, int /*k*/, Array4<Real> const&) noexcept
388{}
389
391void mlndlap_stencil_rap (int /*i*/, int /*j*/, int /*k*/, Array4<Real> const&,
392 Array4<Real const> const&) noexcept
393{}
394
396Real mlndlap_adotx_sten (int /*i*/, int /*j*/, int /*k*/, Array4<Real const> const&,
397 Array4<Real const> const&, Array4<int const> const&) noexcept
398{ return Real(0.0); }
399
400inline
402 Array4<Real const> const&,
403 Array4<Real const> const&,
404 Array4<int const> const&) noexcept
405{}
406
408void mlndlap_interpadd_rap (int /*i*/, int /*j*/, int /*k*/, Array4<Real> const&,
410 Array4<int const> const&) noexcept
411{}
412
414void mlndlap_restriction_rap (int /*i*/, int /*j*/, int /*k*/, Array4<Real> const&,
416 Array4<int const> const&) noexcept
417{}
418
420int mlndlap_color (int i, int, int)
421{
422 return i%2;
423}
424
426void mlndlap_gscolor_ha (int i, int j, int k, Array4<Real> const& sol,
427 Array4<Real const> const& rhs,
428 Array4<Real const> const& sx,
429 Array4<int const> const& msk,
430 GpuArray<Real,AMREX_SPACEDIM> const& dxinv, int color) noexcept
431{
432 if (mlndlap_color(i,j,k) == color) {
433 if (msk(i,0,0)) {
434 sol(i,0,0) = Real(0.0);
435 } else {
436 Real fac = dxinv[0]*dxinv[0];
437
438 Real s0 = Real(-1.0) * fac * (sx(i-1,0,0)+sx(i,0,0));
439 Real Ax = sol(i-1,0,0)*fac*sx(i-1,0,0)
440 + sol(i+1,0,0)*fac*sx(i ,0,0)
441 + sol(i ,0,0)*s0;
442 sol(i,0,0) += (rhs(i,0,0) - Ax) / s0;
443 }
444 }
445}
446
448void mlndlap_gscolor_aa (int i, int j, int k, Array4<Real> const& sol,
449 Array4<Real const> const& rhs,
450 Array4<Real const> const& sx,
451 Array4<int const> const& msk,
452 GpuArray<Real,AMREX_SPACEDIM> const& dxinv, int color) noexcept
453{
454 mlndlap_gscolor_ha(i,j,k,sol,rhs,sx,msk,dxinv,color);
455}
456
458void mlndlap_gscolor_c (int i, int j, int k, Array4<Real> const& sol,
459 Array4<Real const> const& rhs, Real sig,
460 Array4<int const> const& msk,
461 GpuArray<Real,AMREX_SPACEDIM> const& dxinv, int color) noexcept
462{
463 if (mlndlap_color(i,j,k) == color) {
464 if (msk(i,0,0)) {
465 sol(i,0,0) = Real(0.0);
466 } else {
467 Real fac = dxinv[0]*dxinv[0];
468
469 Real s0 = Real(-2.0) * fac * sig;
470 Real Ax = sol(i-1,0,0)*fac*sig
471 + sol(i+1,0,0)*fac*sig
472 + sol(i ,0,0)*s0;
473 sol(i,0,0) += (rhs(i,0,0) - Ax) / s0;
474 }
475 }
476}
477
479void mlndlap_gscolor_sten (int, int, int, Array4<Real> const&,
480 Array4<Real const> const&,
481 Array4<Real const> const&,
482 Array4<int const> const&, int) noexcept
483{}
484
485}
486
487#endif
#define AMREX_FORCE_INLINE
Definition AMReX_Extension.H:119
#define AMREX_GPU_DEVICE
Definition AMReX_GpuQualifiers.H:18
#define AMREX_GPU_HOST_DEVICE
Definition AMReX_GpuQualifiers.H:20
Array4< Real > fine
Definition AMReX_InterpFaceRegister.cpp:90
Array4< Real const > crse
Definition AMReX_InterpFaceRegister.cpp:92
Definition AMReX_Amr.cpp:49
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mlndlap_adotx_ha(int i, int, int, Array4< Real const > const &x, Array4< Real const > const &sx, Array4< int const > const &msk, GpuArray< Real, AMREX_SPACEDIM > const &dxinv) noexcept
Definition AMReX_MLNodeLap_1D_K.H:52
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void mlndlap_gscolor_ha(int i, int j, int k, Array4< Real > const &sol, Array4< Real const > const &rhs, Array4< Real const > const &sx, Array4< int const > const &msk, GpuArray< Real, AMREX_SPACEDIM > const &dxinv, int color) noexcept
Definition AMReX_MLNodeLap_1D_K.H:426
AMREX_ATTRIBUTE_FLATTEN_FOR void LoopOnCpu(Dim3 lo, Dim3 hi, F const &f) noexcept
Definition AMReX_Loop.H:355
AMREX_ATTRIBUTE_FLATTEN_FOR void LoopConcurrentOnCpu(Dim3 lo, Dim3 hi, F const &f) noexcept
Definition AMReX_Loop.H:378
void mlndlap_gauss_seidel_with_line_solve_aa(Box const &, Array4< Real > const &, Array4< Real const > const &, Array4< Real const > const &, Array4< int const > const &, GpuArray< Real, AMREX_SPACEDIM > const &) noexcept
Definition AMReX_MLNodeLap_1D_K.H:225
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void mlndlap_jacobi_ha(int i, int, int, Array4< Real > const &sol, Real Ax, Array4< Real const > const &rhs, Array4< Real const > const &sx, Array4< int const > const &msk, GpuArray< Real, AMREX_SPACEDIM > const &dxinv) noexcept
Definition AMReX_MLNodeLap_1D_K.H:92
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_semi_avgdown_coeff(int i, int j, int k, Array4< Real > const &crse, Array4< Real const > const &fine, int) noexcept
Definition AMReX_MLNodeLap_1D_K.H:30
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_interpadd_rap(int, int, int, Array4< Real > const &, Array4< Real const > const &, Array4< Real const > const &, Array4< int const > const &) noexcept
Definition AMReX_MLNodeLap_1D_K.H:408
void mlndlap_gauss_seidel_aa(Box const &bx, Array4< Real > const &sol, Array4< Real const > const &rhs, Array4< Real const > const &sx, Array4< int const > const &msk, GpuArray< Real, AMREX_SPACEDIM > const &dxinv) noexcept
Definition AMReX_MLNodeLap_1D_K.H:193
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mlndlap_adotx_aa(int i, int j, int k, Array4< Real const > const &x, Array4< Real const > const &sx, Array4< int const > const &msk, GpuArray< Real, AMREX_SPACEDIM > const &dxinv) noexcept
Definition AMReX_MLNodeLap_1D_K.H:66
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void mlndlap_jacobi_c(int i, int, int, Array4< Real > const &sol, Real Ax, Array4< Real const > const &rhs, Real sig, Array4< int const > const &msk, GpuArray< Real, AMREX_SPACEDIM > const &dxinv) noexcept
Definition AMReX_MLNodeLap_1D_K.H:141
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void mlndlap_jacobi_aa(int i, int j, int k, Array4< Real > const &sol, Real Ax, Array4< Real const > const &rhs, Array4< Real const > const &sig, Array4< int const > const &msk, GpuArray< Real, AMREX_SPACEDIM > const &dxinv) noexcept
Definition AMReX_MLNodeLap_1D_K.H:125
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mlndlap_adotx_sten(int, int, int, Array4< Real const > const &, Array4< Real const > const &, Array4< int const > const &) noexcept
Definition AMReX_MLNodeLap_1D_K.H:396
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_interpadd_c(int i, int, int, Array4< Real > const &fine, Array4< Real const > const &crse, Array4< int const > const &msk) noexcept
Definition AMReX_MLNodeLap_1D_K.H:233
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_set_stencil_s0(int, int, int, Array4< Real > const &) noexcept
Definition AMReX_MLNodeLap_1D_K.H:387
void mlndlap_gauss_seidel_ha(Box const &bx, Array4< Real > const &sol, Array4< Real const > const &rhs, Array4< Real const > const &sx, Array4< int const > const &msk, GpuArray< Real, AMREX_SPACEDIM > const &dxinv) noexcept
Definition AMReX_MLNodeLap_1D_K.H:170
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_res_cf_contrib(int, int, int, Array4< Real > const &, Array4< Real const > const &, Array4< Real const > const &, Array4< Real const > const &, Array4< int const > const &, Array4< int const > const &, Array4< int const > const &, Array4< Real const > const &, GpuArray< Real, AMREX_SPACEDIM > const &, Box const &, GpuArray< LinOpBCType, AMREX_SPACEDIM > const &, GpuArray< LinOpBCType, AMREX_SPACEDIM > const &, bool) noexcept
Definition AMReX_MLNodeLap_1D_K.H:357
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_normalize_aa(int i, int j, int k, Array4< Real > const &x, Array4< Real const > const &sx, Array4< int const > const &msk, GpuArray< Real, AMREX_SPACEDIM > const &dxinv) noexcept
Definition AMReX_MLNodeLap_1D_K.H:84
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_rhcc_fine_contrib(int, int, int, Box const &, Array4< Real > const &, Array4< Real const > const &, Array4< int const > const &) noexcept
Definition AMReX_MLNodeLap_1D_K.H:332
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_semi_interpadd_aa(int, int, int, Array4< Real > const &, Array4< Real const > const &, Array4< Real const > const &, Array4< int const > const &, int) noexcept
Definition AMReX_MLNodeLap_1D_K.H:270
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_set_stencil(Box const &, Array4< Real > const &, Array4< Real const > const &, GpuArray< Real, AMREX_SPACEDIM > const &) noexcept
Definition AMReX_MLNodeLap_1D_K.H:381
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_zero_fine(int i, int, int, Array4< Real > const &phi, Array4< int const > const &msk, int fine_flag) noexcept
Definition AMReX_MLNodeLap_1D_K.H:8
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE BoxND< dim > coarsen(const BoxND< dim > &b, int ref_ratio) noexcept
Coarsen BoxND by given (positive) refinement ratio. NOTE: if type(dir) = CELL centered: lo <- lo/rati...
Definition AMReX_Box.H:1304
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mlndlap_adotx_c(int i, int, int, Array4< Real const > const &x, Real sigma, Array4< int const > const &msk, GpuArray< Real, AMREX_SPACEDIM > const &dxinv) noexcept
Definition AMReX_MLNodeLap_1D_K.H:37
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_interpadd_aa(int i, int, int, Array4< Real > const &fine, Array4< Real const > const &crse, Array4< Real const > const &sig, Array4< int const > const &msk) noexcept
Definition AMReX_MLNodeLap_1D_K.H:251
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_res_cf_contrib_cs(int, int, int, Array4< Real > const &, Array4< Real const > const &, Array4< Real const > const &, Real, Array4< int const > const &, Array4< int const > const &, Array4< int const > const &, Array4< Real const > const &, GpuArray< Real, AMREX_SPACEDIM > const &, Box const &, GpuArray< LinOpBCType, AMREX_SPACEDIM > const &, GpuArray< LinOpBCType, AMREX_SPACEDIM > const &, bool) noexcept
Definition AMReX_MLNodeLap_1D_K.H:369
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_divu(int i, int, int, Array4< Real > const &rhs, Array4< Real const > const &vel, Array4< int const > const &msk, GpuArray< Real, AMREX_SPACEDIM > const &dxinv, Box const &, GpuArray< LinOpBCType, AMREX_SPACEDIM > const &, GpuArray< LinOpBCType, AMREX_SPACEDIM > const &) noexcept
Definition AMReX_MLNodeLap_1D_K.H:284
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_divu_cf_contrib(int, int, int, Array4< Real > const &, Array4< Real const > const &, Array4< Real const > const &, Array4< Real const > const &, Array4< int const > const &, Array4< int const > const &, Array4< int const > const &, GpuArray< Real, AMREX_SPACEDIM > const &, Box const &, GpuArray< LinOpBCType, AMREX_SPACEDIM > const &, GpuArray< LinOpBCType, AMREX_SPACEDIM > const &, bool) noexcept
Definition AMReX_MLNodeLap_1D_K.H:338
void mlndlap_gauss_seidel_sten(Box const &, Array4< Real > const &, Array4< Real const > const &, Array4< Real const > const &, Array4< int const > const &) noexcept
Definition AMReX_MLNodeLap_1D_K.H:401
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_gscolor_sten(int, int, int, Array4< Real > const &, Array4< Real const > const &, Array4< Real const > const &, Array4< int const > const &, int) noexcept
Definition AMReX_MLNodeLap_1D_K.H:479
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void mlndlap_gscolor_aa(int i, int j, int k, Array4< Real > const &sol, Array4< Real const > const &rhs, Array4< Real const > const &sx, Array4< int const > const &msk, GpuArray< Real, AMREX_SPACEDIM > const &dxinv, int color) noexcept
Definition AMReX_MLNodeLap_1D_K.H:448
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_mknewu(int i, int, int, Array4< Real > const &u, Array4< Real const > const &p, Array4< Real const > const &sig, GpuArray< Real, AMREX_SPACEDIM > const &dxinv) noexcept
Definition AMReX_MLNodeLap_1D_K.H:312
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_restriction_rap(int, int, int, Array4< Real > const &, Array4< Real const > const &, Array4< Real const > const &, Array4< int const > const &) noexcept
Definition AMReX_MLNodeLap_1D_K.H:414
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void mlndlap_gscolor_c(int i, int j, int k, Array4< Real > const &sol, Array4< Real const > const &rhs, Real sig, Array4< int const > const &msk, GpuArray< Real, AMREX_SPACEDIM > const &dxinv, int color) noexcept
Definition AMReX_MLNodeLap_1D_K.H:458
AMREX_GPU_DEVICE AMREX_FORCE_INLINE int mlndlap_color(int i, int, int)
Definition AMReX_MLNodeLap_1D_K.H:420
void Abort(const std::string &msg)
Print out message to cerr and exit via abort().
Definition AMReX.cpp:225
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_crse_resid(int, int, int, Array4< Real > const &, Array4< Real const > const &, Array4< int const > const &, Box const &, GpuArray< LinOpBCType, AMREX_SPACEDIM > const &, GpuArray< LinOpBCType, AMREX_SPACEDIM > const &, bool) noexcept
Definition AMReX_MLNodeLap_1D_K.H:349
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_normalize_ha(int i, int, int, Array4< Real > const &x, Array4< Real const > const &sx, Array4< int const > const &msk, GpuArray< Real, AMREX_SPACEDIM > const &dxinv) noexcept
Definition AMReX_MLNodeLap_1D_K.H:74
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_avgdown_coeff_x(int i, int, int, Array4< Real > const &crse, Array4< Real const > const &fine) noexcept
Definition AMReX_MLNodeLap_1D_K.H:21
void mlndlap_gauss_seidel_c(Box const &bx, Array4< Real > const &sol, Array4< Real const > const &rhs, Real sig, Array4< int const > const &msk, GpuArray< Real, AMREX_SPACEDIM > const &dxinv) noexcept
Definition AMReX_MLNodeLap_1D_K.H:203
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_interpadd_ha(int i, int j, int k, Array4< Real > const &fine, Array4< Real const > const &crse, Array4< Real const > const &sig, Array4< int const > const &msk) noexcept
Definition AMReX_MLNodeLap_1D_K.H:276
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_stencil_rap(int, int, int, Array4< Real > const &, Array4< Real const > const &) noexcept
Definition AMReX_MLNodeLap_1D_K.H:391
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Real mlndlap_rhcc(int i, int, int, Array4< Real const > const &rhcc, Array4< int const > const &msk) noexcept
Definition AMReX_MLNodeLap_1D_K.H:299
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void mlndlap_mknewu_c(int i, int, int, Array4< Real > const &u, Array4< Real const > const &p, Real sig, GpuArray< Real, AMREX_SPACEDIM > const &dxinv) noexcept
Definition AMReX_MLNodeLap_1D_K.H:322
Definition AMReX_Array4.H:61
Definition AMReX_Array.H:34