Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

LevelOp.H

Go to the documentation of this file.
00001 /* _______              __
00002   / ___/ /  ___  __ _  / /  ___
00003  / /__/ _ \/ _ \/  ' \/ _ \/ _ \
00004  \___/_//_/\___/_/_/_/_.__/\___/ 
00005 */
00006 //
00007 // This software is copyright (C) by the Lawrence Berkeley
00008 // National Laboratory.  Permission is granted to reproduce
00009 // this software for non-commercial purposes provided that
00010 // this notice is left intact.
00011 // 
00012 // It is acknowledged that the U.S. Government has rights to
00013 // this software under Contract DE-AC03-765F00098 between
00014 // the U.S.  Department of Energy and the University of
00015 // California.
00016 //
00017 // This software is provided as a professional and academic
00018 // contribution for joint exchange. Thus it is experimental,
00019 // is provided ``as is'', with no warranties of any kind
00020 // whatsoever, no support, no promise of updates, or printed
00021 // documentation. By using this software, you acknowledge
00022 // that the Lawrence Berkeley National Laboratory and
00023 // Regents of the University of California shall have no
00024 // liability with respect to the infringement of other
00025 // copyrights by any part of this software.
00026 //
00027 // DTGraves, Mon, July 26, 1999
00028 
00029 #ifndef _LevelOP_H_
00030 #define _LevelOP_H_
00031 
00032 #include <iostream>
00033 #include <math.h>
00034 #include <assert.h>
00035 #include <stdlib.h>
00036 #include <REAL.H>
00037 #include <IntVect.H>
00038 #include <Box.H>
00039 #include <DisjointBoxLayout.H>
00040 #include <LevelData.H>
00041 #include <FArrayBox.H>
00042 #include <LoHiSide.H>
00043 #include <ProblemDomain.H>
00044 
00046 
00051 class LevelOp
00052 {
00053 
00054 public:
00055 
00057 
00059 
00063   virtual
00064   void CFInterp(
00065                 LevelData<FArrayBox>& a_phi,
00066                 const LevelData<FArrayBox>& a_phiCoarse
00067                 ) = 0;
00068 
00070 
00073   virtual
00074   void homogeneousCFInterp(LevelData<FArrayBox>& a_phi) = 0;
00075 
00077   LevelOp() {};
00078 
00080 
00083   virtual LevelOp* new_levelop() const = 0;
00084 
00086   virtual bool isDefined() const = 0;
00087 
00089 
00093   virtual void define(
00094                       const DisjointBoxLayout& Ba,
00095                       const DisjointBoxLayout* base_ba,
00096                       Real  DxLevel, 
00097                       int refratio,
00098                       const Box& domf,
00099                       bool homogeneousOnly,
00100                       int ncomp = 1) = 0;
00101 
00103 
00107   virtual void define(
00108                       const DisjointBoxLayout& Ba,
00109                       const DisjointBoxLayout* base_ba,
00110                       Real  DxLevel, 
00111                       int refratio,
00112                       const ProblemDomain& domf,
00113                       bool homogeneousOnly,
00114                       int ncomp = 1) = 0;
00115 
00116 
00118 
00124   virtual void define(
00125                       const LevelOp* opfine,
00126                       int reftofine) = 0;
00127 
00129   virtual ~LevelOp(){};
00130 
00132 
00138   virtual void smooth(
00139                       LevelData<FArrayBox>& phi,
00140                       const LevelData<FArrayBox>& rhs
00141                       ) = 0;
00142 
00143   
00145 
00148   virtual void levelPreconditioner(
00149                                    LevelData<FArrayBox>& a_phihat,
00150                                    const LevelData<FArrayBox>& a_rhshat
00151                                    ) = 0;
00152 
00153 
00155 
00159   virtual void applyOpI(
00160                         LevelData<FArrayBox>& phi,
00161                         const LevelData<FArrayBox>* phiCoarse,
00162                         LevelData<FArrayBox>& LOfPhi
00163                         ) = 0;
00164 
00166 
00170   virtual void applyOpIcfHphys(
00171                                LevelData<FArrayBox>& phi,
00172                                const LevelData<FArrayBox>* phiCoarse,
00173                                LevelData<FArrayBox>& LOfPhi
00174                                )  = 0;
00175 
00177 
00181   virtual void applyOpHcfIphys(
00182                                LevelData<FArrayBox>& phi,
00183                                LevelData<FArrayBox>& LOfPhi
00184                                ) = 0;
00185 
00187 
00191   virtual void applyOpH(
00192                         LevelData<FArrayBox>& phi,
00193                         LevelData<FArrayBox>& LOfPhi
00194                         ) = 0;
00195 
00197 
00200   virtual void bottomSmoother(
00201                               LevelData<FArrayBox>& phi,
00202                               const LevelData<FArrayBox>& rhs) = 0;
00203 
00205 
00211   virtual void 
00212   getFlux(
00213           FArrayBox& flux, 
00214           const FArrayBox& data, 
00215           const DataIndex& a_datInd,
00216           int dir) = 0;
00217 
00218 };
00219 
00220 
00221 
00222 
00223 #endif
00224 

Generated on Tue Jul 2 10:42:20 2002 for Chombo by doxygen1.2.16