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 // include NoOpBC for backward compatibility (used to be in this file)
00037 #include "NoOpBC.H"
00038 
00040 
00044 class BoxEdgeBC: public BoxGhostBC
00045 {
00046 public:
00048   virtual ~BoxEdgeBC();
00049   
00051   BoxEdgeBC();
00052 
00054   BoxEdgeBC(int a_dir, Side::LoHiSide a_sd);
00055 
00057   BoxEdgeBC(int a_dir, Side::LoHiSide a_sd, const Interval& a_comps);
00058 
00060   BoxEdgeBC(int a_dir, Side::LoHiSide a_sd, const Interval& a_comps, 
00061             IndexType& a_ixtype);
00062 
00064   const IndexType& ixType() const;
00065   
00067   void ixType(const IndexType& a_ixType);
00068 
00069 
00070 protected:
00071 
00073   virtual BoxGhostBC* new_boxghostbc() const;
00074 
00076   void define(int a_dir, Side::LoHiSide a_sd);
00077 
00079   void define(int a_dir, Side::LoHiSide a_sd, const Interval& a_comps);
00080 
00082   void define(int a_dir, Side::LoHiSide a_sd, const Interval& a_comps,
00083               IndexType& a_ixtype);
00084 
00086   virtual void
00087   applyInhomogeneousBCs(FArrayBox& a_state,
00088                         const ProblemDomain& a_domain,
00089                         Real a_dx) const;
00091   virtual void
00092   applyHomogeneousBCs(FArrayBox& a_state, 
00093                       const ProblemDomain& a_domain,
00094                       Real a_dx) const;
00095 
00097   virtual void
00098   fillBCValues(FArrayBox& a_neumfac,
00099                FArrayBox& a_dircfac,
00100                FArrayBox& a_inhmval,
00101                Real a_dx,
00102                const ProblemDomain& a_domain) const;
00103 
00104 
00106   virtual void
00107   applyInhomogeneousBCs(FArrayBox& a_state,
00108                         const Box& a_domain,
00109                         Real a_dx) const;
00111   virtual void
00112   applyHomogeneousBCs(FArrayBox& a_state, 
00113                       const Box& a_domain,
00114                       Real a_dx) const;
00115 
00117   virtual void
00118   fillBCValues(FArrayBox& a_neumfac,
00119                FArrayBox& a_dircfac,
00120                FArrayBox& a_inhmval,
00121                Real a_dx,
00122                const Box& a_domain) const;
00123 
00125   virtual void 
00126   applyBCs(const Box& a_bcbox, 
00127            FArrayBox& a_state,
00128            const FArrayBox& a_neumfac,
00129            const FArrayBox& a_dircfac,
00130            const FArrayBox& a_inhmval,
00131            Real a_dx) const;
00132 
00133 
00134 private:
00135   BoxEdgeBC(const BoxEdgeBC&) {;}
00136   virtual void operator=(const BoxEdgeBC&) {;}
00137   
00138   IndexType m_ix_type;
00139   
00140 };
00141 
00142 
00144 
00146 class edgeDirichletBC : public BoxEdgeBC
00147 {
00148 public:
00149   friend class DomainGhostBC;
00150 
00152   ~edgeDirichletBC();
00153   
00155   edgeDirichletBC();
00156 
00158   edgeDirichletBC(int a_dir, Side::LoHiSide a_sd);
00159 
00161   edgeDirichletBC(int a_dir, Side::LoHiSide a_sd, const Interval& a_comps);
00162 
00164   void setBCVal(const Real a_bcVal);
00165 
00167   Real BCVal() const;
00168 
00169 protected:
00170   virtual void 
00171   fillBCValues(FArrayBox& a_neumfac,
00172                FArrayBox& a_dircfac,
00173                FArrayBox& a_inhmval,
00174                Real a_dx,
00175                const ProblemDomain& a_domain) const;
00176 
00177 
00178   virtual void 
00179   fillBCValues(FArrayBox& a_neumfac,
00180                FArrayBox& a_dircfac,
00181                FArrayBox& a_inhmval,
00182                Real a_dx,
00183                const Box& a_domain) const;
00184 
00186   virtual  BoxGhostBC* new_boxghostbc() const;
00187 
00189   Real m_bcVal;
00190 
00191 
00192 private:
00193   edgeDirichletBC(const edgeDirichletBC& dirin) {;}
00194   void operator=(const edgeDirichletBC& dirin) {;}
00195 };
00196     
00197 
00198 #endif
00199 
00200 
00201 

Generated on Wed Jan 19 17:51:24 2005 for Chombo&INSwithParticles by doxygen1.2.16