OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
AmrInterpolater.h
Go to the documentation of this file.
1 #ifndef AMR_INTERPOLATER_H
2 #define AMR_INTERPOLATER_H
3 
4 #include "Amr/AmrDefs.h"
5 
7 template <class Level>
9 
10 public:
11  typedef typename Level::go_t go_t;
12  typedef typename Level::lo_t lo_t;
13  typedef typename Level::scalar_t scalar_t;
14  typedef typename Level::umap_t umap_t;
15  typedef typename Level::basefab_t basefab_t;
17 
18 public:
19 
23  AmrInterpolater(lo_t nPoints) : nPoints_m(nPoints) { }
24 
28  const lo_t& getNumberOfPoints() const {
29  return nPoints_m;
30  }
31 
41  virtual void stencil(const AmrIntVect_t& iv,
42  const basefab_t& fab,
43  umap_t& map,
44  const scalar_t& scale,
45  Level* mglevel) = 0;
46 
63  virtual void coarse(const AmrIntVect_t& iv,
64  umap_t& map,
65  const scalar_t& scale,
66  lo_t dir, lo_t shift, const basefab_t& rfab,
67  const AmrIntVect_t& riv,
68  Level* mglevel) = 0;
69 
86  virtual void fine(const AmrIntVect_t& iv,
87  umap_t& map,
88  const scalar_t& scale,
89  lo_t dir, lo_t shift, const basefab_t& fab,
90  Level* mglevel)
91  { };
92 
108  virtual void fine(const AmrIntVect_t& iv,
109  umap_t& map,
110  const scalar_t& scale,
111  lo_t dir, lo_t shift,
112  Level* mglevel)
113  { };
114 
115 protected:
116  const lo_t nPoints_m;
117 };
118 
119 #endif
virtual void coarse(const AmrIntVect_t &iv, umap_t &map, const scalar_t &scale, lo_t dir, lo_t shift, const basefab_t &rfab, const AmrIntVect_t &riv, Level *mglevel)=0
Level::basefab_t basefab_t
const lo_t nPoints_m
Number of points used for interpolation.
&lt; Abstract base class for all coarse to fine cell interpolaters
amrex::IntVect AmrIntVect_t
Definition: AmrDefs.h:28
Level::scalar_t scalar_t
virtual void stencil(const AmrIntVect_t &iv, const basefab_t &fab, umap_t &map, const scalar_t &scale, Level *mglevel)=0
amr::AmrIntVect_t AmrIntVect_t
Level::umap_t umap_t
Level::go_t go_t
Level::lo_t lo_t
AmrInterpolater(lo_t nPoints)
const lo_t & getNumberOfPoints() const
virtual void fine(const AmrIntVect_t &iv, umap_t &map, const scalar_t &scale, lo_t dir, lo_t shift, Level *mglevel)
double scalar_t
virtual void fine(const AmrIntVect_t &iv, umap_t &map, const scalar_t &scale, lo_t dir, lo_t shift, const basefab_t &fab, Level *mglevel)