Block-Structured AMR Software Framework
AMReX_InterpBase.H
Go to the documentation of this file.
1 #ifndef AMREX_INTERP_BASE_H_
2 #define AMREX_INTERP_BASE_H_
3 #include <AMReX_Config.H>
4 
5 #include <AMReX_BCRec.H>
6 #include <AMReX_Box.H>
7 #include <AMReX_Vector.H>
8 
9 namespace amrex {
10 
11 class InterpBase;
12 
14  : public BoxConverter
15 {
16 public:
17  InterpolaterBoxCoarsener (InterpBase* mapper_, const IntVect& ratio_);
18  [[nodiscard]] Box doit (const Box& fine) const override;
19  [[nodiscard]] BoxConverter* clone () const override;
20 private:
23 };
24 
26 {
27 public:
28  InterpBase () = default;
29  virtual ~InterpBase () = default;
30  InterpBase (InterpBase const&) noexcept = default;
31  InterpBase (InterpBase &&) noexcept = default;
32  InterpBase& operator= (InterpBase const&) noexcept = default;
33  InterpBase& operator= (InterpBase &&) noexcept = default;
34 
43  virtual Box CoarseBox (const Box& fine, int ratio) = 0;
44 
53  virtual Box CoarseBox (const Box& fine, const IntVect& ratio) = 0;
54 
56 
57  static Vector<int> GetBCArray (const Vector<BCRec>& bcr);
58 };
59 
60 }
61 
62 #endif
Array4< Real > fine
Definition: AMReX_InterpFaceRegister.cpp:90
Boundary Condition Records. Necessary information and functions for computing boundary conditions.
Definition: AMReX_BCRec.H:17
Definition: AMReX_Box.H:1193
Definition: AMReX_InterpBase.H:26
InterpBase(InterpBase const &) noexcept=default
InterpBase(InterpBase &&) noexcept=default
virtual Box CoarseBox(const Box &fine, int ratio)=0
Returns coarsened box given fine box and refinement ratio. This is a pure virtual function and hence ...
virtual ~InterpBase()=default
InterpolaterBoxCoarsener BoxCoarsener(const IntVect &ratio)
Definition: AMReX_InterpBase.cpp:22
static Vector< int > GetBCArray(const Vector< BCRec > &bcr)
Definition: AMReX_InterpBase.cpp:28
InterpBase()=default
Definition: AMReX_InterpBase.H:15
IntVect ratio
Definition: AMReX_InterpBase.H:22
Box doit(const Box &fine) const override
Definition: AMReX_InterpBase.cpp:10
BoxConverter * clone() const override
Definition: AMReX_InterpBase.cpp:16
InterpBase * mapper
Definition: AMReX_InterpBase.H:21
InterpolaterBoxCoarsener(InterpBase *mapper_, const IntVect &ratio_)
Definition: AMReX_InterpBase.cpp:5
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