Chombo + EB  3.2
EBPhysIBC.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 _EBPHYSIBC_H_
12 #define _EBPHYSIBC_H_
13 
14 #include "EBCellFAB.H"
15 #include "EBISLayout.H"
16 #include "EBFluxFAB.H"
17 #include "REAL.H"
18 #include "LevelData.H"
19 #include "ProblemDomain.H"
20 #include "NamespaceHeader.H"
21 
22 ///
23 /**
24  Pure virtual base class through which a user specifies the
25  initial and boundary conditions for LevelGodunov.
26  */
27 class EBPhysIBC
28 {
29 public:
30  ///
31  EBPhysIBC();
32 
33  ///
34  virtual ~EBPhysIBC();
35 
36  ///
37  virtual void define(const ProblemDomain& a_domain,
38  const RealVect& a_dx) = 0;
39 
40  /// For every box in this level, this virtual function is called.
41  virtual void fluxBC(EBFluxFAB& a_flux,
42  const EBCellFAB& a_Wcenter,
43  const EBCellFAB& a_Wextrap,
44  const Side::LoHiSide& a_sd,
45  const Real& a_time,
46  const EBISBox& a_ebisBox,
47  const DataIndex& a_dit,
48  const Box& a_box,
49  const Box& a_faceBox,
50  const int& a_dir) = 0;
51 
52  virtual void setCurDataIndex(const DataIndex& a_dit)
53  {
54  //cannot make this pure virtual because not everything needs it
55  MayDay::Error("not implmented");
56  }
57 
58  /// Put initial conserved state into a_conState
59  virtual void initialize(LevelData<EBCellFAB>& a_conState,
60  const EBISLayout& a_ebisl) const = 0;
61 
62  /// Set boundary slopes
63  /**
64  The boundary slopes in a_dW are already set to one sided difference
65  approximations. If this function doesn't change them they will be
66  used for the slopes at the boundaries.
67  */
68  virtual void setBndrySlopes(EBCellFAB& a_deltaPrim,
69  const EBCellFAB& a_primState,
70  const EBISBox& a_ebisBox,
71  const Box& a_box,
72  const int& a_dir) = 0;
73 
74 };
75 
76 #include "NamespaceFooter.H"
77 #endif
virtual void initialize(LevelData< EBCellFAB > &a_conState, const EBISLayout &a_ebisl) const =0
Put initial conserved state into a_conState.
virtual void fluxBC(EBFluxFAB &a_flux, const EBCellFAB &a_Wcenter, const EBCellFAB &a_Wextrap, const Side::LoHiSide &a_sd, const Real &a_time, const EBISBox &a_ebisBox, const DataIndex &a_dit, const Box &a_box, const Box &a_faceBox, const int &a_dir)=0
For every box in this level, this virtual function is called.
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
virtual void setCurDataIndex(const DataIndex &a_dit)
Definition: EBPhysIBC.H:52
Definition: EBISBox.H:46
A EBFaceFAB-like container for edge-centered fluxes.
Definition: EBFluxFAB.H:25
Definition: EBCellFAB.H:29
double Real
Definition: REAL.H:33
LoHiSide
Definition: LoHiSide.H:27
static void Error(const char *const a_msg=m_nullString, int m_exitCode=CH_DEFAULT_ERROR_CODE)
Print out message to cerr and exit with the specified exit code.
virtual void define(const ProblemDomain &a_domain, const RealVect &a_dx)=0
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
Definition: EBPhysIBC.H:27
Definition: DataIndex.H:112
Definition: EBISLayout.H:39
virtual void setBndrySlopes(EBCellFAB &a_deltaPrim, const EBCellFAB &a_primState, const EBISBox &a_ebisBox, const Box &a_box, const int &a_dir)=0
Set boundary slopes.
virtual ~EBPhysIBC()