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
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