1#ifndef AMREX_TRACERPARTICLE_MOD_K_H
2#define AMREX_TRACERPARTICLE_MOD_K_H
4#include <AMReX_Config.H>
31 amrex::ParticleReal * val,
int M = AMREX_SPACEDIM)
42 amrex::ParticleReal * val,
int M = AMREX_SPACEDIM)
45 int ncomp_per_array = M;
60 amrex::ParticleReal * val,
int M = AMREX_SPACEDIM)
63 int ncomp_per_array = M;
79 amrex::ParticleReal * val)
82 int ncomp_per_array = 1;
83 int num_arrays = AMREX_SPACEDIM;
84 IntVect is_nodal[AMREX_SPACEDIM];
85 for (
int d=0; d < AMREX_SPACEDIM; ++d) {
104 amrex::ParticleReal * val,
106 int start_comp,
int ncomp,
int num_arrays)
112 for (
int d = 0; d < num_arrays; d++)
114 AMREX_D_TERM(amrex::Real lx = (Real(p.pos(0))-plo[0])*dxi[0] -
static_cast<Real
>(!is_nodal[d][0])*Real(0.5);,
115 amrex::Real ly = (Real(p.pos(1))-plo[1])*dxi[1] -
static_cast<Real
>(!is_nodal[d][1])*Real(0.5);,
116 amrex::Real lz = (Real(p.pos(2))-plo[2])*dxi[2] -
static_cast<Real
>(!is_nodal[d][2])*Real(0.5));
121 AMREX_D_TERM(
int const i0 =
static_cast<int>(amrex::Math::floor(lx));,
122 int const j0 =
static_cast<int>(amrex::Math::floor(ly));,
123 int const k0 =
static_cast<int>(amrex::Math::floor(lz)));
125 AMREX_D_TERM(amrex::Real
const xint = lx -
static_cast<Real
>(i0);,
126 amrex::Real
const yint = ly -
static_cast<Real
>(j0);,
127 amrex::Real
const zint = lz -
static_cast<Real
>(k0));
129 amrex::Real sx[] = {amrex::Real(1.0) - xint, xint};
130#if (AMREX_SPACEDIM > 1)
131 amrex::Real sy[] = {amrex::Real(1.0) - yint, yint};
133#if (AMREX_SPACEDIM > 2)
134 amrex::Real sz[] = {amrex::Real(1.0) - zint, zint};
137 for (
int comp = start_comp; comp < start_comp + ncomp; ++comp) {
138 val[ctr] = ParticleReal(0.0);
139#if (AMREX_SPACEDIM > 2)
140 for (
int kk = 0; kk <=1; ++kk) {
143#if (AMREX_SPACEDIM > 1)
144 for (
int jj = 0; jj <= 1; ++jj) {
146 for (
int ii = 0; ii <= 1; ++ii) {
147 val[ctr] +=
static_cast<ParticleReal
>((data_arr[d])(
IntVect(
AMREX_D_DECL(i0+ii, j0+jj, k0+kk)), comp) *
172 amrex::ParticleReal * val,
int M = AMREX_SPACEDIM)
188 amrex::ParticleReal * val,
int M = AMREX_SPACEDIM)
191 int ncomp_per_array = M;
195 val, &is_nodal, icomp, ncomp_per_array, num_arrays);
209 amrex::ParticleReal * val,
int M = AMREX_SPACEDIM)
212 int ncomp_per_array = M;
216 val, &is_nodal, icomp, ncomp_per_array, num_arrays);
231 amrex::ParticleReal * val)
234 int ncomp_per_array = 1;
235 int num_arrays = AMREX_SPACEDIM;
236 IntVect is_nodal[AMREX_SPACEDIM];
237 for (
int d=0; d < AMREX_SPACEDIM; ++d) {
242 val, &is_nodal[0], icomp, ncomp_per_array, num_arrays);
257 amrex::ParticleReal * val,
259 int start_comp,
int ncomp,
int num_arrays)
261#if (AMREX_SPACEDIM == 1)
262 amrex::ignore_unused(p, plo, dxi, data_arr, height_arr, val, is_nodal, start_comp, ncomp, num_arrays);
263 amrex::Abort(
" Terrain fitted grid interpolation is not supported in 1D\n");
269 for (
int d = 0; d < num_arrays; d++)
271 AMREX_D_TERM(amrex::Real lx = (Real(p.pos(0))-plo[0])*dxi[0] -
static_cast<Real
>(!is_nodal[d][0])*Real(0.5);,
272 amrex::Real ly = (Real(p.pos(1))-plo[1])*dxi[1] -
static_cast<Real
>(!is_nodal[d][1])*Real(0.5);,);
274 int const i0 =
static_cast<int>(amrex::Math::floor(lx));
277#if (AMREX_SPACEDIM == 2)
279 int const j = p.idata(0);
283 amrex::Real
const xint = lx -
static_cast<Real
>(i0);
284 amrex::Real sx[] = { amrex::Real(1.) - xint, xint};
295 if (d != AMREX_SPACEDIM-1) {
296 amrex::Real hlo_xlo = amrex::Real(0.25)
297 * ( height_arr(i0 , j , k)
298 + height_arr(i0 + (!(is_nodal[d][0])) , j , k)
299 + height_arr(i0 , j + (!is_nodal[d][1]) , k)
300 + height_arr(i0 + (!(is_nodal[d][0])) , j + (!is_nodal[d][1]) , k) );
302 amrex::Real hlo_xhi = amrex::Real(0.25)
303 * ( height_arr(i0 + 1 , j , k )
304 + height_arr(i0 + 1 + (!(is_nodal[d][0])) , j , k )
305 + height_arr(i0 + 1 , j + (!is_nodal[d][1]), k )
306 + height_arr(i0 + 1 + (!(is_nodal[d][0])) , j + (!is_nodal[d][1]), k ) );
308 amrex::Real height_at_px = sx[0] * hlo_xlo + sx[1] * hlo_xhi;
310 if (amrex::Real(p.pos(1)) < height_at_px) {j0 = j-1;}
323 for (
int ii=0; ii < 2; ++ii) {
324 for (
int jj=0; jj < 2; ++jj) {
325 ht[yctr] = amrex::Real(0.25)
326 * ( height_arr(i0 + ii , j0 + jj , k )
327 + height_arr(i0 + ii + (!(is_nodal[d][0])) , j0 + jj , k )
328 + height_arr(i0 + ii , j0 + jj + (!is_nodal[d][1]), k )
329 + height_arr(i0 + ii + (!(is_nodal[d][0])) , j0 + jj + (!is_nodal[d][1]), k ) );
333 amrex::Real hint_ilo = (p.pos(1) - ht[0]) / (ht[1] - ht[0]);
334 amrex::Real hint_ihi = (p.pos(1) - ht[2]) / (ht[3] - ht[2]);
336 amrex::Real sy[] = { amrex::Real(1.) - hint_ilo, amrex::Real(1.) - hint_ihi,
339#elif (AMREX_SPACEDIM == 3)
341 int const j0 =
static_cast<int>(amrex::Math::floor(ly));
343 amrex::Real
const xint = lx -
static_cast<Real
>(i0);
344 amrex::Real
const yint = ly -
static_cast<Real
>(j0);
345 amrex::Real sx[] = { amrex::Real(1.) - xint, xint};
346 amrex::Real sy[] = { amrex::Real(1.) - yint, yint};
361 if (d != AMREX_SPACEDIM-1) {
364 amrex::Real height_at_pxy = 0.;
365 for (
int ii = 0; ii < 2; ++ii) {
366 for (
int jj = 0; jj < 2; ++jj) {
367 hlo[ilo] = amrex::Real(0.125)
368 * ( height_arr(i0 + ii , j0 + jj , k )
369 + height_arr(i0 + ii + (!is_nodal[d][0]), j0 + jj , k )
370 + height_arr(i0 + ii , j0 + jj + (!is_nodal[d][1]), k )
371 + height_arr(i0 + ii + (!is_nodal[d][0]), j0 + jj + (!is_nodal[d][1]), k )
372 + height_arr(i0 + ii , j0 + jj , k + (!is_nodal[d][2]))
373 + height_arr(i0 + ii + (!is_nodal[d][0]), j0 + jj , k + (!is_nodal[d][2]))
374 + height_arr(i0 + ii , j0 + jj + (!is_nodal[d][1]), k + (!is_nodal[d][2]))
375 + height_arr(i0 + ii + (!is_nodal[d][0]), j0 + jj + (!is_nodal[d][1]), k + (!is_nodal[d][2]))
377 height_at_pxy += hlo[ilo] * sx[ii] * sy[jj];
382 if (amrex::Real(p.pos(2)) < height_at_pxy ) {k0 = k-1;}
396 for (
int ii = 0; ii < 2; ++ii) {
397 for (
int jj = 0; jj < 2; ++jj) {
398 for (
int kk = 0; kk < 2; ++kk) {
399 ht[zctr] = amrex::Real(0.125) *
400 ( height_arr(i0 + ii , j0 + jj , k0 + kk )
401 + height_arr(i0 + ii , j0 + jj , k0 + kk + (!is_nodal[d][2]))
402 + height_arr(i0 + ii , j0 + jj + (!is_nodal[d][1]), k0 + kk )
403 + height_arr(i0 + ii , j0 + jj + (!is_nodal[d][1]), k0 + kk + (!is_nodal[d][2]))
404 + height_arr(i0 + ii + (!is_nodal[d][0]), j0 + jj , k0 + kk )
405 + height_arr(i0 + ii + (!is_nodal[d][0]), j0 + jj , k0 + kk + (!is_nodal[d][2]))
406 + height_arr(i0 + ii + (!is_nodal[d][0]), j0 + jj + (!is_nodal[d][1]), k0 + kk )
407 + height_arr(i0 + ii + (!is_nodal[d][0]), j0 + jj + (!is_nodal[d][1]), k0 + kk + (!is_nodal[d][2]))
412 amrex::Real hint_ilojlo = ( p.pos(2) - ht[0] ) / (ht[1] - ht[0]);
413 amrex::Real hint_ilojhi = ( p.pos(2) - ht[2] ) / (ht[3] - ht[2]);
414 amrex::Real hint_ihijlo = ( p.pos(2) - ht[4] ) / (ht[5] - ht[4]);
415 amrex::Real hint_ihijhi = ( p.pos(2) - ht[6] ) / (ht[7] - ht[6]);
417 amrex::Real sz[] = { amrex::Real(1.) - hint_ilojlo,
418 amrex::Real(1.) - hint_ihijlo,
419 amrex::Real(1.) - hint_ilojhi,
420 amrex::Real(1.) - hint_ihijhi,
426 for (
int comp = start_comp; comp < start_comp + ncomp; ++comp) {
427 val[ctr] = amrex::ParticleReal(0.);
428#if (AMREX_SPACEDIM == 2)
431 for (
int jj = 0; jj <= 1; ++jj) {
432 for (
int ii = 0; ii <=1; ++ii) {
433 val[ctr] +=
static_cast<ParticleReal
>( (data_arr[d])(i0+ii, j0+jj, k0 ,comp)*sx[ii]*sy[sy_ctr] );
437#elif (AMREX_SPACEDIM == 3)
439 for (
int kk = 0; kk <= 1; ++kk) {
440 for (
int jj = 0; jj <= 1; ++jj) {
441 for (
int ii = 0; ii <= 1; ++ii) {
442 val[ctr] +=
static_cast<ParticleReal
>(
443 (data_arr[d])(i0+ii, j0+jj, k0 + kk, comp)*sx[ii]*sy[jj]*sz[sz_ctr]);
469 amrex::Real amult,apm,apn;
470 for (
int n=1; n<neq+1; n++)
475 for (
int i=1; i<neq; i++)
480 apm = std::abs(a(ipi,i));
482 for (
int j=ip1; j<neq+1; j++)
485 apn=std::abs(a(ipj,i));
495 for (
int l=ip1; l<neq+1; l++)
500 for (
int kk = ip1; kk < neq+1; kk++)
502 a(n,kk) -= amult*a(j,kk);
509void particle_interp_solve (
Array2D<Real,1,7,1,7>& a,
Array1D<Real,1,7>&
b,
Array1D<int,1,7>& ip,
int neq)
512 for (
int l=2; l<neq+1; l++)
516 for (
int k=1; k<l; k++){
517 b(n) -= a(n,k) *
b(ip(k));
520 b(ip(neq))=
b(ip(neq))/a(ip(neq),neq);
522 for (
int l=1; l<neq; l++)
527 for (
int k=jp1; k<neq+1; k++){
528 b(n) -= a(n,k ) *
b(ip(k));
532 for (
int n=1; n<neq+1; n++)
554 amrex::ParticleReal * val,
int M = AMREX_SPACEDIM)
557 int ncomp_per_array = M;
561 val, &is_nodal, icomp, ncomp_per_array, num_arrays);
574 amrex::ParticleReal * val,
576 int start_comp,
int ncomp,
int num_arrays)
578#if (AMREX_SPACEDIM == 1)
580 amrex::Abort(
" General mapped interpolation is not supported in 1D\n");
585 for (
int d = 0; d < num_arrays; d++)
590#if (AMREX_SPACEDIM == 3)
598 for (
int comp = start_comp; comp < start_comp + ncomp; ++comp) {
600#if (AMREX_SPACEDIM == 2)
602 amrex::Real f1 = (data_arr[n_of_data])(i ,j ,0,comp);
603 amrex::Real f2 = (data_arr[n_of_data])(i ,j+1,0,comp) - f1;
604 amrex::Real f3 = (data_arr[n_of_data])(i+1,j ,0,comp) - f1;
605 amrex::Real f4 = (data_arr[n_of_data])(i+1,j+1,0,comp) - f1;
608 amrex::Real x1 = loc_arr(i ,j ,0,0);
609 amrex::Real x2 = loc_arr(i ,j+1,0,0) - x1;
610 amrex::Real x3 = loc_arr(i+1,j ,0,0) - x1;
611 amrex::Real x4 = loc_arr(i+1,j+1,0,0) - x1;
613 amrex::Real y1 = loc_arr(i ,j ,0,1);
614 amrex::Real y2 = loc_arr(i ,j+1,0,1) - y1;
615 amrex::Real y3 = loc_arr(i+1,j ,0,1) - y1;
616 amrex::Real y4 = loc_arr(i+1,j+1,0,1) - y1;
619 amrex::Real
x = p.pos(0) - x1;
620 amrex::Real
y = p.pos(1) - y1;
622 amrex::Real det = x2*x4*y3*(y2 - y4) - x3*x4*y2*(y3 - y4) - x2*x3*(y2 - y3)*y4;
624 amrex::Real
b = ( f4*(x2*y2*y3 - x3*y2*y3) + (f2*(x3 - x4)*y3)*y4 + f3*(-(x2*y2*y4) + x4*y2*y4) ) / det;
625 amrex::Real c = ( -f2*x3*x4*y3 + f4*x2*x3*(-y2 + y3) + f3*x2*x4*(y2 - y4) + f2*x3*x4*y4 ) / det;
626 amrex::Real d = ( f2*x4*y3 + f4*(x3*y2 - x2*y3) - f2*x3*y4 + f3*(-(x4*y2) + x2*y4) ) / det;
628 amrex::Real f =
b*
x + c*
y + d*
x*
y;
629 val[comp-start_comp] = f1 + f;
631#elif (AMREX_SPACEDIM == 3)
644 amrex::Real x1, y1, z1, f1;
646 x1 = loc_arr(i ,j ,k ,0);
647 x_vals(1) = loc_arr(i+1,j ,k ,0) - x1;
648 x_vals(2) = loc_arr(i ,j+1,k ,0) - x1;
649 x_vals(3) = loc_arr(i+1,j+1,k ,0) - x1;
650 x_vals(4) = loc_arr(i ,j ,k+1,0) - x1;
651 x_vals(5) = loc_arr(i+1,j ,k+1,0) - x1;
652 x_vals(6) = loc_arr(i ,j+1,k+1,0) - x1;
653 x_vals(7) = loc_arr(i+1,j+1,k+1,0) - x1;
655 y1 = loc_arr(i ,j ,k ,1);
656 y_vals(1) = loc_arr(i+1,j ,k ,1) - y1;
657 y_vals(2) = loc_arr(i ,j+1,k ,1) - y1;
658 y_vals(3) = loc_arr(i+1,j+1,k ,1) - y1;
659 y_vals(4) = loc_arr(i ,j ,k+1,1) - y1;
660 y_vals(5) = loc_arr(i+1,j ,k+1,1) - y1;
661 y_vals(6) = loc_arr(i ,j+1,k+1,1) - y1;
662 y_vals(7) = loc_arr(i+1,j+1,k+1,1) - y1;
664 z1 = loc_arr(i ,j ,k ,2);
665 z_vals(1) = loc_arr(i+1,j ,k ,2) - z1;
666 z_vals(2) = loc_arr(i ,j+1,k ,2) - z1;
667 z_vals(3) = loc_arr(i+1,j+1,k ,2) - z1;
668 z_vals(4) = loc_arr(i ,j ,k+1,2) - z1;
669 z_vals(5) = loc_arr(i+1,j ,k+1,2) - z1;
670 z_vals(6) = loc_arr(i ,j+1,k+1,2) - z1;
671 z_vals(7) = loc_arr(i+1,j+1,k+1,2) - z1;
673 f1 = (data_arr[n_of_data])(i ,j ,k ,comp);
674 b(1) = (data_arr[n_of_data])(i+1,j ,k ,comp) - f1;
675 b(2) = (data_arr[n_of_data])(i ,j+1,k ,comp) - f1;
676 b(3) = (data_arr[n_of_data])(i+1,j+1,k ,comp) - f1;
677 b(4) = (data_arr[n_of_data])(i ,j ,k+1,comp) - f1;
678 b(5) = (data_arr[n_of_data])(i+1,j ,k+1,comp) - f1;
679 b(6) = (data_arr[n_of_data])(i ,j+1,k+1,comp) - f1;
680 b(7) = (data_arr[n_of_data])(i+1,j+1,k+1,comp) - f1;
687 for (
int n=1; n<neq+1; n++) {
691 a(n,4) = x_vals(n)*y_vals(n);
692 a(n,5) = x_vals(n)*z_vals(n);
693 a(n,6) = z_vals(n)*y_vals(n);
694 a(n,7) = x_vals(n)*y_vals(n)*z_vals(n);
700 amrex::Real px, py, pz;
705 amrex::Real f =
b(1)*px +
b(2)*py +
b(3)*pz +
b(4)*px*py +
b(5)*px*pz +
b(6)*py*pz +
b(7)*px*py*pz;
706 val[comp-start_comp] =
static_cast<ParticleReal
>(f + f1);
#define AMREX_ALWAYS_ASSERT_WITH_MESSAGE(EX, MSG)
Definition AMReX_BLassert.H:49
#define AMREX_ASSERT(EX)
Definition AMReX_BLassert.H:38
#define AMREX_FORCE_INLINE
Definition AMReX_Extension.H:119
#define AMREX_GPU_HOST_DEVICE
Definition AMReX_GpuQualifiers.H:20
#define AMREX_D_TERM(a, b, c)
Definition AMReX_SPACE.H:172
#define AMREX_D_DECL(a, b, c)
Definition AMReX_SPACE.H:171
__host__ static __device__ constexpr IntVectND< dim > TheUnitVector() noexcept
This static member function returns a reference to a constant IntVectND object, all of whose dim argu...
Definition AMReX_IntVect.H:687
__host__ static __device__ constexpr IntVectND< dim > TheZeroVector() noexcept
This static member function returns a reference to a constant IntVectND object, all of whose dim argu...
Definition AMReX_IntVect.H:677
Definition AMReX_Amr.cpp:49
__host__ __device__ void ignore_unused(const Ts &...)
This shuts up the compiler about unused variables.
Definition AMReX.H:138
__host__ __device__ void cic_interpolate(const P &p, amrex::GpuArray< amrex::Real, 3 > const &plo, amrex::GpuArray< amrex::Real, 3 > const &dxi, const amrex::Array4< amrex::Real const > &data_arr, amrex::ParticleReal *val, int M=3)
Linearly interpolates the mesh data to the particle position from cell-centered data.
Definition AMReX_TracerParticle_mod_K.H:27
__host__ __device__ void linear_interpolate_to_particle_z(const P &p, amrex::GpuArray< amrex::Real, 3 > const &plo, amrex::GpuArray< amrex::Real, 3 > const &dxi, const Array4< amrex::Real const > *data_arr, const amrex::Array4< amrex::Real const > &height_arr, amrex::ParticleReal *val, const IntVect *is_nodal, int start_comp, int ncomp, int num_arrays)
Linearly interpolates the mesh data to the particle position from mesh data. This general form can ha...
Definition AMReX_TracerParticle_mod_K.H:252
__host__ __device__ void mac_interpolate_mapped_z(const P &p, amrex::GpuArray< amrex::Real, 3 > const &plo, amrex::GpuArray< amrex::Real, 3 > const &dxi, amrex::GpuArray< amrex::Array4< amrex::Real const >, 3 > const &data_arr, const amrex::Array4< amrex::Real const > &height_arr, amrex::ParticleReal *val)
Linearly interpolates the mesh data to the particle position from face-centered data on a terrain-fit...
Definition AMReX_TracerParticle_mod_K.H:226
__host__ __device__ void linear_interpolate_to_particle(const P &p, amrex::GpuArray< amrex::Real, 3 > const &plo, amrex::GpuArray< amrex::Real, 3 > const &dxi, const Array4< amrex::Real const > *data_arr, amrex::ParticleReal *val, const IntVect *is_nodal, int start_comp, int ncomp, int num_arrays)
Linearly interpolates the mesh data to the particle position from mesh data. This general form can ha...
Definition AMReX_TracerParticle_mod_K.H:100
__host__ __device__ void cic_interpolate_nd_mapped_z(const P &p, amrex::GpuArray< amrex::Real, 3 > const &plo, amrex::GpuArray< amrex::Real, 3 > const &dxi, const amrex::Array4< amrex::Real const > &data_arr, const amrex::Array4< amrex::Real const > &height_arr, amrex::ParticleReal *val, int M=3)
Linearly interpolates the mesh data to the particle position from node-centered data....
Definition AMReX_TracerParticle_mod_K.H:204
__host__ __device__ void linear_interpolate_to_particle_mapped(const P &p, const Array4< amrex::Real const > *data_arr, const amrex::Array4< amrex::Real const > &loc_arr, amrex::ParticleReal *val, const IntVect *is_nodal, int start_comp, int ncomp, int num_arrays)
Linearly interpolates the mesh data to the particle position on a general mapped grid....
Definition AMReX_TracerParticle_mod_K.H:571
__host__ __device__ void cic_interpolate_nd_mapped(const P &p, const amrex::Array4< amrex::Real const > &data_arr, const amrex::Array4< amrex::Real const > &loc_arr, amrex::ParticleReal *val, int M=3)
Linearly interpolates the mesh data to the particle position from node-centered data on a general map...
Definition AMReX_TracerParticle_mod_K.H:551
__host__ __device__ void cic_interpolate_cc_mapped_z(const P &p, amrex::GpuArray< amrex::Real, 3 > const &plo, amrex::GpuArray< amrex::Real, 3 > const &dxi, const amrex::Array4< amrex::Real const > &data_arr, const amrex::Array4< amrex::Real const > &height_arr, amrex::ParticleReal *val, int M=3)
Linearly interpolates the mesh data to the particle position from cell-centered data on a terrain-fit...
Definition AMReX_TracerParticle_mod_K.H:183
__host__ __device__ void cic_interpolate_cc(const P &p, amrex::GpuArray< amrex::Real, 3 > const &plo, amrex::GpuArray< amrex::Real, 3 > const &dxi, const amrex::Array4< amrex::Real const > &data_arr, amrex::ParticleReal *val, int M=3)
Definition AMReX_TracerParticle_mod_K.H:38
IntVectND< 3 > IntVect
Definition AMReX_BaseFwd.H:30
__host__ __device__ void mac_interpolate(const P &p, amrex::GpuArray< amrex::Real, 3 > const &plo, amrex::GpuArray< amrex::Real, 3 > const &dxi, amrex::GpuArray< amrex::Array4< amrex::Real const >, 3 > const &data_arr, amrex::ParticleReal *val)
Linearly interpolates the mesh data to the particle position from face-centered data....
Definition AMReX_TracerParticle_mod_K.H:75
__host__ __device__ void particle_interp_decomp(Array2D< Real, 1, 7, 1, 7 > &a, Array1D< int, 1, 7 > &ip, int neq)
Helper functions for 3D interpolation from values on nodes/vertices of arbitrary hexahedra to particl...
Definition AMReX_TracerParticle_mod_K.H:467
__host__ __device__ void particle_interp_solve(Array2D< Real, 1, 7, 1, 7 > &a, Array1D< Real, 1, 7 > &b, Array1D< int, 1, 7 > &ip, int neq)
Definition AMReX_TracerParticle_mod_K.H:509
__host__ __device__ void cic_interpolate_mapped_z(const P &p, amrex::GpuArray< amrex::Real, 3 > const &plo, amrex::GpuArray< amrex::Real, 3 > const &dxi, const amrex::Array4< amrex::Real const > &data_arr, const amrex::Array4< amrex::Real const > &height_arr, amrex::ParticleReal *val, int M=3)
Linearly interpolates the mesh data to the particle position from cell-centered data on a terrain-fit...
Definition AMReX_TracerParticle_mod_K.H:167
__host__ __device__ void cic_interpolate_nd(const P &p, amrex::GpuArray< amrex::Real, 3 > const &plo, amrex::GpuArray< amrex::Real, 3 > const &dxi, const amrex::Array4< amrex::Real const > &data_arr, amrex::ParticleReal *val, int M=3)
Linearly interpolates the mesh data to the particle position from node-centered data.
Definition AMReX_TracerParticle_mod_K.H:56
void Abort(const std::string &msg)
Print out message to cerr and exit via abort().
Definition AMReX.cpp:230
Definition AMReX_Array.H:193
Definition AMReX_Array.H:341
Definition AMReX_Array4.H:61
Definition AMReX_Array.H:34
__host__ __device__ const T * data() const noexcept
Definition AMReX_Array.H:66