diff options
author | 2019-11-20 14:27:00 -0800 | |
---|---|---|
committer | 2019-11-20 14:27:00 -0800 | |
commit | dc091f87b0149d30bea844de925ed65d1a81bbf3 (patch) | |
tree | f93c1979aa62e989be6563f182e80cb52cf07840 /Source/Parallelization/WarpXComm.H | |
parent | 93b3c21262035097d7204521e0afd76b0e15db44 (diff) | |
parent | 13f3c87791971c4e72b567410f938a6dade47647 (diff) | |
download | WarpX-dc091f87b0149d30bea844de925ed65d1a81bbf3.tar.gz WarpX-dc091f87b0149d30bea844de925ed65d1a81bbf3.tar.zst WarpX-dc091f87b0149d30bea844de925ed65d1a81bbf3.zip |
Merge branch 'dev' of https://github.com/ECP-WarpX/WarpX into doNotDepositCurrent
Diffstat (limited to 'Source/Parallelization/WarpXComm.H')
-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_ |