WarpX
Loading...
Searching...
No Matches
FieldPoyntingFlux.H
Go to the documentation of this file.
1/* Copyright 2019-2020
2 *
3 * This file is part of WarpX.
4 *
5 * License: BSD-3-Clause-LBNL
6 */
7
8#ifndef WARPX_DIAGNOSTICS_REDUCEDDIAGS_FIELDPOYTINGFLUX_H_
9#define WARPX_DIAGNOSTICS_REDUCEDDIAGS_FIELDPOYTINGFLUX_H_
10
11#include "ReducedDiags.H"
12
13#include <AMReX_Array4.H>
14#include <AMReX_GpuControl.H>
15#include <AMReX_Box.H>
16#include <AMReX_REAL.H>
17#include <AMReX_Reduce.H>
18
19#include <string>
20
21using namespace amrex::literals;
22
24 // This requires the arrays to have Yee centering
25 // The procedure (in 3D) is to interpolate the B (which is centered on faces normal
26 // to the plane of the calculaton) to the edge in the plane of the calculation to match
27 // the location of the E. Then the product E*B is interpolated to the face center in
28 // the plane of the calculation.
29 // The procedure is mapped to lower dimensions, and in some cases the second interpolation
30 // is not needed.
31
33 static amrex::Real EyBx(int i, int j, int k, int comp,
35 amrex::Array4<const amrex::Real> const & Bx_arr) {
36#if defined(WARPX_DIM_3D)
37 amrex::Real EyBx_dn = Ey_arr(i,j,k,comp)*0.5_rt*(Bx_arr(i,j,k-1,comp) + Bx_arr(i,j,k,comp));
38 amrex::Real EyBx_up = Ey_arr(i+1,j,k,comp)*0.5_rt*(Bx_arr(i+1,j,k-1,comp) + Bx_arr(i+1,j,k,comp));
39 return 0.5_rt*(EyBx_dn + EyBx_up);
40#elif defined(WARPX_DIM_XZ) || defined(WARPX_DIM_RZ)
41 amrex::Real EyBx_dn = Ey_arr(i,j,k,comp)*0.5_rt*(Bx_arr(i,j-1,k,comp) + Bx_arr(i,j,k,comp));
42 amrex::Real EyBx_up = Ey_arr(i+1,j,k,comp)*0.5_rt*(Bx_arr(i+1,j-1,k,comp) + Bx_arr(i+1,j,k,comp));
43 return 0.5_rt*(EyBx_dn + EyBx_up);
44#elif defined(WARPX_DIM_1D_Z)
45 return Ey_arr(i,j,k,comp)*0.5_rt*(Bx_arr(i-1,j,k,comp) + Bx_arr(i,j,k,comp));
46#elif defined(WARPX_DIM_RCYLINDER) || defined(WARPX_DIM_RSPHERE)
47 amrex::ignore_unused(i, j, k, comp, Ey_arr, Bx_arr);
48 return 0._rt;
49#endif
50 }
51
53 static amrex::Real ExBy(int i, int j, int k, int comp,
55 amrex::Array4<const amrex::Real> const & By_arr) {
56#if defined(WARPX_DIM_3D)
57 amrex::Real ExBy_dn = Ex_arr(i,j,k,comp)*0.5_rt*(By_arr(i,j,k-1,comp) + By_arr(i,j,k,comp));
58 amrex::Real ExBy_up = Ex_arr(i,j+1,k,comp)*0.5_rt*(By_arr(i,j+1,k-1,comp) + By_arr(i,j+1,k,comp));
59 return 0.5_rt*(ExBy_dn + ExBy_up);
60#elif defined(WARPX_DIM_XZ) || defined(WARPX_DIM_RZ) || defined(WARPX_DIM_1D_Z)
61 return Ex_arr(i,j,k,comp)*0.5_rt*(By_arr(i-1,j,k,comp) + By_arr(i,j,k,comp));
62#elif defined(WARPX_DIM_RCYLINDER) || defined(WARPX_DIM_RSPHERE)
63 amrex::ignore_unused(i, j, k, comp, Ex_arr, By_arr);
64 return 0._rt;
65#endif
66 }
67
69 static amrex::Real EzBx(int i, int j, int k, int comp,
71 amrex::Array4<const amrex::Real> const & Bx_arr) {
72#if defined(WARPX_DIM_3D)
73 amrex::Real EzBx_dn = Ez_arr(i,j,k,comp)*0.5_rt*(Bx_arr(i,j-1,k,comp) + Bx_arr(i,j,k,comp));
74 amrex::Real EzBx_up = Ez_arr(i+1,j,k,comp)*0.5_rt*(Bx_arr(i+1,j-1,k,comp) + Bx_arr(i+1,j,k,comp));
75 return 0.5_rt*(EzBx_dn + EzBx_up);
76#else
77 amrex::ignore_unused(i, j, k, comp, Ez_arr, Bx_arr);
78 return 0._rt;
79#endif
80 }
81
83 static amrex::Real ExBz(int i, int j, int k, int comp,
85 amrex::Array4<const amrex::Real> const & Bz_arr) {
86#if defined(WARPX_DIM_3D)
87 amrex::Real ExBz_dn = Ex_arr(i,j,k,comp)*0.5_rt*(Bz_arr(i,j-1,k,comp) + Bz_arr(i,j,k,comp));
88 amrex::Real ExBz_up = Ex_arr(i,j,k+1,comp)*0.5_rt*(Bz_arr(i,j-1,k+1,comp) + Bz_arr(i,j,k+1,comp));
89 return 0.5_rt*(ExBz_dn + ExBz_up);
90#else
91 amrex::ignore_unused(i, j, k, comp, Ex_arr, Bz_arr);
92 return 0._rt;
93#endif
94 }
95
97 static amrex::Real EyBz(int i, int j, int k, int comp,
99 amrex::Array4<const amrex::Real> const & Bz_arr) {
100#if defined(WARPX_DIM_3D)
101 amrex::Real EyBz_dn = Ey_arr(i,j,k,comp)*0.5_rt*(Bz_arr(i-1,j,k,comp) + Bz_arr(i,j,k,comp));
102 amrex::Real EyBz_up = Ey_arr(i,j,k+1,comp)*0.5_rt*(Bz_arr(i-1,j,k+1,comp) + Bz_arr(i,j,k+1,comp));
103 return 0.5_rt*(EyBz_dn + EyBz_up);
104#elif defined(WARPX_DIM_XZ) || defined(WARPX_DIM_RZ)
105 amrex::Real EyBz_dn = Ey_arr(i,j,k,comp)*0.5_rt*(Bz_arr(i-1,j,k,comp) + Bz_arr(i,j,k,comp));
106 amrex::Real EyBz_up = Ey_arr(i,j+1,k,comp)*0.5_rt*(Bz_arr(i-1,j+1,k,comp) + Bz_arr(i,j+1,k,comp));
107 return 0.5_rt*(EyBz_dn + EyBz_up);
108#elif defined(WARPX_DIM_RCYLINDER) || defined(WARPX_DIM_RSPHERE)
109 return Ey_arr(i,j,k,comp)*0.5_rt*(Bz_arr(i-1,j,k,comp) + Bz_arr(i,j,k,comp));
110#elif defined(WARPX_DIM_1D_Z)
111 amrex::ignore_unused(i, j, k, comp, Ey_arr, Bz_arr);
112 return 0._rt;
113#endif
114 }
115
117 static amrex::Real EzBy(int i, int j, int k, int comp,
119 amrex::Array4<const amrex::Real> const & By_arr) {
120#if defined(WARPX_DIM_3D)
121 amrex::Real EzBy_dn = Ez_arr(i,j,k,comp)*0.5_rt*(By_arr(i-1,j,k,comp) + By_arr(i,j,k,comp));
122 amrex::Real EzBy_up = Ez_arr(i,j+1,k,comp)*0.5_rt*(By_arr(i-1,j+1,k,comp) + By_arr(i,j+1,k,comp));
123 return 0.5_rt*(EzBy_dn + EzBy_up);
124#elif defined(WARPX_DIM_XZ) || defined(WARPX_DIM_RZ) || defined(WARPX_DIM_RCYLINDER) || defined(WARPX_DIM_RSPHERE)
125 return Ez_arr(i,j,k,comp)*0.5_rt*(By_arr(i-1,j,k,comp) + By_arr(i,j,k,comp));
126#elif defined(WARPX_DIM_1D_Z)
127 amrex::ignore_unused(i, j, k, comp, Ez_arr, By_arr);
128 return 0._rt;
129#endif
130 }
131
132};
133
135
137 static amrex::Real EyBx(int i, int j, int k, int comp,
139 amrex::Array4<const amrex::Real> const & Bx_arr) {
140#if defined(WARPX_DIM_3D) || defined(WARPX_DIM_XZ) || defined(WARPX_DIM_RZ) || defined(WARPX_DIM_1D_Z)
141 return 0.5_rt*(Ey_arr(i,j,k-1,comp)*Bx_arr(i,j,k-1,comp)
142 + Ey_arr(i,j,k,comp)*Bx_arr(i,j,k,comp));
143#elif defined(WARPX_DIM_RCYLINDER) || defined(WARPX_DIM_RSPHERE)
144 amrex::ignore_unused(i, j, k, comp, Ey_arr, Bx_arr);
145 return 0._rt;
146#endif
147 }
148
150 static amrex::Real ExBy(int i, int j, int k, int comp,
152 amrex::Array4<const amrex::Real> const & By_arr) {
153#if defined(WARPX_DIM_3D) || defined(WARPX_DIM_XZ) || defined(WARPX_DIM_RZ) || defined(WARPX_DIM_1D_Z)
154 return 0.5_rt*(Ex_arr(i,j,k-1,comp)*By_arr(i,j,k-1,comp)
155 + Ex_arr(i,j,k,comp)*By_arr(i,j,k,comp));
156#elif defined(WARPX_DIM_RCYLINDER) || defined(WARPX_DIM_RSPHERE)
157 amrex::ignore_unused(i, j, k, comp, Ex_arr, By_arr);
158 return 0._rt;
159#endif
160 }
161
163 static amrex::Real EzBx(int i, int j, int k, int comp,
165 amrex::Array4<const amrex::Real> const & Bx_arr) {
166#if defined(WARPX_DIM_3D)
167 return 0.5_rt*(Ez_arr(i,j-1,k,comp)*Bx_arr(i,j-1,k,comp)
168 + Ez_arr(i,j,k,comp)*Bx_arr(i,j,k,comp));
169#else
170 amrex::ignore_unused(i, j, k, comp, Ez_arr, Bx_arr);
171 return 0._rt;
172#endif
173 }
174
176 static amrex::Real ExBz(int i, int j, int k, int comp,
178 amrex::Array4<const amrex::Real> const & Bz_arr) {
179#if defined(WARPX_DIM_3D)
180 return 0.5_rt*(Ex_arr(i,j-1,k,comp)*Bz_arr(i,j-1,k,comp)
181 + Ex_arr(i,j,k,comp)*Bz_arr(i,j,k,comp));
182#else
183 amrex::ignore_unused(i, j, k, comp, Ex_arr, Bz_arr);
184 return 0._rt;
185#endif
186 }
187
189 static amrex::Real EyBz(int i, int j, int k, int comp,
191 amrex::Array4<const amrex::Real> const & Bz_arr) {
192#if defined(WARPX_DIM_3D) || defined(WARPX_DIM_XZ) || defined(WARPX_DIM_RZ) || defined(WARPX_DIM_RCYLINDER) || defined(WARPX_DIM_RSPHERE)
193 return 0.5_rt*(Ey_arr(i-1,j,k,comp)*Bz_arr(i-1,j,k,comp)
194 + Ey_arr(i,j,k,comp)*Bz_arr(i,j,k,comp));
195#elif defined(WARPX_DIM_1D_Z)
196 amrex::ignore_unused(i, j, k, comp, Ey_arr, Bz_arr);
197 return 0._rt;
198#endif
199 }
200
202 static amrex::Real EzBy(int i, int j, int k, int comp,
204 amrex::Array4<const amrex::Real> const & By_arr) {
205#if defined(WARPX_DIM_3D) || defined(WARPX_DIM_XZ) || defined(WARPX_DIM_RZ) || defined(WARPX_DIM_RCYLINDER) || defined(WARPX_DIM_RSPHERE)
206 return 0.5_rt*(Ez_arr(i-1,j,k,comp)*By_arr(i-1,j,k,comp)
207 + Ez_arr(i,j,k,comp)*By_arr(i,j,k,comp));
208#elif defined(WARPX_DIM_1D_Z)
209 amrex::ignore_unused(i, j, k, comp, Ez_arr, By_arr);
210 return 0._rt;
211#endif
212 }
213
214};
215
217
219 static amrex::Real EyBx(int i, int j, int k, int comp,
221 amrex::Array4<const amrex::Real> const & Bx_arr) {
222#if defined(WARPX_DIM_3D)
223 return 0.25_rt*(Ey_arr(i,j,k,comp)*Bx_arr(i,j,k,comp)
224 + Ey_arr(i+1,j,k,comp)*Bx_arr(i+1,j,k,comp)
225 + Ey_arr(i,j+1,k,comp)*Bx_arr(i,j+1,k,comp)
226 + Ey_arr(i+1,j+1,k,comp)*Bx_arr(i+1,j+1,k,comp));
227#elif defined(WARPX_DIM_XZ) || defined(WARPX_DIM_RZ)
228 return 0.5_rt*(Ey_arr(i,j,k,comp)*Bx_arr(i,j,k,comp) +
229 Ey_arr(i+1,j,k,comp)*Bx_arr(i+1,j,k,comp));
230#elif defined(WARPX_DIM_1D_Z)
231 return Ey_arr(i,j,k,comp)*Bx_arr(i,j,k,comp);
232#elif defined(WARPX_DIM_RCYLINDER) || defined(WARPX_DIM_RSPHERE)
233 amrex::ignore_unused(i, j, k, comp, Ey_arr, Bx_arr);
234 return 0._rt;
235#endif
236 }
237
239 static amrex::Real ExBy(int i, int j, int k, int comp,
241 amrex::Array4<const amrex::Real> const & By_arr) {
242#if defined(WARPX_DIM_3D)
243 return 0.25_rt*(Ex_arr(i,j,k,comp)*By_arr(i,j,k,comp)
244 + Ex_arr(i+1,j,k,comp)*By_arr(i+1,j,k,comp)
245 + Ex_arr(i,j+1,k,comp)*By_arr(i,j+1,k,comp)
246 + Ex_arr(i+1,j+1,k,comp)*By_arr(i+1,j+1,k,comp));
247#elif defined(WARPX_DIM_XZ) || defined(WARPX_DIM_RZ)
248 return 0.5_rt*(Ex_arr(i,j,k,comp)*By_arr(i,j,k,comp)
249 + Ex_arr(i+1,j,k,comp)*By_arr(i+1,j,k,comp));
250#elif defined(WARPX_DIM_1D_Z)
251 return Ex_arr(i,j,k,comp)*By_arr(i,j,k,comp);
252#elif defined(WARPX_DIM_RCYLINDER) || defined(WARPX_DIM_RSPHERE)
253 amrex::ignore_unused(i, j, k, comp, Ex_arr, By_arr);
254 return 0._rt;
255#endif
256 }
257
259 static amrex::Real EzBx(int i, int j, int k, int comp,
261 amrex::Array4<const amrex::Real> const & Bx_arr) {
262#if defined(WARPX_DIM_3D)
263 return 0.25_rt*(Ez_arr(i,j,k,comp)*Bx_arr(i,j,k,comp)
264 + Ez_arr(i+1,j,k,comp)*Bx_arr(i+1,j,k,comp)
265 + Ez_arr(i,j,k+1,comp)*Bx_arr(i,j,k+1,comp)
266 + Ez_arr(i+1,j,k+1,comp)*Bx_arr(i+1,j,k+1,comp));
267#else
268 amrex::ignore_unused(i, j, k, comp, Ez_arr, Bx_arr);
269 return 0._rt;
270#endif
271 }
272
274 static amrex::Real ExBz(int i, int j, int k, int comp,
276 amrex::Array4<const amrex::Real> const & Bz_arr) {
277#if defined(WARPX_DIM_3D)
278 return 0.25_rt*(Ex_arr(i,j,k,comp)*Bz_arr(i,j,k,comp)
279 + Ex_arr(i+1,j,k,comp)*Bz_arr(i+1,j,k,comp)
280 + Ex_arr(i,j,k+1,comp)*Bz_arr(i,j,k+1,comp)
281 + Ex_arr(i+1,j,k+1,comp)*Bz_arr(i+1,j,k+1,comp));
282#else
283 amrex::ignore_unused(i, j, k, comp, Ex_arr, Bz_arr);
284 return 0._rt;
285#endif
286 }
287
289 static amrex::Real EyBz(int i, int j, int k, int comp,
291 amrex::Array4<const amrex::Real> const & Bz_arr) {
292#if defined(WARPX_DIM_3D)
293 return 0.25_rt*(Ey_arr(i,j,k,comp)*Bz_arr(i,j,k,comp)
294 + Ey_arr(i,j+1,k,comp)*Bz_arr(i,j+1,k,comp)
295 + Ey_arr(i,j,k+1,comp)*Bz_arr(i,j,k+1,comp)
296 + Ey_arr(i,j+1,k+1,comp)*Bz_arr(i,j+1,k+1,comp));
297#elif defined(WARPX_DIM_XZ) || defined(WARPX_DIM_RZ)
298 return 0.5_rt*(Ey_arr(i,j,k,comp)*Bz_arr(i,j,k,comp)
299 + Ey_arr(i,j+1,k,comp)*Bz_arr(i,j+1,k,comp));
300#elif defined(WARPX_DIM_RCYLINDER) || defined(WARPX_DIM_RSPHERE)
301 return Ey_arr(i,j,k,comp)*Bz_arr(i,j,k,comp);
302#elif defined(WARPX_DIM_1D_Z)
303 amrex::ignore_unused(i, j, k, comp, Ey_arr, Bz_arr);
304 return 0._rt;
305#endif
306 }
307
309 static amrex::Real EzBy(int i, int j, int k, int comp,
311 amrex::Array4<const amrex::Real> const & By_arr) {
312#if defined(WARPX_DIM_3D)
313 return 0.25_rt*(Ez_arr(i,j,k,comp)*By_arr(i,j,k,comp)
314 + Ez_arr(i,j+1,k,comp)*By_arr(i,j+1,k,comp)
315 + Ez_arr(i,j,k+1,comp)*By_arr(i,j,k+1,comp)
316 + Ez_arr(i,j+1,k+1,comp)*By_arr(i,j+1,k+1,comp));
317#elif defined(WARPX_DIM_XZ) || defined(WARPX_DIM_RZ)
318 return 0.5_rt*(Ez_arr(i,j,k,comp)*By_arr(i,j,k,comp)
319 + Ez_arr(i,j+1,k,comp)*By_arr(i,j+1,k,comp));
320#elif defined(WARPX_DIM_RCYLINDER) || defined(WARPX_DIM_RSPHERE)
321 return Ez_arr(i,j,k,comp)*By_arr(i,j,k,comp);
322#elif defined(WARPX_DIM_1D_Z)
323 amrex::ignore_unused(i, j, k, comp, Ez_arr, By_arr);
324 return 0._rt;
325#endif
326 }
327
328};
329
330namespace Poynting {
331
332 template<int normal_dir, typename T_Algo, typename AreaFunc>
333 amrex::Real Kernel (amrex::Box const & box,
340 AreaFunc area_factor)
341 {
342
344 amrex::ReduceData<amrex::Real> reduce_data(reduce_ops);
345
346 reduce_ops.eval(box, reduce_data,
347 [=] AMREX_GPU_DEVICE (int i, int j, int k) -> amrex::GpuTuple<amrex::Real>
348 {
349
350 constexpr int comp = 0;
351
352 // This is needed by the GPU compilers where captured variables cannot first appear
353 // in a constexpr-if context
354 amrex::ignore_unused(Ez_arr, By_arr, Ex_arr, Bz_arr, Ey_arr, Bx_arr);
355
356 amrex::Real const af = area_factor(i,j,k);
357 if constexpr (normal_dir == 0) {
358 return af*(T_Algo::EyBz(i,j,k,comp,Ey_arr,Bz_arr) - T_Algo::EzBy(i,j,k,comp,Ez_arr,By_arr));
359 }
360
361 else if constexpr (normal_dir == 1) {
362 return af*(T_Algo::EzBx(i,j,k,comp,Ez_arr,Bx_arr) - T_Algo::ExBz(i,j,k,comp,Ex_arr,Bz_arr));
363 }
364
365 else if constexpr (normal_dir == 2) {
366 return af*(T_Algo::ExBy(i,j,k,comp,Ex_arr,By_arr) - T_Algo::EyBx(i,j,k,comp,Ey_arr,Bx_arr));
367 }
368
369 });
370
371 auto r = reduce_data.value();
372 return amrex::get<0>(r);
373 }
374}
375
381{
382public:
383
389 FieldPoyntingFlux (const std::string& rd_name);
390
396 void ComputeDiags (int step) final;
397
403 void ComputeDiagsMidStep (int step) final;
404
410 void ComputePoyntingFlux ();
411
412 void WriteCheckpointData (std::string const & dir) final;
413
414 void ReadCheckpointData (std::string const & dir) final;
415
416private:
417
418 bool use_mid_step_value = false;
419
420};
421
422#endif
#define AMREX_INLINE
#define AMREX_GPU_DEVICE
#define AMREX_GPU_HOST_DEVICE
void WriteCheckpointData(std::string const &dir) final
Write out checkpoint related data.
Definition FieldPoyntingFlux.cpp:312
FieldPoyntingFlux(const std::string &rd_name)
Constructor.
Definition FieldPoyntingFlux.cpp:43
void ComputePoyntingFlux()
This function computes the electromagnetic Poynting flux, obtained by integrating the electromagnetic...
Definition FieldPoyntingFlux.cpp:117
void ReadCheckpointData(std::string const &dir) final
Read in checkpoint related data.
Definition FieldPoyntingFlux.cpp:328
bool use_mid_step_value
Definition FieldPoyntingFlux.H:418
void ComputeDiagsMidStep(int step) final
Call the routine to compute the Poynting flux at the mid step time level.
Definition FieldPoyntingFlux.cpp:110
void ComputeDiags(int step) final
Call the routine to compute the Poynting flux if needed.
Definition FieldPoyntingFlux.cpp:101
ReducedDiags(const std::string &rd_name)
Definition ReducedDiags.cpp:26
std::enable_if_t< IsFabArray< MF >::value > eval(MF const &mf, IntVect const &nghost, D &reduce_data, F &&f)
Definition FieldPoyntingFlux.H:330
amrex::Real Kernel(amrex::Box const &box, amrex::Array4< const amrex::Real > const &Ex_arr, amrex::Array4< const amrex::Real > const &Ey_arr, amrex::Array4< const amrex::Real > const &Ez_arr, amrex::Array4< const amrex::Real > const &Bx_arr, amrex::Array4< const amrex::Real > const &By_arr, amrex::Array4< const amrex::Real > const &Bz_arr, AreaFunc area_factor)
Definition FieldPoyntingFlux.H:333
__host__ __device__ void ignore_unused(const Ts &...)
__host__ __device__ constexpr GpuTupleElement< I, GpuTuple< Ts... > >::type & get(GpuTuple< Ts... > &tup) noexcept
BoxND< 3 > Box
Definition FieldPoyntingFlux.H:134
AMREX_GPU_HOST_DEVICE static AMREX_INLINE amrex::Real EzBy(int i, int j, int k, int comp, amrex::Array4< const amrex::Real > const &Ez_arr, amrex::Array4< const amrex::Real > const &By_arr)
Definition FieldPoyntingFlux.H:202
AMREX_GPU_HOST_DEVICE static AMREX_INLINE amrex::Real EyBx(int i, int j, int k, int comp, amrex::Array4< const amrex::Real > const &Ey_arr, amrex::Array4< const amrex::Real > const &Bx_arr)
Definition FieldPoyntingFlux.H:137
AMREX_GPU_HOST_DEVICE static AMREX_INLINE amrex::Real EzBx(int i, int j, int k, int comp, amrex::Array4< const amrex::Real > const &Ez_arr, amrex::Array4< const amrex::Real > const &Bx_arr)
Definition FieldPoyntingFlux.H:163
AMREX_GPU_HOST_DEVICE static AMREX_INLINE amrex::Real ExBy(int i, int j, int k, int comp, amrex::Array4< const amrex::Real > const &Ex_arr, amrex::Array4< const amrex::Real > const &By_arr)
Definition FieldPoyntingFlux.H:150
AMREX_GPU_HOST_DEVICE static AMREX_INLINE amrex::Real EyBz(int i, int j, int k, int comp, amrex::Array4< const amrex::Real > const &Ey_arr, amrex::Array4< const amrex::Real > const &Bz_arr)
Definition FieldPoyntingFlux.H:189
AMREX_GPU_HOST_DEVICE static AMREX_INLINE amrex::Real ExBz(int i, int j, int k, int comp, amrex::Array4< const amrex::Real > const &Ex_arr, amrex::Array4< const amrex::Real > const &Bz_arr)
Definition FieldPoyntingFlux.H:176
Definition FieldPoyntingFlux.H:216
AMREX_GPU_HOST_DEVICE static AMREX_INLINE amrex::Real ExBz(int i, int j, int k, int comp, amrex::Array4< const amrex::Real > const &Ex_arr, amrex::Array4< const amrex::Real > const &Bz_arr)
Definition FieldPoyntingFlux.H:274
AMREX_GPU_HOST_DEVICE static AMREX_INLINE amrex::Real EyBz(int i, int j, int k, int comp, amrex::Array4< const amrex::Real > const &Ey_arr, amrex::Array4< const amrex::Real > const &Bz_arr)
Definition FieldPoyntingFlux.H:289
AMREX_GPU_HOST_DEVICE static AMREX_INLINE amrex::Real EzBy(int i, int j, int k, int comp, amrex::Array4< const amrex::Real > const &Ez_arr, amrex::Array4< const amrex::Real > const &By_arr)
Definition FieldPoyntingFlux.H:309
AMREX_GPU_HOST_DEVICE static AMREX_INLINE amrex::Real EzBx(int i, int j, int k, int comp, amrex::Array4< const amrex::Real > const &Ez_arr, amrex::Array4< const amrex::Real > const &Bx_arr)
Definition FieldPoyntingFlux.H:259
AMREX_GPU_HOST_DEVICE static AMREX_INLINE amrex::Real ExBy(int i, int j, int k, int comp, amrex::Array4< const amrex::Real > const &Ex_arr, amrex::Array4< const amrex::Real > const &By_arr)
Definition FieldPoyntingFlux.H:239
AMREX_GPU_HOST_DEVICE static AMREX_INLINE amrex::Real EyBx(int i, int j, int k, int comp, amrex::Array4< const amrex::Real > const &Ey_arr, amrex::Array4< const amrex::Real > const &Bx_arr)
Definition FieldPoyntingFlux.H:219
Definition FieldPoyntingFlux.H:23
AMREX_GPU_HOST_DEVICE static AMREX_INLINE amrex::Real ExBy(int i, int j, int k, int comp, amrex::Array4< const amrex::Real > const &Ex_arr, amrex::Array4< const amrex::Real > const &By_arr)
Definition FieldPoyntingFlux.H:53
AMREX_GPU_HOST_DEVICE static AMREX_INLINE amrex::Real ExBz(int i, int j, int k, int comp, amrex::Array4< const amrex::Real > const &Ex_arr, amrex::Array4< const amrex::Real > const &Bz_arr)
Definition FieldPoyntingFlux.H:83
AMREX_GPU_HOST_DEVICE static AMREX_INLINE amrex::Real EzBx(int i, int j, int k, int comp, amrex::Array4< const amrex::Real > const &Ez_arr, amrex::Array4< const amrex::Real > const &Bx_arr)
Definition FieldPoyntingFlux.H:69
AMREX_GPU_HOST_DEVICE static AMREX_INLINE amrex::Real EyBz(int i, int j, int k, int comp, amrex::Array4< const amrex::Real > const &Ey_arr, amrex::Array4< const amrex::Real > const &Bz_arr)
Definition FieldPoyntingFlux.H:97
AMREX_GPU_HOST_DEVICE static AMREX_INLINE amrex::Real EzBy(int i, int j, int k, int comp, amrex::Array4< const amrex::Real > const &Ez_arr, amrex::Array4< const amrex::Real > const &By_arr)
Definition FieldPoyntingFlux.H:117
AMREX_GPU_HOST_DEVICE static AMREX_INLINE amrex::Real EyBx(int i, int j, int k, int comp, amrex::Array4< const amrex::Real > const &Ey_arr, amrex::Array4< const amrex::Real > const &Bx_arr)
Definition FieldPoyntingFlux.H:33