vtf-logo

LevelTransfer.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // Copyright (C) 2002 Ralf Deiterding
00004 // Brandenburgische Universitaet Cottbus
00005 //
00006 // Copyright (C) 2003-2007 California Institute of Technology
00007 // Ralf Deiterding, ralf@amroc.net
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   // Abstract class interface
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, 
00049                              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) {}
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

Generated on Fri Aug 24 13:00:51 2007 for AMROC Fluid-solver Framework - by  doxygen 1.4.7