aboutsummaryrefslogtreecommitdiff
path: root/Source/Parallelization/WarpXComm.H
blob: 81f00088edbf7593392076cd1f187c5c5fc9a047 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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_