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

NodeLevelOp.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 
00028 // NodeLevelOp.H
00029 // adapted from LevelOp by DTGraves, Mon, July 26, 1999
00030 // petermc, Tue, Nov 28, 2000
00031 #ifndef NODELEVELOP_H
00032 #define NODELEVELOP_H
00033 
00034 #include <iostream>
00035 #include <math.h>
00036 #include <assert.h>
00037 #include <stdlib.h>
00038 #include "REAL.H"
00039 #include "ProblemDomain.H"
00040 #include "DisjointBoxLayout.H"
00041 #include "LevelData.H"
00042 #include "NodeFArrayBox.H"
00043 #include "IntVectSet.H"
00044 
00046 
00047 class NodeLevelOp
00053 {
00054 
00055 public:
00056 
00061 
00063 
00065   NodeLevelOp() {};
00066 
00068 
00070   // "= 0" is a C++ism meaning that this is a _pure_ virtual function:
00071   // every derived class must override it.
00072   virtual NodeLevelOp* new_levelop() const = 0;
00073     
00075 
00077   virtual ~NodeLevelOp(){};
00078 
00080 
00084   virtual void define(
00085                       const DisjointBoxLayout& a_grids,
00087                       const DisjointBoxLayout* a_gridsCoarsePtr,
00089                       Real                     a_dx,
00091                       int                      a_refToCoarse,
00093                       const ProblemDomain&     a_domain,
00095                       bool                     a_homogeneousOnly = false,
00097                       int                      a_ncomp = 1,
00099                       bool                     a_verbose = false
00100                       ) = 0;
00101 
00103 
00107   virtual void define(
00108                       const DisjointBoxLayout& a_grids,
00110                       const DisjointBoxLayout* a_gridsCoarsePtr,
00112                       Real                     a_dx,
00114                       int                      a_refToCoarse,
00116                       const Box&               a_domain,
00118                       bool                     a_homogeneousOnly = false,
00120                       int                      a_ncomp = 1,
00122                       bool                     a_verbose = false
00123                       ) = 0;
00124 
00126 
00130   virtual void define(
00131                       const NodeLevelOp* a_opfine,
00133                       int                a_refToFine
00134                       ) = 0;
00135 
00142 
00144 
00147   virtual bool isDefined() const = 0;
00148 
00155 
00158   virtual void setVerbose( bool a_verbose ){ m_verbose = a_verbose ; } ;
00159 
00166 
00168 
00172   virtual void CFInterp(
00173                         LevelData<NodeFArrayBox>&       a_phi,
00175                         const LevelData<NodeFArrayBox>& a_phiCoarse,
00177                         bool                            a_inhomogeneous
00178                         ) = 0;
00179 
00181 
00184   virtual void homogeneousCFInterp(
00185                                    LevelData<NodeFArrayBox>& a_phi
00186                                    ) = 0;
00187   
00194 
00196 
00205   virtual void residualI(
00206                          LevelData<NodeFArrayBox>&       a_resid,
00208                          LevelData<NodeFArrayBox>&       a_phi,
00210                          const LevelData<NodeFArrayBox>* a_phiCoarsePtr,
00212                          const LevelData<NodeFArrayBox>& a_rhs) = 0;
00213 
00214 
00216 
00225   virtual void residualH(
00226                          LevelData<NodeFArrayBox>&       a_resid,
00228                          LevelData<NodeFArrayBox>&       a_phi,
00230                          const LevelData<NodeFArrayBox>& a_rhs) = 0;
00231 
00232 
00234 
00243   virtual void residualIcfHphys(
00244                                 LevelData<NodeFArrayBox>&       a_resid,
00246                                 LevelData<NodeFArrayBox>&       a_phi,
00248                                 const LevelData<NodeFArrayBox>* a_phiCoarsePtr,
00250                                 const LevelData<NodeFArrayBox>& a_rhs) = 0;
00251 
00252 
00254 
00263   virtual void residualHcfIphys(
00264                                 LevelData<NodeFArrayBox>&       a_resid,
00266                                 LevelData<NodeFArrayBox>&       a_phi,
00268                                 const LevelData<NodeFArrayBox>& a_rhs) = 0;
00269 
00276 
00278 
00286   virtual void applyOpI(
00287                         LevelData<NodeFArrayBox>&       a_LofPhi,
00289                         LevelData<NodeFArrayBox>&       a_phi,
00291                         const LevelData<NodeFArrayBox>* a_phiCoarsePtr
00292                         ) = 0;
00293 
00295 
00303   virtual void applyOpH(
00304                         LevelData<NodeFArrayBox>&       a_LofPhi,
00306                         LevelData<NodeFArrayBox>&       a_phi
00307                         ) = 0;
00308 
00310 
00318   virtual void applyOpIcfHphys(
00319                                LevelData<NodeFArrayBox>&       a_LofPhi,
00321                                LevelData<NodeFArrayBox>&       a_phi,
00323                                const LevelData<NodeFArrayBox>* a_phiCoarsePtr
00324                                ) = 0;
00325 
00327 
00335   virtual void applyOpHcfIphys(
00336                                LevelData<NodeFArrayBox>&       a_LofPhi,
00338                                LevelData<NodeFArrayBox>&       a_phi
00339                                ) = 0;
00340 
00347 
00349 
00357   virtual void gradient(
00358                         LevelData<NodeFArrayBox>&       a_gradPhi,
00360                         LevelData<NodeFArrayBox>&       a_phi,
00362                         const LevelData<NodeFArrayBox>* a_phiCoarsePtr
00363                         ) = 0;
00364 
00371 
00373 
00378   virtual void smooth(
00379                       LevelData<NodeFArrayBox>&       a_phi,
00381                       const LevelData<NodeFArrayBox>& a_rhs
00382                       ) = 0;
00383   
00385 
00389   virtual void levelPreconditioner(
00390                                    LevelData<NodeFArrayBox>&       a_phihat,
00392                                    const LevelData<NodeFArrayBox>& a_rhshat
00393                                    ) = 0;
00394 
00396 
00398   virtual void bottomSmoother(
00399                               LevelData<NodeFArrayBox>&       a_phi,
00401                               const LevelData<NodeFArrayBox>& a_rhs) = 0;
00402 
00405   // these have to be public because smoother needs them for norms
00406 
00409   ProblemDomain m_domain;
00410 
00413   LayoutData< Vector<IntVectSet> > m_IVSVext;
00414 
00417   bool m_verbose;
00418 };
00419 
00420 #endif

Generated on Fri Jul 2 17:53:42 2004 for Chombo by doxygen 1.3.2