aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianNodalAlgorithm.H
diff options
context:
space:
mode:
authorGravatar Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com> 2021-05-19 13:32:08 -0700
committerGravatar GitHub <noreply@github.com> 2021-05-19 13:32:08 -0700
commit5208f4ea967212178a8524a531cf2329fcb33318 (patch)
tree06dc8cec72eaaf21f76964240900d946827b35be /Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianNodalAlgorithm.H
parentb6b0aa350ebc58ed32c92cfc7b873f95a10b0e26 (diff)
downloadWarpX-5208f4ea967212178a8524a531cf2329fcb33318.tar.gz
WarpX-5208f4ea967212178a8524a531cf2329fcb33318.tar.zst
WarpX-5208f4ea967212178a8524a531cf2329fcb33318.zip
Set guard cells for allocation using field solver stencil and particle shape factor (#1969)
Diffstat (limited to 'Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianNodalAlgorithm.H')
-rw-r--r--Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianNodalAlgorithm.H8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianNodalAlgorithm.H b/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianNodalAlgorithm.H
index 5bd7e88bc..68ecdfc60 100644
--- a/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianNodalAlgorithm.H
+++ b/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianNodalAlgorithm.H
@@ -56,6 +56,14 @@ struct CartesianNodalAlgorithm {
}
/**
+ * \brief Returns maximum number of guard cells required by the field-solve
+ */
+ static amrex::IntVect GetMaxGuardCell () {
+ // The nodal solver requires one guard cell in each dimension
+ return (amrex::IntVect(AMREX_D_DECL(1,1,1)));
+ }
+
+ /**
* Perform derivative along x
* (For a solver on a staggered grid, `UpwardDx` and `DownwardDx` take into
* account the staggering; but for `CartesianNodalAlgorithm`, they are equivalent) */