00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
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
00071
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
00406
00409 ProblemDomain m_domain;
00410
00413 LayoutData< Vector<IntVectSet> > m_IVSVext;
00414
00417 bool m_verbose;
00418 };
00419
00420 #endif