00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef AMROC_LEVELTRANSFER_H
00010 #define AMROC_LEVELTRANSFER_H
00011
00019 #include <string>
00020 #include "AMRBase.h"
00021
00028 template <class VectorType, int dim>
00029 class LevelTransfer : public AMRBase<VectorType,dim> {
00030 typedef AMRBase<VectorType,dim> base;
00031 public:
00032 typedef typename base::vec_grid_data_type vec_grid_data_type;
00033
00034 LevelTransfer() : base(), adaptbndry_flag(DAGHAdaptBoundaryInterp) {}
00035
00036 virtual ~LevelTransfer() {}
00037
00038
00039
00040
00041 virtual void Prolong(vec_grid_data_type &source, const int& source_level,
00042 vec_grid_data_type &target, const int& target_level,
00043 const BBox &bb) = 0;
00044 virtual void Restrict(vec_grid_data_type &source, const int& source_level,
00045 vec_grid_data_type &target, const int& target_level,
00046 const BBox &bb) = 0;
00047
00048 virtual void SetAdaptBndry(vec_grid_data_type &target, vec_grid_data_type &target_help_previous,
00049 vec_grid_data_type &target_help_next, vec_grid_data_type &source_next, const double &frac,
00050 vec_grid_data_type &source_previous, const double &oneminusfrac,
00051 const int &target_level, const BBox &bb, const int side) {}
00052
00053
00054 inline void SetAdaptiveBoundaryType(const short abd) { adaptbndry_flag = abd; }
00055 inline const short& AdaptiveBoundaryType() const { return adaptbndry_flag; }
00056 inline bool UseAdaptBndry() const {
00057 return ((adaptbndry_flag == DAGHAdaptBoundaryUserDef) ||
00058 (adaptbndry_flag == DAGHAdaptBoundaryBoth));
00059 }
00060
00061 protected:
00062 short adaptbndry_flag;
00063 };
00064
00065
00066 #endif