diff options
author | 2019-11-12 09:35:39 -0800 | |
---|---|---|
committer | 2019-11-12 09:36:41 -0800 | |
commit | ed0b522b9bdcceb70d19ac6ce4b59ef66c2b05e4 (patch) | |
tree | da79ebb058fba576bd253d6ed23887c72921a2e3 /Source/Parallelization | |
parent | 38ffda500337187c6f51422ccdd0ac208b483691 (diff) | |
download | WarpX-ed0b522b9bdcceb70d19ac6ce4b59ef66c2b05e4.tar.gz WarpX-ed0b522b9bdcceb70d19ac6ce4b59ef66c2b05e4.tar.zst WarpX-ed0b522b9bdcceb70d19ac6ce4b59ef66c2b05e4.zip |
Reuse existing interpolation functions
Diffstat (limited to 'Source/Parallelization')
-rw-r--r-- | Source/Parallelization/WarpXComm.H | 33 |
1 files changed, 33 insertions, 0 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_ |