forked from AMReX-Codes/amrex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAMReX_InterpBase.H
58 lines (47 loc) · 1.29 KB
/
AMReX_InterpBase.H
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef AMREX_INTERP_BASE_H_
#define AMREX_INTERP_BASE_H_
#include <AMReX_Config.H>
#include <AMReX_BCRec.H>
#include <AMReX_Box.H>
#include <AMReX_Vector.H>
namespace amrex {
class InterpBase;
class InterpolaterBoxCoarsener final
: public BoxConverter
{
public:
InterpolaterBoxCoarsener (InterpBase* mapper_, const IntVect& ratio_);
virtual ~InterpolaterBoxCoarsener ();
virtual Box doit (const Box& fine) const;
virtual BoxConverter* clone () const;
private:
InterpBase* mapper;
IntVect ratio;
};
class InterpBase
{
public:
virtual ~InterpBase () = default;
/**
* \brief Returns coarsened box given fine box and refinement ratio.
* This is a pure virtual function and hence MUST
* be implemented by derived classes.
*
* \param fine
* \param ratio
*/
virtual Box CoarseBox (const Box& fine, int ratio) = 0;
/**
* \brief Returns coarsened box given fine box and refinement ratio.
* This is a pure virtual function and hence MUST
* be implemented by derived classes.
*
* \param fine
* \param ratio
*/
virtual Box CoarseBox (const Box& fine, const IntVect& ratio) = 0;
InterpolaterBoxCoarsener BoxCoarsener (const IntVect& ratio);
static Vector<int> GetBCArray (const Vector<BCRec>& bcr);
};
}
#endif