aboutsummaryrefslogtreecommitdiff
path: root/Source/WarpX_f.H
blob: a580c663b26d8d1a4fa4e3341106057f558ced8b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485

#include <AMReX_BLFort.H>

#ifdef __cplusplus

#if AMREX_SPACEDIM==2
#define WARPX_ARLIM_ANYD(x) std::array<int,3>{(x)[0], 0, (x)[1]}.data()
#else
#define WARPX_ARLIM_ANYD(x) x
#endif

#define WARPX_TO_FORTRAN_BOX(x) WARPX_ARLIM_ANYD((x).loVect()), WARPX_ARLIM_ANYD((x).hiVect())
#define WARPX_TO_FORTRAN_ANYD(x) (x).dataPtr(), WARPX_ARLIM_ANYD((x).loVect()), WARPX_ARLIM_ANYD((x).hiVect())
#define WARPX_TO_FORTRAN_N_ANYD(x,n) (x).dataPtr(n), WARPX_ARLIM_ANYD((x).loVect()), WARPX_ARLIM_ANYD((x).hiVect())

#endif

#if (AMREX_SPACEDIM == 3)

#define WRPX_COMPUTE_DIVB                warpx_compute_divb_3d
#define WRPX_COMPUTE_DIVE                warpx_compute_dive_3d
#define WRPX_SYNC_CURRENT                warpx_sync_current_3d
#define WRPX_SYNC_RHO                    warpx_sync_rho_3d

#define WRPX_PUSH_PML_BVEC               warpx_push_pml_bvec_3d
#define WRPX_PUSH_PML_EVEC               warpx_push_pml_evec_3d
#define WRPX_PUSH_PML_EVEC_F             warpx_push_pml_evec_f_3d
#define WRPX_PUSH_PML_F                  warpx_push_pml_f_3d
#define WRPX_DAMP_PML                    warpx_damp_pml_3d
#define WRPX_DAMP_PML_F                  warpx_damp_pml_f_3d

#define WRPX_SUM_FINE_TO_CRSE_NODAL      warpx_sum_fine_to_crse_nodal_3d
#define WRPX_ZERO_OUT_BNDRY              warpx_zero_out_bndry_3d
#define WRPX_BUILD_MASK                  warpx_build_mask_3d
#define WRPX_COMPUTE_E_NODAL             warpx_compute_E_nodal_3d
#define WRPX_DEPOSIT_CIC                 warpx_deposit_cic_3d
#define WRPX_INTERPOLATE_CIC             warpx_interpolate_cic_3d
#define WRPX_INTERPOLATE_CIC_TWO_LEVELS  warpx_interpolate_cic_two_levels_3d
#define WRPX_PUSH_LEAPFROG               warpx_push_leapfrog_3d
#define WRPX_PUSH_LEAPFROG_POSITIONS     warpx_push_leapfrog_positions_3d

#define WRPX_LORENTZ_TRANSFORM_Z         warpx_lorentz_transform_z
#define WRPX_FILTER                      warpx_filter_3d
#define WRPX_COPY_SLICE                  warpx_copy_slice_3d
#define WRPX_PXR_NCI_CORR_INIT           init_godfrey_filter_coeffs
#define WRPX_PXR_GODFREY_FILTER          apply_godfrey_filter_z_3d


#elif (AMREX_SPACEDIM == 2)

#define WRPX_COMPUTE_DIVB                warpx_compute_divb_2d
#define WRPX_COMPUTE_DIVE                warpx_compute_dive_2d
#define WRPX_SYNC_CURRENT                warpx_sync_current_2d
#define WRPX_SYNC_RHO                    warpx_sync_rho_2d

#define WRPX_PUSH_PML_BVEC               warpx_push_pml_bvec_2d
#define WRPX_PUSH_PML_EVEC               warpx_push_pml_evec_2d
#define WRPX_PUSH_PML_EVEC_F             warpx_push_pml_evec_f_2d
#define WRPX_PUSH_PML_F                  warpx_push_pml_f_2d
#define WRPX_DAMP_PML                    warpx_damp_pml_2d
#define WRPX_DAMP_PML_F                  warpx_damp_pml_f_2d

