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

basicVelBC.H

Go to the documentation of this file.
00001 /* _______              __
00002   / ___/ /  ___  __ _  / /  ___
00003  / /__/ _ \/ _ \/  ' \/ _ \/ _ \
00004  \___/_//_/\___/_/_/_/_.__/\___/ 
00005 */
00006 
00007 // basicVelBC.H
00008 
00009 //
00010 // This software is copyright (C) by the Lawrence Berkeley
00011 // National Laboratory.  Permission is granted to reproduce
00012 // this software for non-commercial purposes provided that
00013 // this notice is left intact.
00014 // 
00015 // It is acknowledged that the U.S. Government has rights to
00016 // this software under Contract DE-AC03-765F00098 between
00017 // the U.S.  Department of Energy and the University of
00018 // California.
00019 //
00020 // This software is provided as a professional and academic
00021 // contribution for joint exchange. Thus it is experimental,
00022 // is provided ``as is'', with no warranties of any kind
00023 // whatsoever, no support, no promise of updates, or printed
00024 // documentation. By using this software, you acknowledge
00025 // that the Lawrence Berkeley National Laboratory and
00026 // Regents of the University of California shall have no
00027 // liability with respect to the infringement of other
00028 // copyrights by any part of this software.
00029 //
00030 // Dan Martin, Fri, Jan 14, 2000
00031 
00032 #ifndef _basicVelBC_H_
00033 #define _basicVelBC_H_
00034 
00035 #include "FArrayBox.H"
00036 #include "FluxBox.H"
00037 #include "REAL.H"
00038 #include "LevelData.H"
00039 #include "GhostBC.H"
00040 #include "ProblemDomain.H"
00041 
00042 
00044 class basicVelBC
00047 {
00048 public:
00049   
00051   basicVelBC();
00052   
00054   virtual ~basicVelBC();
00055 
00057   virtual void setBCType(const DomainGhostBC& a_ghostBC, int a_component);
00058 
00059 
00061   basicVelBC(const int a_component);
00062   
00064   virtual void applyBCs(FArrayBox& a_state, const ProblemDomain& a_domain,
00065                         const Real a_dx) const;
00066 
00068   virtual void applyBCs(FArrayBox& a_state, const Box& a_domain,
00069                         const Real a_dx) const;
00070 
00072   virtual void applyBCs(LevelData<FArrayBox>& a_stateMF, 
00073                         const ProblemDomain& a_domain, 
00074                         const Real a_dx) const;
00075 
00077   virtual void applyBCs(LevelData<FArrayBox>& a_stateMF, 
00078                         const Box& a_domain, const Real a_dx) const;
00079 
00081   virtual void applyBCs(FArrayBox& a_state, 
00082                         const ProblemDomain& a_domain,
00083                         const Real a_dx, int a_comp) const;
00084 
00086   virtual void applyBCs(FArrayBox& a_state, const Box& a_domain,
00087                         const Real a_dx, int a_comp) const;
00088 
00090   const DomainGhostBC& DomGhostBC(const int dir) const;
00091 
00092 protected:
00094   Tuple<DomainGhostBC*, SpaceDim> m_componentBC;
00095 
00096 
00097 private:
00098 
00099 };
00100 
00101 
00102 
00104 class basicEdgeVelBC
00107 {
00108 public:
00109   
00111   basicEdgeVelBC();
00112   
00114   virtual ~basicEdgeVelBC();
00115 
00117   virtual void setBCType(const DomainGhostBC& a_ghostBC, int a_component);
00118 
00119 
00121   basicEdgeVelBC(const int a_component);
00122   
00124   virtual void applyBCs(FluxBox& a_state, 
00125                         const ProblemDomain& a_domain,
00126                         const Real a_dx) const;
00127 
00129   virtual void applyBCs(FluxBox& a_state, const Box& a_domain,
00130                         const Real a_dx) const;
00131 
00133   virtual void applyBCs(FArrayBox& a_state, const ProblemDomain& a_domain,
00134                         const Real a_dx) const;
00135 
00137   virtual void applyBCs(FArrayBox& a_state, const Box& a_domain,
00138                         const Real a_dx) const;
00139 
00140 
00142   virtual void applyBCs(LevelData<FluxBox>& a_stateMF, 
00143                         const ProblemDomain& a_domain, 
00144                         const Real a_dx) const;
00145 
00146 
00148   virtual void applyBCs(LevelData<FluxBox>& a_stateMF, 
00149                         const Box& a_domain, const Real a_dx) const;
00150   
00151 
00153   virtual void applyBCs(FluxBox& a_state, 
00154                         const ProblemDomain& a_domain,
00155                         const Real a_dx, int a_comp) const;
00156 
00158   virtual void applyBCs(FluxBox& a_state, const Box& a_domain,
00159                         const Real a_dx, int a_comp) const;
00160 
00161 
00163   virtual void applyBCs(FArrayBox& a_state, 
00164                         const ProblemDomain& a_domain,
00165                         const Real a_dx, int a_comp) const;
00166 
00167 
00169   virtual void applyBCs(FArrayBox& a_state, const Box& a_domain,
00170                         const Real a_dx, int a_comp) const;
00171 
00172 
00174   const DomainGhostBC& DomGhostBC(const int dir) const;
00175 
00177 
00186   void isSingleComponent(bool a_isSingleComp);
00187 
00189   bool isSingleComponent() const;
00190 
00191 protected:
00193   Tuple<DomainGhostBC*, SpaceDim> m_componentBC;
00194 
00196   bool m_isSingleComponent;
00197 
00198 private:
00199 
00200 };
00201 
00202 
00204 class InflowVelBC: public BoxGhostBC
00205 {
00206 public:
00207   friend class DomainGhostBC;
00208 
00210   InflowVelBC();
00211 
00213   virtual ~InflowVelBC();
00214 
00216   InflowVelBC(int dir, Side::LoHiSide sd);
00217   
00219   InflowVelBC(int dir, Side::LoHiSide sd,
00220               const Interval& a_comps);
00221 
00222 
00224   void isHomogeneous(bool a_isHomogeneous);
00225   
00227   bool isHomogeneous() const;
00228 
00230   void setBCVal(const Real a_bcVal);
00231   
00233   Real BCVal() const;
00234   
00235 
00237   void Time(const Real m_time);
00238 
00240   Real Time() const;
00241 
00242 protected:
00243 
00245   virtual void fillBCValues(FArrayBox& a_neumfac,
00246                             FArrayBox& a_dirfac,
00247                             FArrayBox& a_inhmval,
00248                             Real a_dx,
00249                             const ProblemDomain& a_domain) const;
00250 
00251 
00253   virtual void fillBCValues(FArrayBox& a_neumfac,
00254                             FArrayBox& a_dirfac,
00255                             FArrayBox& a_inhmval,
00256                             Real a_dx,
00257                             const Box& a_domain) const;
00258   
00259   virtual BoxGhostBC* new_boxghostbc() const;
00260 
00261 
00262 private:
00263   bool m_isHomogeneous;
00264 
00265   Real m_bcVal;
00266 
00267   Real m_time;
00268 
00269   InflowVelBC(const InflowVelBC& bcin) {;}
00270   void operator=(const InflowVelBC& bcin) {;}
00271 
00272 };
00273   
00274 
00275 #endif
00276 
00277 

Generated on Wed Jun 2 13:53:32 2004 for Chombo&INSwithParticles by doxygen 1.3.2