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

NodeMaskLevelOp.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 // adapted from LevelOp by DTGraves, Mon, July 26, 1999
00029 // NodeLevelOp by petermc, Tue, Nov 28, 2000
00030 // petermc, 22 Jun 2001 for mask
00031 
00032 #ifndef NODEMASKLEVELOP_H
00033 #define NODEMASKLEVELOP_H
00034 
00035 #include <iostream>
00036 #include <math.h>
00037 #include <assert.h>
00038 #include <stdlib.h>
00039 #include "REAL.H"
00040 #include "ProblemDomain.H"
00041 #include "DisjointBoxLayout.H"
00042 #include "LevelData.H"
00043 #include "NodeFArrayBox.H"
00044 #include "IntVectSet.H"
00045 
00047 
00048 class NodeMaskLevelOp
00054 {
00055 
00056 public:
00057 
00059 
00061 
00063   NodeMaskLevelOp() {};
00064 
00066 
00068   // "= 0" is a C++ism meaning that this is a _pure_ virtual function.
00069   virtual NodeMaskLevelOp* new_levelop() const = 0;
00070     
00072 
00074   virtual ~NodeMaskLevelOp(){};
00075 
00077 
00090   virtual void define(
00091                       const DisjointBoxLayout& a_grids,
00092                       const DisjointBoxLayout* a_gridsCoarsePtr,
00093                       Real                     a_dx,
00094                       int                      a_refToCoarse,
00095                       const ProblemDomain&     a_domain,
00096                       bool                     a_homogeneousOnly = false,
00097                       int                      a_ncomp = 1
00098                       ) = 0;
00099   
00100   virtual void define(
00101                       const DisjointBoxLayout& a_grids,
00102                       const DisjointBoxLayout* a_gridsCoarsePtr,
00103                       Real                     a_dx,
00104                       int                      a_refToCoarse,
00105                       const Box&               a_domain,
00106                       bool                     a_homogeneousOnly = false,
00107                       int                      a_ncomp = 1
00108                       ) = 0;
00109   
00110 
00112 
00120   virtual void define(
00121                       const NodeMaskLevelOp* a_opfine,
00122                       int                    a_refToFine
00123                       ) = 0;
00124 
00125               
00127 
00129 
00132   virtual bool isDefined() const = 0;
00133 
00135 
00137 
00146   virtual void CFInterp(LevelData<NodeFArrayBox>&       a_phi,
00147                         const LevelData<NodeFArrayBox>& a_phiCoarse,
00148                         bool                            a_inhomogeneous
00149                         ) = 0;
00150 
00152 
00158   virtual void homogeneousCFInterp(
00159                                    LevelData<NodeFArrayBox>& a_phi
00160                                    ) = 0;
00161   
00163 
00172   virtual void smooth(
00173                       LevelData<NodeFArrayBox>&       a_phi,
00174                       const LevelData<NodeFArrayBox>& a_rhs
00175                       ) = 0;
00176   
00178 
00192   virtual void residualI(LevelData<NodeFArrayBox>&       a_resid,
00193                          LevelData<NodeFArrayBox>&       a_phi,
00194                          const LevelData<NodeFArrayBox>* a_phiCoarsePtr,
00195                          const LevelData<NodeFArrayBox>& a_rhs) = 0;
00196 
00198 
00210   virtual void residualH(LevelData<NodeFArrayBox>&       a_resid,
00211                          LevelData<NodeFArrayBox>&       a_phi,
00212                          const LevelData<NodeFArrayBox>& a_rhs) = 0;
00213 
00215 
00229   virtual void residualIcfHphys(LevelData<NodeFArrayBox>&       a_resid,
00230                                 LevelData<NodeFArrayBox>&       a_phi,
00231                                 const LevelData<NodeFArrayBox>* a_phiCoarsePtr,
00232                                 const LevelData<NodeFArrayBox>& a_rhs) = 0;
00233 
00235 
00247   virtual void residualHcfIphys(LevelData<NodeFArrayBox>&       a_resid,
00248                                 LevelData<NodeFArrayBox>&       a_phi,
00249                                 const LevelData<NodeFArrayBox>& a_rhs) = 0;
00250 
00252 
00263   virtual void applyOpI(
00264                         LevelData<NodeFArrayBox>&       a_LofPhi,
00265                         LevelData<NodeFArrayBox>&       a_phi,
00266                         const LevelData<NodeFArrayBox>* a_phiCoarsePtr
00267                         ) = 0;
00268 
00270 
00280   virtual void applyOpH(
00281                         LevelData<NodeFArrayBox>& a_LofPhi,
00282                         LevelData<NodeFArrayBox>& a_phi
00283                         ) = 0;
00284 
00286 
00297   virtual void applyOpIcfHphys(
00298                                LevelData<NodeFArrayBox>&       a_LofPhi,
00299                                LevelData<NodeFArrayBox>&       a_phi,
00300                                const LevelData<NodeFArrayBox>* a_phiCoarsePtr
00301                                )  = 0;
00302 
00304 
00314   virtual void applyOpHcfIphys(LevelData<NodeFArrayBox>& a_LofPhi,
00315                                LevelData<NodeFArrayBox>& a_phi
00316                                ) = 0;
00317   
00319 
00326   virtual void levelPreconditioner(
00327                                    LevelData<NodeFArrayBox>&       a_phihat,
00328                                    const LevelData<NodeFArrayBox>& a_rhshat
00329                                    ) = 0;
00330 
00331 
00333 
00339   virtual void bottomSmoother(
00340                               LevelData<NodeFArrayBox>&       a_phi,
00341                               const LevelData<NodeFArrayBox>& a_rhs) = 0;
00342 
00343   // these have to be public because smoother needs them for norms
00344 
00345   // physical domain of current level
00346   ProblemDomain m_domain;
00347 
00348   // exterior boundary nodes
00349   LayoutData< Vector<IntVectSet> > m_IVSVext;
00350 };
00351 
00352 #endif

Generated on Tue Apr 15 18:31:55 2003 for AMRNodeElliptic by doxygen1.2.16