#define WRPX_SUM_FINE_TO_CRSE_NODAL      warpx_sum_fine_to_crse_nodal_2d
#define WRPX_ZERO_OUT_BNDRY              warpx_zero_out_bndry_2d
#define WRPX_BUILD_MASK                  warpx_build_mask_2d
#define WRPX_COMPUTE_E_NODAL             warpx_compute_E_nodal_2d
#define WRPX_DEPOSIT_CIC                 warpx_deposit_cic_2d
#define WRPX_INTERPOLATE_CIC             warpx_interpolate_cic_2d
#define WRPX_INTERPOLATE_CIC_TWO_LEVELS  warpx_interpolate_cic_two_levels_2d
#define WRPX_PUSH_LEAPFROG               warpx_push_leapfrog_2d
#define WRPX_PUSH_LEAPFROG_POSITIONS     warpx_push_leapfrog_positions_2d

#define WRPX_LORENTZ_TRANSFORM_Z         warpx_lorentz_transform_z
#define WRPX_FILTER                      warpx_filter_2d
#define WRPX_COPY_SLICE                  warpx_copy_slice_2d
#define WRPX_PXR_NCI_CORR_INIT           init_godfrey_filter_coeffs
#define WRPX_PXR_GODFREY_FILTER          apply_godfrey_filter_z_2d

#endif

