aboutsummaryrefslogtreecommitdiff
path: root/Source/Utils/Interpolate.H
blob: a67ee191849fa1866c8f1c11ab8b4bd2b15baedd (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
34
35
36
37
38
39
40
#ifndef WARPX_INTERPOLATE_H_
#define WARPX_INTERPOLATE_H_

#include <AMReX_REAL.H>

#include <AMReX_BaseFwd.H>

#include <array>
#include <memory>

namespace Interpolate
{
    using namespace amrex;

    /** \brief Samples/Interpolates the coarse scalar multifab `F_cp` on the
     * fine grid associated with the fine multifab `F_fp`.
     */
    std::unique_ptr<MultiFab>
        getInterpolatedScalar(
            const MultiFab& F_cp, const MultiFab& F_fp,
            const DistributionMapping& dm, const int r_ratio,
            const Real* /*dx*/, const IntVect ngrow );

    /** \brief Samples/Interpolates the coarse vector multifab `F*_cp` on the
     * fine grid associated with the fine multifab `F*_fp`.
     */
    std::array<std::unique_ptr<MultiFab>, 3>
        getInterpolatedVector(
            const MultiFab* Fx_cp,
            const MultiFab* Fy_cp,
            const MultiFab* Fz_cp,
            const MultiFab* Fx_fp,
            const MultiFab* Fy_fp,
            const MultiFab* Fz_fp,
            const DistributionMapping& dm, const int r_ratio,
            const Real* dx, const IntVect ngrow );

}

#endif // WARPX_INTERPOLATE_H_