aboutsummaryrefslogtreecommitdiff
path: root/Source/Parallelization
diff options
context:
space:
mode:
authorGravatar Remi Lehe <remi.lehe@normalesup.org> 2019-11-12 14:51:21 -0800
committerGravatar Remi Lehe <remi.lehe@normalesup.org> 2019-11-12 14:57:28 -0800
commitdac82e176df18b074725260dfc75ece142ddd7a9 (patch)
treeab751e57f2293f9f095016741e4f70022f6bb242 /Source/Parallelization
parentaea192d6ff5aabfedf09c9f139e831fb5d7bbdd6 (diff)
parent484c04d3d6d473e46cda3021e4895c73bbc16bb7 (diff)
downloadWarpX-dac82e176df18b074725260dfc75ece142ddd7a9.tar.gz
WarpX-dac82e176df18b074725260dfc75ece142ddd7a9.tar.zst
WarpX-dac82e176df18b074725260dfc75ece142ddd7a9.zip
Merge branch 'dev' into poisson
Diffstat (limited to 'Source/Parallelization')
-rw-r--r--Source/Parallelization/WarpXComm.H33
-rw-r--r--Source/Parallelization/WarpXComm.cpp2
2 files changed, 34 insertions, 1 deletions
diff --git a/Source/Parallelization/WarpXComm.H b/Source/Parallelization/WarpXComm.H
new file mode 100644
index 000000000..81f00088e
--- /dev/null
+++ b/Source/Parallelization/WarpXComm.H
@@ -0,0 +1,33 @@
+#ifndef WARPX_PARALLELIZATION_COMM_H_
+#define WARPX_PARALLELIZATION_COMM_H_
+
+#include <AMReX_MultiFab.H>
+
+/** \brief Fills the values of the current on the coarse patch by
+ * averaging the values of the current of the fine patch (on the same level).
+ * Also fills the guards of the coarse patch.
+ *
+ * \param[in] fine fine patches to interpolate from
+ * \param[out] coarse coarse patches to interpolate to
+ * \param[in] refinement_ratio integer ratio between the two
+ */
+void
+interpolateCurrentFineToCoarse (
+ std::array< amrex::MultiFab const *, 3 > const & fine,
+ std::array< amrex::MultiFab *, 3 > const & coarse,
+ int const refinement_ratio);
+
+/** \brief Fills the values of the charge density on the coarse patch by
+ * averaging the values of the charge density of the fine patch (on the same level).
+ *
+ * \param[in] fine fine patches to interpolate from
+ * \param[out] coarse coarse patches to interpolate to
+ * \param[in] refinement_ratio integer ratio between the two
+ */
+void
+interpolateDensityFineToCoarse (
+ const amrex::MultiFab& fine,
+ amrex::MultiFab& coarse,
+ int const refinement_ratio);
+
+#endif // WARPX_PARALLELIZATION_COMM_H_
diff --git a/Source/Parallelization/WarpXComm.cpp b/Source/Parallelization/WarpXComm.cpp
index 851b78748..b61ae4fc7 100644
--- a/Source/Parallelization/WarpXComm.cpp
+++ b/Source/Parallelization/WarpXComm.cpp
@@ -1,4 +1,4 @@
-#include "WarpXComm.H"
+#include <WarpXComm.H>
#include <WarpXComm_K.H>
#include <WarpX.H>
#include <WarpX_f.H>