aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianYeeAlgorithm.H
diff options
context:
space:
mode:
Diffstat (limited to 'Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianYeeAlgorithm.H')
-rw-r--r--Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianYeeAlgorithm.H10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianYeeAlgorithm.H b/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianYeeAlgorithm.H
index 305fb3507..2ec6a3d22 100644
--- a/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianYeeAlgorithm.H
+++ b/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianYeeAlgorithm.H
@@ -9,6 +9,7 @@
#define WARPX_FINITE_DIFFERENCE_ALGORITHM_CARTESIAN_YEE_H_
#include "Utils/WarpXConst.H"
+#include "FieldAccessorFunctors.H"
#include <AMReX.H>
#include <AMReX_REAL.H>
@@ -68,9 +69,10 @@ struct CartesianYeeAlgorithm {
/**
* Perform derivative along x on a nodal grid, from a cell-centered field `F`*/
+ template< typename T_Field>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real DownwardDx (
- amrex::Array4<amrex::Real> const& F,
+ T_Field const& F,
amrex::Real const * const coefs_x, int const /*n_coefs_x*/,
int const i, int const j, int const k, int const ncomp=0 ) {
@@ -103,9 +105,10 @@ struct CartesianYeeAlgorithm {
/**
* Perform derivative along y on a nodal grid, from a cell-centered field `F`*/
+ template< typename T_Field>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real DownwardDy (
- amrex::Array4<amrex::Real> const& F,
+ T_Field const& F,
amrex::Real const * const coefs_y, int const n_coefs_y,
int const i, int const j, int const k, int const ncomp=0 ) {
@@ -143,9 +146,10 @@ struct CartesianYeeAlgorithm {
/**
* Perform derivative along z on a nodal grid, from a cell-centered field `F`*/
+ template< typename T_Field>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
static amrex::Real DownwardDz (
- amrex::Array4<amrex::Real> const& F,
+ T_Field const& F,
amrex::Real const * const coefs_z, int const /*n_coefs_z*/,
int const i, int const j, int const k, int const ncomp=0 ) {