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

AMRNodeSolverAlt.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 // AMRNodeSolverAlt.H
00029 // adapted from AMRSolver by DTGraves, Tues, July 6, 1999
00030 // AMRNodeSolver by petermc, 28 Nov 2000
00031 // AMRNodeSolverAlt by petermc, 22 May 2002
00032 
00033 #ifndef AMRNODESOLVERALT_H
00034 #define AMRNODESOLVERALT_H
00035 
00036 #include <cstdlib>
00037 #include <cmath>
00038 #include <iostream>
00039 #include <assert.h>
00040 #include "REAL.H"
00041 #include "ProblemDomain.H"
00042 #include "NodeFArrayBox.H"
00043 #include "Vector.H"
00044 #include "IntVectSet.H"
00045 #include "DisjointBoxLayout.H"
00046 #include "LevelData.H"
00047 #include "LevelNodeSolver.H"
00048 
00050 
00058 class AMRNodeSolverAlt
00059 {
00060 public:
00061 
00066 
00068 
00072   AMRNodeSolverAlt();
00073 
00075 
00078   AMRNodeSolverAlt(const Vector<DisjointBoxLayout>& a_gridsLevel,
00079                    const Vector<ProblemDomain>&     a_domainLevel,
00080                    const Vector<Real>&              a_dxLevel,
00081                    const Vector<int>&               a_refRatio,
00082                    int                              a_numLevels,
00083                    int                              a_lBase,
00084                    const NodeLevelOp* const         a_opin,
00085                    int                              a_minLength = 1);
00086 
00088 
00091   AMRNodeSolverAlt(const Vector<DisjointBoxLayout>& a_gridsLevel,
00092                    const Vector<Box>&               a_domainLevel,
00093                    const Vector<Real>&              a_dxLevel,
00094                    const Vector<int>&               a_refRatio,
00095                    int                              a_numLevels,
00096                    int                              a_lBase,
00097                    const NodeLevelOp* const         a_opin,
00098                    int                              a_minLength = 1);
00099 
00100 
00102 
00104   ~AMRNodeSolverAlt();
00105   
00107 
00113   void define(
00114               const Vector<DisjointBoxLayout>& a_gridsLevel,
00116               const Vector<ProblemDomain>&     a_domainLevel,
00118               const Vector<Real>&              a_dxLevel,
00120               const Vector<int>&               a_refRatio,
00122               int                              a_numLevels,
00124               int                              a_lBase,
00126               const NodeLevelOp* const         a_opin,
00128               int                              a_minLength = 1);
00129 
00130 
00132 
00138   void define(
00139               const Vector<DisjointBoxLayout>& a_gridsLevel,
00141               const Vector<Box>&               a_domainLevel,
00143               const Vector<Real>&              a_dxLevel,
00145               const Vector<int>&               a_refRatio,
00147               int                              a_numLevels,
00149               int                              a_lBase,
00151               const NodeLevelOp* const         a_opin,
00153               int                              a_minLength = 1);
00154 
00161 
00163 
00165   bool isDefined() const;
00166 
00173 
00175 
00178   void setNumSmoothUp(int a_numSmoothUp);
00179     
00181 
00184   void setNumSmoothDown(int a_numSmoothDown);
00185 
00187 
00189   void setTolerance(Real a_tolerance);
00190 
00192 
00195   void setBottomSmoothing(bool a_doBottomSmooth);
00196 
00198 
00201   void setMaxIter(int a_maxIter);
00202 
00204 
00206   void setVerbose(bool a_verbose);
00207 
00208 
00215 
00217 
00227   void solveAMR(
00228                 Vector<LevelData<NodeFArrayBox> *>&       a_phiLevel,
00230                 const Vector<LevelData<NodeFArrayBox> *>& a_rhsLevel);
00231 
00234 protected:
00235 
00238   void setDefaultValues();
00239   
00242   void clear();
00243 
00246   Real m_tolerance;
00247 
00250   int m_lBase;
00251 
00254   int m_numLevels; 
00255 
00258   int m_finestLevel;
00259 
00263   Vector<int> m_refRatio;
00264 
00267   Vector<Real> m_dxLevel;
00268 
00271   Vector<DisjointBoxLayout> m_gridsLevel;
00272 
00275   Vector<ProblemDomain> m_domainLevel;
00276 
00279   int m_numSmoothUp;
00280 
00283   int m_numSmoothDown;
00284 
00287   bool m_isDefined;
00288 
00291   Vector<LevelNodeSolver*> m_levelSolver;
00292 
00295   bool m_verbose;
00296   
00297 private:
00298   AMRNodeSolverAlt(const AMRNodeSolverAlt&);
00299   AMRNodeSolverAlt& operator=(const AMRNodeSolverAlt&);
00300 
00301 
00302 };
00303 #endif

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