Block-Structured AMR Software Framework
AMReX_MFInterpolater.H
Go to the documentation of this file.
1 #ifndef AMREX_MF_INTERPOLATER_H_
2 #define AMREX_MF_INTERPOLATER_H_
3 #include <AMReX_Config.H>
4 
5 #include <AMReX_Extension.H>
6 #include <AMReX_InterpBase.H>
7 
8 namespace amrex {
9 
10 class MultiFab;
11 class Geometry;
12 
14  : public InterpBase
15 {
16 public:
17  virtual void interp (MultiFab const& crsemf, int ccomp, MultiFab& finemf, int fcomp, int ncomp,
18  IntVect const& ng, Geometry const& cgeom, Geometry const& fgeom,
19  Box const& dest_domain, IntVect const& ratio,
20  Vector<BCRec> const& bcs, int bcscomp) = 0;
21 };
22 
26 class MFPCInterp final
27  : public MFInterpolater
28 {
29 public:
30  Box CoarseBox (Box const& fine, int ratio) override;
31  Box CoarseBox (Box const& fine, IntVect const& ratio) override;
32 
33  void interp (MultiFab const& crsemf, int ccomp, MultiFab& finemf, int fcomp, int ncomp,
34  IntVect const& ng, Geometry const& cgeom, Geometry const& fgeom,
35  Box const& dest_domain, IntVect const& ratio,
36  Vector<BCRec> const& bcs, int bcscomp) override;
37 };
38 
50  : public MFInterpolater
51 {
52 public:
53  explicit MFCellConsLinInterp (bool do_linear_limiting_)
54  : do_linear_limiting(do_linear_limiting_) {}
55 
56  Box CoarseBox (Box const& fine, int ratio) override;
57  Box CoarseBox (Box const& fine, IntVect const& ratio) override;
58 
59  void interp (MultiFab const& crsemf, int ccomp, MultiFab& finemf, int fcomp, int ncomp,
60  IntVect const& ng, Geometry const& cgeom, Geometry const& fgeom,
61  Box const& dest_domain, IntVect const& ratio,
62  Vector<BCRec> const& bcs, int bcomp) override;
63 protected:
64  bool do_linear_limiting = true;
65 };
66 
79  : public MFInterpolater
80 {
81 public:
82  Box CoarseBox (Box const& fine, int ratio) override;
83  Box CoarseBox (Box const& fine, IntVect const& ratio) override;
84 
85  void interp (MultiFab const& crsemf, int ccomp, MultiFab& finemf, int fcomp, int ncomp,
86  IntVect const& ng, Geometry const& cgeom, Geometry const& fgeom,
87  Box const& dest_domain, IntVect const& ratio,
88  Vector<BCRec> const& bcs, int bcomp) override;
89 };
90 
94 class MFCellBilinear final
95  : public MFInterpolater
96 {
97 public:
98  Box CoarseBox (Box const& fine, int ratio) override;
99  Box CoarseBox (Box const& fine, IntVect const& ratio) override;
100 
101  void interp (MultiFab const& crsemf, int ccomp, MultiFab& finemf, int fcomp, int ncomp,
102  IntVect const& ng, Geometry const& cgeom, Geometry const& fgeom,
103  Box const& dest_domain, IntVect const& ratio,
104  Vector<BCRec> const& bcs, int bcscomp) override;
105 };
106 
107 /*
108  * \brief [Bi|Tri] linear interpolation on nodal data
109  */
110 class MFNodeBilinear final
111  : public MFInterpolater
112 {
113 public:
114  Box CoarseBox (Box const& fine, int ratio) override;
115  Box CoarseBox (Box const& fine, IntVect const& ratio) override;
116 
117  void interp (MultiFab const& crsemf, int ccomp, MultiFab& finemf, int fcomp, int ncomp,
118  IntVect const& ng, Geometry const& cgeom, Geometry const& fgeom,
119  Box const& dest_domain, IntVect const& ratio,
120  Vector<BCRec> const& bcs, int bcscomp) override;
121 };
122 
129 
130 }
131 
132 #endif
#define AMREX_EXPORT
Definition: AMReX_Extension.H:191
Array4< Real > fine
Definition: AMReX_InterpFaceRegister.cpp:90
Rectangular problem domain geometry.
Definition: AMReX_Geometry.H:73
Definition: AMReX_InterpBase.H:26
[Bi|Tri]linear interpolation on cell centered data.
Definition: AMReX_MFInterpolater.H:96
Box CoarseBox(Box const &fine, int ratio) override
Returns coarsened box given fine box and refinement ratio. This is a pure virtual function and hence ...
Definition: AMReX_MFInterpolater.cpp:438
void interp(MultiFab const &crsemf, int ccomp, MultiFab &finemf, int fcomp, int ncomp, IntVect const &ng, Geometry const &cgeom, Geometry const &fgeom, Box const &dest_domain, IntVect const &ratio, Vector< BCRec > const &bcs, int bcscomp) override
Definition: AMReX_MFInterpolater.cpp:444
Linear conservative interpolation on cell centered data.
Definition: AMReX_MFInterpolater.H:51
void interp(MultiFab const &crsemf, int ccomp, MultiFab &finemf, int fcomp, int ncomp, IntVect const &ng, Geometry const &cgeom, Geometry const &fgeom, Box const &dest_domain, IntVect const &ratio, Vector< BCRec > const &bcs, int bcomp) override
Definition: AMReX_MFInterpolater.cpp:92
MFCellConsLinInterp(bool do_linear_limiting_)
Definition: AMReX_MFInterpolater.H:53
Box CoarseBox(Box const &fine, int ratio) override
Returns coarsened box given fine box and refinement ratio. This is a pure virtual function and hence ...
Definition: AMReX_MFInterpolater.cpp:84
bool do_linear_limiting
Definition: AMReX_MFInterpolater.H:64
Linear conservative interpolation on cell centered data.
Definition: AMReX_MFInterpolater.H:80
Box CoarseBox(Box const &fine, int ratio) override
Returns coarsened box given fine box and refinement ratio. This is a pure virtual function and hence ...
Definition: AMReX_MFInterpolater.cpp:325
void interp(MultiFab const &crsemf, int ccomp, MultiFab &finemf, int fcomp, int ncomp, IntVect const &ng, Geometry const &cgeom, Geometry const &fgeom, Box const &dest_domain, IntVect const &ratio, Vector< BCRec > const &bcs, int bcomp) override
Definition: AMReX_MFInterpolater.cpp:333
Definition: AMReX_MFInterpolater.H:15
virtual void interp(MultiFab const &crsemf, int ccomp, MultiFab &finemf, int fcomp, int ncomp, IntVect const &ng, Geometry const &cgeom, Geometry const &fgeom, Box const &dest_domain, IntVect const &ratio, Vector< BCRec > const &bcs, int bcscomp)=0
Definition: AMReX_MFInterpolater.H:112
void interp(MultiFab const &crsemf, int ccomp, MultiFab &finemf, int fcomp, int ncomp, IntVect const &ng, Geometry const &cgeom, Geometry const &fgeom, Box const &dest_domain, IntVect const &ratio, Vector< BCRec > const &bcs, int bcscomp) override
Definition: AMReX_MFInterpolater.cpp:499
Box CoarseBox(Box const &fine, int ratio) override
Returns coarsened box given fine box and refinement ratio. This is a pure virtual function and hence ...
Definition: AMReX_MFInterpolater.cpp:493
Piecewise constant interpolation on cell-centered data.
Definition: AMReX_MFInterpolater.H:28
void interp(MultiFab const &crsemf, int ccomp, MultiFab &finemf, int fcomp, int ncomp, IntVect const &ng, Geometry const &cgeom, Geometry const &fgeom, Box const &dest_domain, IntVect const &ratio, Vector< BCRec > const &bcs, int bcscomp) override
Definition: AMReX_MFInterpolater.cpp:32
Box CoarseBox(Box const &fine, int ratio) override
Returns coarsened box given fine box and refinement ratio. This is a pure virtual function and hence ...
Definition: AMReX_MFInterpolater.cpp:26
A collection (stored as an array) of FArrayBox objects.
Definition: AMReX_MultiFab.H:38
This class is a thin wrapper around std::vector. Unlike vector, Vector::operator[] provides bound che...
Definition: AMReX_Vector.H:27
Definition: AMReX_Amr.cpp:49
MFPCInterp mf_pc_interp
Definition: AMReX_MFInterpolater.cpp:10
MFCellBilinear mf_cell_bilinear_interp
Definition: AMReX_MFInterpolater.cpp:14
MFCellConsLinInterp mf_cell_cons_interp(false)
Definition: AMReX_MFInterpolater.H:124
MFCellConsLinMinmaxLimitInterp mf_linear_slope_minmax_interp
Definition: AMReX_MFInterpolater.cpp:13
MFCellConsLinInterp mf_lincc_interp(true)
Definition: AMReX_MFInterpolater.H:125
MFNodeBilinear mf_node_bilinear_interp
Definition: AMReX_MFInterpolater.cpp:17