Chombo + EB  3.2
RampIBC.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifndef _RAMPIBC_H_
12 #define _RAMPIBC_H_
13 
14 #include "FArrayBox.H"
15 #include "REAL.H"
16 #include "LevelData.H"
17 #include "ProblemDomain.H"
18 #include "PhysIBC.H"
19 
20 #include "NamespaceHeader.H"
21 
22 /// Example of a wedge.
23 /**
24  Parameters:
25  a_smallPressure - Lower limit for pressure (returned)
26  a_gamma - Gamma for polytropic, gamma-law gas
27  a_alpha - The angle from horizontal to the wedge edge
28  a_ms - Mach shock number
29  a_xcorner - Position of the corner/tip of the wedge
30  a_artvisc - Artificial viscosity coefficient
31 
32  This entire problem is rotated so that the wedge edge is horizontal
33  in the problem domain.
34 */
35 class RampIBC: public PhysIBC
36 {
37 public:
38  /// Null Constructor
39  /**
40  */
41  RampIBC();
42 
43  /// Constructor which defines parameters used by Fortran routines
44  /**
45  */
46  RampIBC(Real& a_smallPressure,
47  const Real& a_gamma,
48  const Real& a_alpha,
49  const Real& a_ms,
50  const Real& a_xcorner,
51  const Real& a_artvisc);
52 
53  /// Destructor
54  /**
55  */
56  virtual ~RampIBC();
57 
58  /// Sets parameters in a common block used by Fortran routines
59  /**
60  */
61  void setFortranCommon(Real& a_smallPressure,
62  const Real& a_gamma,
63  const Real& a_alpha,
64  const Real& a_ms,
65  const Real& a_xcorner,
66  const Real& a_artvisc);
67 
68  /// Set the flag m_isFortranCommonSet to true
69  /**
70  Set the flag m_isFortranCommonSet to true so that new IBCs made with
71  new_physIBC() will have this flag set without calling setFortranCommon()
72  (this is a clumsy design and should be improved).
73  */
74  void setFortranCommonSet();
75 
76  /// Factory method - this object is its own factory
77  /**
78  Return a pointer to a new PhysIBC object with m_isDefined = false (i.e.,
79  its define() must be called before it is used) and m_isFortranCommonSet
80  set to value of m_isFortranCommonset in the current (factory) object.
81  */
83 
84  /// Set up initial conditions
85  /**
86  */
87  virtual void initialize(LevelData<FArrayBox>& a_U);
88 
89  /// Set boundary primitive values.
90  /**
91  */
92  virtual void primBC(FArrayBox& a_WGdnv,
93  const FArrayBox& a_Wextrap,
94  const FArrayBox& a_W,
95  const int& a_dir,
96  const Side::LoHiSide& a_side,
97  const Real& a_time);
98 
99  /// Set boundary slopes
100  /**
101  The boundary slopes in a_dW are already set to one sided difference
102  approximations. If this function doesn't change them they will be
103  used for the slopes at the boundaries.
104  */
105  virtual
106  void setBdrySlopes(FArrayBox& a_dW,
107  const FArrayBox& a_W,
108  const int& a_dir,
109  const Real& a_time);
110 
111  /// Adjust boundary fluxes to account for artificial viscosity
112  /**
113  */
114  virtual
115  void artViscBC(FArrayBox& a_F,
116  const FArrayBox& a_U,
117  const FArrayBox& a_divVel,
118  const int& a_dir,
119  const Real& a_time);
120 
121 
122 protected:
123  // True if the Fortran common block has been set
125 };
126 
127 #include "NamespaceFooter.H"
128 
129 #endif
virtual void initialize(LevelData< FArrayBox > &a_U)
Set up initial conditions.
Example of a wedge.
Definition: RampIBC.H:35
void setFortranCommon(Real &a_smallPressure, const Real &a_gamma, const Real &a_alpha, const Real &a_ms, const Real &a_xcorner, const Real &a_artvisc)
Sets parameters in a common block used by Fortran routines.
void setFortranCommonSet()
Set the flag m_isFortranCommonSet to true.
virtual ~RampIBC()
Destructor.
PhysIBC * new_physIBC()
Factory method - this object is its own factory.
virtual void primBC(FArrayBox &a_WGdnv, const FArrayBox &a_Wextrap, const FArrayBox &a_W, const int &a_dir, const Side::LoHiSide &a_side, const Real &a_time)
Set boundary primitive values.
double Real
Definition: REAL.H:33
LoHiSide
Definition: LoHiSide.H:27
virtual void artViscBC(FArrayBox &a_F, const FArrayBox &a_U, const FArrayBox &a_divVel, const int &a_dir, const Real &a_time)
Adjust boundary fluxes to account for artificial viscosity.
virtual void setBdrySlopes(FArrayBox &a_dW, const FArrayBox &a_W, const int &a_dir, const Real &a_time)
Set boundary slopes.
Definition: FArrayBox.H:45
Physical/domain initial and boundary conditions.
Definition: PhysIBC.H:33
RampIBC()
Null Constructor.
bool m_isFortranCommonSet
Definition: RampIBC.H:124