#ifdef __cplusplus
extern "C"
{
#endif

#ifdef WARPX_STORE_OLD_PARTICLE_ATTRIBS
    void warpx_copy_attribs(const long* np,
                            const amrex_real* xp, const amrex_real* yp, const amrex_real* zp,
                            const amrex_real* uxp, const amrex_real* uyp, const amrex_real* uzp,
                            amrex_real* xpold, amrex_real* ypold, amrex_real* zpold,
                            amrex_real* uxpold, amrex_real* uypold, amrex_real* uzpold);
#endif
        void WRPX_COPY_SLICE(const int* lo, const int* hi,
                             const amrex_real* tmp, const int* tlo, const int* thi,
                             amrex_real* buf, const int* blo, const int* bhi,
                             const int* ncomp, const int* i_boost, const int* i_lab);

	// Charge deposition
	void warpx_charge_deposition(amrex::Real* rho,
            const long* np,	const amrex::Real* xp, const amrex::Real* yp, const amrex::Real* zp,	const amrex::Real* w,
			const amrex::Real* q, const amrex::Real* xmin, const amrex::Real* ymin, const amrex::Real* zmin,
			const amrex::Real* dx, const amrex::Real* dy, const amrex::Real* dz,
			const long* nx, const long* ny, const long* nz,
			const long* nxguard, const long* nyguard, const long* nzguard,
			const long* nox, const long* noy,const long* noz,
			const long* lvect, const long* charge_depo_algo);

	// Current deposition
	void warpx_current_deposition(
			amrex::Real* jx, const long* jx_ng, const int* jx_ntot,
			amrex::Real* jy, const long* jy_ng, const int* jy_ntot,
			amrex::Real* jz, const long* jz_ng, const int* jz_ntot,
			const long* np,
			const amrex::Real* xp, const amrex::Real* yp, const amrex::Real* zp,
			const amrex::Real* uxp, const amrex::Real* uyp,const amrex::Real* uzp,
			const amrex::Real* gip, const amrex::Real* w, const amrex::Real* q,
			const amrex::Real* xmin, const amrex::Real* ymin, const amrex::Real* zmin,
			const amrex::Real* dt,
			const amrex::Real* dx, const amrex::Real* dy, const amrex::Real* dz,
			const long* nox, const long* noy,const long* noz,
			const long* lvect, const long* current_depo_algo);

	// Field gathering

	void warpx_geteb_energy_conserving(const long* np,
			const amrex::Real* xp, const amrex::Real* yp, const amrex::Real* zp,
			amrex::Real* exp, amrex::Real* eyp, amrex::Real* ezp,
                        amrex::Real* bxp, amrex::Real* byp, amrex::Real* bzp,
                        const int* ixyzmin,
                        const amrex::Real* xmin, const amrex::Real* ymin, const amrex::Real* zmin,
                        const amrex::Real* dx, const amrex::Real* dy, const amrex::Real* dz,
			const long* nox, const long* noy, const long* noz,
			const amrex::Real* exg, const int* exg_lo, const int* exg_hi,
			const amrex::Real* eyg, const int* eyg_lo, const int* eyg_hi,
			const amrex::Real* ezg, const int* ezg_lo, const int* ezg_hi,
			const amrex::Real* bxg, const int* bxg_lo, const int* bxg_hi,
			const amrex::Real* byg, const int* byg_lo, const int* byg_hi,
			const amrex::Real* bzg, const int* bzg_lo, const int* bzg_hi,
			const int* ll4symtry, const int* l_lower_order_in_v,
			const long* lvect,
			const long* field_gathe_algo);

	// Particle pusher (velocity and position)

	void warpx_particle_pusher(const long* np,
			amrex::Real* xp, amrex::Real* yp, amrex::Real* zp,
			amrex::Real* uxp, amrex::Real* uyp, amrex::Real* uzp, amrex::Real* gaminv,
			const amrex::Real* exp, const amrex::Real* eyp,const amrex::Real* ezp,
			const amrex::Real* bxp, const amrex::Real* byp,const amrex::Real* bzp,
			const amrex::Real* charge, const amrex::Real* mass, const amrex::Real* dt,
			const long* particle_pusher_algo);

	// Particle pusher (velocity)

	void warpx_particle_pusher_momenta(const long* np,
			amrex::Real* xp, amrex::Real* yp, amrex::Real* zp,
			amrex::Real* uxp, amrex::Real* uyp, amrex::Real* uzp, amrex::Real* gaminv,
			const amrex::Real* exp, const amrex::Real* eyp,const amrex::Real* ezp,
			const amrex::Real* bxp, const amrex::Real* byp,const amrex::Real* bzp,
			const amrex::Real* charge, const amrex::Real* mass, const amrex::Real* dt,
			const long* particle_pusher_algo);

	// Particle pusher (position)

	void warpx_particle_pusher_positions(const long* np,
                                             amrex::Real* xp, amrex::Real* yp, amrex::Real* zp,
                                             amrex::Real* uxp, amrex::Real* uyp, amrex::Real* uzp, amrex::Real* gaminv,
                                             const amrex::Real* dt);

    // Laser pusher

	void warpx_gaussian_laser( const long* np,
				amrex::Real* Xp, amrex::Real* Yp, amrex::Real* t, amrex::Real* wavelength, amrex::Real* e_max, amrex::Real* waist,
				amrex::Real* duration, amrex::Real* t_peak, amrex::Real* f, amrex::Real* amplitude,
				amrex::Real* zeta, amrex::Real* beta, amrex::Real* phi2 );

        void warpx_harris_laser( const long* np,
                                 amrex::Real* Xp, amrex::Real* Yp, amrex::Real* t, amrex::Real* wavelength,
                                 amrex::Real* e_max, amrex::Real* waist, amrex::Real* duration, amrex::Real* f, amrex::Real* amplitude );

        void parse_function_laser( const long* np, amrex::Real* Xp, amrex::Real* Yp, amrex::Real* t, amrex::Real* amplitude, const int parser_instance_number );

    // Maxwell solver

        void warpx_push_evec(
                const int* xlo, const int* xhi,
                const int* ylo, const int* yhi,
                const int* zlo, const int* zhi,
                BL_FORT_FAB_ARG_3D(ex),
                BL_FORT_FAB_ARG_3D(ey),
                BL_FORT_FAB_ARG_3D(ez),
                const BL_FORT_FAB_ARG_3D(bx),
                const BL_FORT_FAB_ARG_3D(by),
                const BL_FORT_FAB_ARG_3D(bz),
                const BL_FORT_FAB_ARG_3D(jx),
                const BL_FORT_FAB_ARG_3D(jy),
                const BL_FORT_FAB_ARG_3D(jz),
                const amrex::Real* mudt,
                const amrex::Real* dtsdx,
                const amrex::Real* dtsdy,
                const amrex::Real* dtsdz);

        void warpx_push_bvec(
                const int* xlo, const int* xhi,
                const int* ylo, const int* yhi,
                const int* zlo, const int* zhi,
                const BL_FORT_FAB_ARG_3D(ex),
                const BL_FORT_FAB_ARG_3D(ey),
                const BL_FORT_FAB_ARG_3D(ez),
                BL_FORT_FAB_ARG_3D(bx),
                BL_FORT_FAB_ARG_3D(by),
                BL_FORT_FAB_ARG_3D(bz),
                const amrex::Real* dtsdx,
                const amrex::Real* dtsdy,
                const amrex::Real* dtsdz,
		const int* maxwell_fdtd_solver_id);

        void warpx_push_evec_f(
                const int* xlo, const int* xhi,
                const int* ylo, const int* yhi,
                const int* zlo, const int* zhi,
                BL_FORT_FAB_ARG_3D(ex),
                BL_FORT_FAB_ARG_3D(ey),
                BL_FORT_FAB_ARG_3D(ez),
                const BL_FORT_FAB_ARG_3D(f),
                const amrex::Real* dtsdx_c2,
                const amrex::Real* dtsdy_c2,
                const amrex::Real* dtsdz_c2,
		const int* maxwell_fdtd_solver_id);

#ifdef USE_OPENBC_POISSON
    void warpx_openbc_potential (amrex::Real* rho, amrex::Real* phi, const amrex::Real* dx);
    void warpx_openbc_decompose (const int*, const int*, int*, int*);
#endif

    void warpx_compute_E (const int* lo, const int* hi,
			  const BL_FORT_FAB_ARG_3D(phi),
			  BL_FORT_FAB_ARG_3D(Ex),
			  BL_FORT_FAB_ARG_3D(Ey),
			  BL_FORT_FAB_ARG_3D(Ez),
			  const amrex::Real* dx);

///
/// These functions are used in electrostatic mode.
///

    void WRPX_SUM_FINE_TO_CRSE_NODAL(const int* lo, const int* hi, const int* lrat,
                                     amrex::Real* crse, const int* clo, const int* chi,
                                     const amrex::Real* fine, const int* flo, const int* fhi);

    void WRPX_ZERO_OUT_BNDRY(const int* lo, const int* hi,
                             amrex::Real* input_data, amrex::Real* bndry_data,
                             const int* mask);

    void WRPX_BUILD_MASK(const int* lo, const int* hi,
                         const int* tmp_mask, int* mask, const int* ncells);

    void WRPX_COMPUTE_E_NODAL(const int* lo, const int* hi,
                              const amrex::Real* phi,
                              amrex::Real* Ex, amrex::Real* Ey,
#if (AMREX_SPACEDIM == 3)
                          amrex::Real* Ez,
#endif
                          const amrex::Real* dx);

    void WRPX_DEPOSIT_CIC(const amrex::Real* particles, int ns, int np,
                          const amrex::Real* weights,
                          const amrex::Real* charge,
                          amrex::Real* rho, const int* lo, const int* hi,
                          const amrex::Real* plo, const amrex::Real* dx,
                          const int* ng);

    void WRPX_INTERPOLATE_CIC_TWO_LEVELS(const amrex::Real* particles, int ns, int np,
                                         amrex::Real* Ex_p, amrex::Real* Ey_p,
#if (AMREX_SPACEDIM == 3)
                                         amrex::Real* Ez_p,
#endif
                                         const amrex::Real* Ex, const amrex::Real* Ey,
#if (AMREX_SPACEDIM == 3)
                                         const amrex::Real* Ez,
#endif
                                         const int* lo, const int* hi, const amrex::Real* dx,
                                         const amrex::Real* cEx, const amrex::Real* cEy,
#if (AMREX_SPACEDIM == 3)
                                         const amrex::Real* cEz,
#endif
                                         const int* mask,
                                         const int* clo, const int* chi, const amrex::Real* cdx,
                                         const amrex::Real* plo, const int* ng, const int* lev);

    void WRPX_INTERPOLATE_CIC(const amrex::Real* particles, int ns, int np,
                              amrex::Real* Ex_p, amrex::Real* Ey_p,
#if (AMREX_SPACEDIM == 3)
                              amrex::Real* Ez_p,
#endif
                              const amrex::Real* Ex, const amrex::Real* Ey,
#if (AMREX_SPACEDIM == 3)
                              const amrex::Real* Ez,
#endif
                              const int* lo, const int* hi,
                              const amrex::Real* plo, const amrex::Real* dx,
                              const int* ng);

    void WRPX_PUSH_LEAPFROG(amrex::Real* particles, int ns, int np,
                            amrex::Real* vx_p, amrex::Real* vy_p,
#if (AMREX_SPACEDIM == 3)
                            amrex::Real* vz_p,
#endif
                            const amrex::Real* Ex_p, const amrex::Real* Ey_p,
#if (AMREX_SPACEDIM == 3)
                            const amrex::Real* Ez_p,
#endif
                            const amrex::Real* charge, const amrex::Real* mass, const amrex::Real* dt,
                            const amrex::Real* prob_lo, const amrex::Real* prob_hi);

    void WRPX_PUSH_LEAPFROG_POSITIONS(amrex::Real* particles, int ns, int np,
                                      amrex::Real* vx_p, amrex::Real* vy_p,
#if (AMREX_SPACEDIM == 3)
                                      amrex::Real* vz_p,
#endif
                                      const amrex::Real* dt, const amrex::Real* prob_lo,
                                      const amrex::Real* prob_hi);

    void WRPX_LORENTZ_TRANSFORM_Z(amrex::Real* data, const int* dlo, const int* dhi,
                                  const int* tlo, const int* thi,
                                  const amrex::Real* gamma_boost, const amrex::Real* beta_boost);

//  These functions are used to evolve E and B in the PML

    void WRPX_COMPUTE_DIVB (const int* lo, const int* hi,
                             BL_FORT_FAB_ARG_ANYD(divb),
                             const BL_FORT_FAB_ARG_ANYD(Bx),
                             const BL_FORT_FAB_ARG_ANYD(By),
                             const BL_FORT_FAB_ARG_ANYD(Bz),
                             const amrex::Real* dx);

    void WRPX_COMPUTE_DIVE (const int* lo, const int* hi,
                             BL_FORT_FAB_ARG_ANYD(dive),
                             const BL_FORT_FAB_ARG_ANYD(ex),
                             const BL_FORT_FAB_ARG_ANYD(ey),
                             const BL_FORT_FAB_ARG_ANYD(ez),
                             const amrex::Real* dx);

    void WRPX_PUSH_PML_BVEC(const int* xlo, const int* xhi,
                            const int* ylo, const int* yhi,
                            const int* zlo, const int* zhi,
                            const BL_FORT_FAB_ARG_3D(ex),
                            const BL_FORT_FAB_ARG_3D(ey),
                            const BL_FORT_FAB_ARG_3D(ez),
                            BL_FORT_FAB_ARG_3D(bx),
                            BL_FORT_FAB_ARG_3D(by),
                            BL_FORT_FAB_ARG_3D(bz),
                            const amrex::Real* dtsdx,
			    const amrex::Real* dtsdy,
			    const amrex::Real* dtsdz,
			    const int* maxwell_fdtd_solver_id);


    void WRPX_PUSH_PML_EVEC(const int* xlo, const int* xhi,
                            const int* ylo, const int* yhi,
                            const int* zlo, const int* zhi,
                            BL_FORT_FAB_ARG_3D(ex),
                            BL_FORT_FAB_ARG_3D(ey),
                            BL_FORT_FAB_ARG_3D(ez),
                            const BL_FORT_FAB_ARG_3D(bx),
                            const BL_FORT_FAB_ARG_3D(by),
                            const BL_FORT_FAB_ARG_3D(bz),
                            const amrex::Real* dtsdx,
                            const amrex::Real* dtsdy,
                            const amrex::Real* dtsdz);

    void WRPX_PUSH_PML_EVEC_F(const int* xlo, const int* xhi,
                              const int* ylo, const int* yhi,
                              const int* zlo, const int* zhi,
                              BL_FORT_FAB_ARG_3D(ex),
                              BL_FORT_FAB_ARG_3D(ey),
                              BL_FORT_FAB_ARG_3D(ez),
                              const BL_FORT_FAB_ARG_3D(f),
                              const amrex::Real* dtsdx,
                              const amrex::Real* dtsdy,
                              const amrex::Real* dtsdz,
                              const int* maxwell_fdtd_solver_id);

    void WRPX_PUSH_PML_F(const int* lo, const int* hi,
                         BL_FORT_FAB_ARG_3D(f),
                         const BL_FORT_FAB_ARG_3D(ex),
                         const BL_FORT_FAB_ARG_3D(ey),
                         const BL_FORT_FAB_ARG_3D(ez),
                         const amrex::Real* dtsdx,
                         const amrex::Real* dtsdy,
                         const amrex::Real* dtsdz);

    void WRPX_DAMP_PML (const int* texlo, const int* texhi,
                        const int* teylo, const int* teyhi,
                        const int* tezlo, const int* tezhi,
                        const int* tbxlo, const int* tbxhi,
                        const int* tbylo, const int* tbyhi,
                        const int* tbzlo, const int* tbzhi,
                        amrex::Real* ex, const int* exlo, const int* exhi,
                        amrex::Real* ey, const int* eylo, const int* eyhi,
                        amrex::Real* ez, const int* ezlo, const int* ezhi,
                        amrex::Real* bx, const int* bxlo, const int* bxhi,
                        amrex::Real* by, const int* bylo, const int* byhi,
                        amrex::Real* bz, const int* bzlo, const int* bzhi,
                        const amrex::Real* sigex, int sigex_lo, int sigex_hi,
#if (AMREX_SPACEDIM == 3)
                        const amrex::Real* sigey, int sigey_lo, int sigey_hi,
#endif
                        const amrex::Real* sigez, int sigez_lo, int sigez_hi,
                        const amrex::Real* sigbx, int sigbx_lo, int sigbx_hi,
#if (AMREX_SPACEDIM == 3)
                        const amrex::Real* sigby, int sigby_lo, int sigby_hi,
#endif
                        const amrex::Real* sigbz, int sigbz_lo, int sigbz_hi);

    void WRPX_DAMP_PML_F (const int* tndlo, const int* tndhi,
                          amrex::Real* F,  const int* flo, const int* fhi,
                          const amrex::Real* sigex, int sigex_lo, int sigex_hi,
#if (AMREX_SPACEDIM == 3)
                          const amrex::Real* sigey, int sigey_lo, int sigey_hi,
#endif
                          const amrex::Real* sigez, int sigez_lo, int sigez_hi,
                          const amrex::Real* sigbx, int sigbx_lo, int sigbx_hi,
#if (AMREX_SPACEDIM == 3)
                          const amrex::Real* sigby, int sigby_lo, int sigby_hi,
#endif
                          const amrex::Real* sigbz, int sigbz_lo, int sigbz_hi);

    void WRPX_SYNC_CURRENT (const int* lo, const int* hi,
                             BL_FORT_FAB_ARG_ANYD(crse),
                             const BL_FORT_FAB_ARG_ANYD(fine),
                             const int* dir);

    void WRPX_SYNC_RHO (const int* lo, const int* hi,
                        BL_FORT_FAB_ARG_ANYD(crse),
                        const BL_FORT_FAB_ARG_ANYD(fine),
                        const int* ncomp);

    void WRPX_FILTER (const int* lo, const int* hi,
                      const amrex_real*, const int*, const int*,
                      amrex_real*, const int*, const int*, int);

    void WRPX_PXR_NCI_CORR_INIT(amrex::Real*, amrex::Real*, const int,
                                const amrex::Real, const int);

    void WRPX_PXR_GODFREY_FILTER (const int* lo, const int* hi,
                                  amrex_real* fou, const int* olo, const int* ohi,
                                  const amrex_real* fin, const int* ilo, const int* ihi,
                                  const amrex_real* stencil, const int* nsten);

    int parser_initialize_function(const char *str_func, const int len_func,
                                   const char *str_var, const int len_var);

    amrex::Real parser_evaluate_function(const amrex::Real*, const int, const int);

#ifdef WARPX_USE_PSATD
    void warpx_fft_mpi_init (int fcomm);
    void warpx_fft_domain_decomp (int* warpx_local_nz, int* warpx_local_z0,
                                  const int* global_lo, const int* global_hi);
    void warpx_fft_dataplan_init (const int* nox, const int* noy, const int* noz,
                                  void* fft_data, const int* ndata,
                                  const amrex_real* dx_w, const amrex_real* dt_w,
                                  const int* fftw_plan_measure );
    void warpx_fft_nullify ();
    void warpx_fft_push_eb (amrex_real* ex_w, const int* exlo, const int* exhi,
                            amrex_real* ey_w, const int* eylo, const int* eyhi,
                            amrex_real* ez_w, const int* ezlo, const int* ezhi,
                            amrex_real* bx_w, const int* bxlo, const int* bxhi,
                            amrex_real* by_w, const int* bylo, const int* byhi,
                            amrex_real* bz_w, const int* bzlo, const int* bzhi,
                            amrex_real* jx_w, const int* jxlo, const int* jxhi,
                            amrex_real* jy_w, const int* jylo, const int* jyhi,
                            amrex_real* jz_w, const int* jzlo, const int* jzhi,
                            amrex_real* rhoold_w, const int* r1lo, const int* r1hi,
                            amrex_real* rho_w, const int* r2lo, const int* r2hi);

#endif

    void warpx_build_buffer_masks (const int* lo, const int* hi,
                                   int* msk, const int* mlo, const int* mhi,
                                   const int* gmsk, const int* glo, const int* ghi, const int* ng);

#ifdef __cplusplus
}
#endif