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

edgeGhostBC.H

Go to the documentation of this file.
00001 /* _______              __
00002   / ___/ /  ___  __ _  / /  ___
00003  / /__/ _ \/ _ \/  ' \/ _ \/ _ \
00004  \___/_//_/\___/_/_/_/_.__/\___/ 
00005 */
00006 
00007 // edgeGhostBC.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 _edgeGhostBC_H_
00033 #define _edgeGhostBC_H_
00034 
00035 #include "GhostBC.H"
00036 
00038 
00042 class BoxEdgeBC: public BoxGhostBC
00043 {
00044 public:
00046   virtual ~BoxEdgeBC();
00047   
00049   BoxEdgeBC();
00050 
00052   BoxEdgeBC(int a_dir, Side::LoHiSide a_sd);
00053 
00055   BoxEdgeBC(int a_dir, Side::LoHiSide a_sd, const Interval& a_comps);
00056 
00058   BoxEdgeBC(int a_dir, Side::LoHiSide a_sd, const Interval& a_comps, 
00059             IndexType& a_ixtype);
00060 
00062   const IndexType& ixType() const;
00063   
00065   void ixType(const IndexType& a_ixType);
00066 
00067 
00068 protected:
00069 
00071   virtual BoxGhostBC* new_boxghostbc() const;
00072 
00074   void define(int a_dir, Side::LoHiSide a_sd);
00075 
00077   void define(int a_dir, Side::LoHiSide a_sd, const Interval& a_comps);
00078 
00080   void define(int a_dir, Side::LoHiSide a_sd, const Interval& a_comps,
00081               IndexType& a_ixtype);
00082 
00084   virtual void
00085   applyInhomogeneousBCs(FArrayBox& a_state,
00086                         const ProblemDomain& a_domain,
00087                         Real a_dx) const;
00089   virtual void
00090   applyHomogeneousBCs(FArrayBox& a_state, 
00091                       const ProblemDomain& a_domain,
00092                       Real a_dx) const;
00093 
00095   virtual void
00096   fillBCValues(FArrayBox& a_neumfac,
00097                FArrayBox& a_dircfac,
00098                FArrayBox& a_inhmval,
00099                Real a_dx,
00100                const ProblemDomain& a_domain) const;
00101 
00102 
00104   virtual void
00105   applyInhomogeneousBCs(FArrayBox& a_state,
00106                         const Box& a_domain,
00107                         Real a_dx) const;
00109   virtual void
00110   applyHomogeneousBCs(FArrayBox& a_state, 
00111                       const Box& a_domain,
00112                       Real a_dx) const;
00113 
00115   virtual void
00116   fillBCValues(FArrayBox& a_neumfac,
00117                FArrayBox& a_dircfac,
00118                FArrayBox& a_inhmval,
00119                Real a_dx,
00120                const Box& a_domain) const;
00121 
00123   virtual void 
00124   applyBCs(const Box& a_bcbox, 
00125            FArrayBox& a_state,
00126            const FArrayBox& a_neumfac,
00127            const FArrayBox& a_dircfac,
00128            const FArrayBox& a_inhmval,
00129            Real a_dx) const;
00130 
00131 
00132 private:
00133   BoxEdgeBC(const BoxEdgeBC&) {;}
00134   virtual void operator=(const BoxEdgeBC&) {;}
00135   
00136   IndexType m_ix_type;
00137   
00138 };
00139 
00140 
00142 
00144 class edgeDirichletBC : public BoxEdgeBC
00145 {
00146 public:
00147   friend class DomainGhostBC;
00148 
00150   ~edgeDirichletBC();
00151   
00153   edgeDirichletBC();
00154 
00156   edgeDirichletBC(int a_dir, Side::LoHiSide a_sd);
00157 
00159   edgeDirichletBC(int a_dir, Side::LoHiSide a_sd, const Interval& a_comps);
00160 
00162   void setBCVal(const Real a_bcVal);
00163 
00165   Real BCVal() const;
00166 
00167 protected:
00168   virtual void 
00169   fillBCValues(FArrayBox& a_neumfac,
00170                FArrayBox& a_dircfac,
00171                FArrayBox& a_inhmval,
00172                Real a_dx,
00173                const ProblemDomain& a_domain) const;
00174 
00175 
00176   virtual void 
00177   fillBCValues(FArrayBox& a_neumfac,
00178                FArrayBox& a_dircfac,
00179                FArrayBox& a_inhmval,
00180                Real a_dx,
00181                const Box& a_domain) const;
00182 
00184   virtual  BoxGhostBC* new_boxghostbc() const;
00185 
00187   Real m_bcVal;
00188 
00189 
00190 private:
00191   edgeDirichletBC(const edgeDirichletBC& dirin) {;}
00192   void operator=(const edgeDirichletBC& dirin) {;}
00193 };
00194     
00195 
00197 
00200 class NoOpBC : public BoxGhostBC
00201 {
00202 public:
00203   
00205   NoOpBC();
00206 
00208   NoOpBC(int a_dir, Side::LoHiSide a_sd);
00209 
00211   NoOpBC(int a_dir, Side::LoHiSide a_sd, const Interval& a_comps);
00212 
00214   virtual ~NoOpBC();
00215 
00216 protected:
00217 
00219   virtual BoxGhostBC* new_boxghostbc() const;
00220 
00222   void define(int a_dir, Side::LoHiSide a_sd);
00223 
00225   void define(int a_dir, Side::LoHiSide a_sd, const Interval& a_comps);
00226 
00228   virtual void
00229   applyInhomogeneousBCs(FArrayBox& a_state,
00230                         const ProblemDomain& a_domain,
00231                         Real a_dx) const;
00232 
00234   virtual void
00235   applyInhomogeneousBCs(FArrayBox& a_state,
00236                         const Box& a_domain,
00237                         Real a_dx) const;
00239   virtual void
00240   applyHomogeneousBCs(FArrayBox& a_state, 
00241                       const ProblemDomain& a_domain,
00242                       Real a_dx) const;
00243 
00245   virtual void
00246   applyHomogeneousBCs(FArrayBox& a_state, 
00247                       const Box& a_domain,
00248                       Real a_dx) const;
00249 
00250   
00252   virtual void
00253   fillBCValues(FArrayBox& a_neumfac,
00254                FArrayBox& a_dircfac,
00255                FArrayBox& a_inhmval,
00256                Real a_dx,
00257                const ProblemDomain& a_domain) const;
00258 
00259 
00261   virtual void
00262   fillBCValues(FArrayBox& a_neumfac,
00263                FArrayBox& a_dircfac,
00264                FArrayBox& a_inhmval,
00265                Real a_dx,
00266                const Box& a_domain) const;
00267 
00268 private:
00269   NoOpBC(const NoOpBC&) {;}
00270   virtual void operator =(const NoOpBC&) {;}
00271 
00272 
00273 };
00274 #endif
00275 
00276 
00277 

Generated on Thu Aug 29 11:05:44 2002 for Chombo&INS by doxygen1.2.16