Chombo + EB + MF  3.2
BaseBCValue.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 _BASEBCVALUE_H_
12 #define _BASEBCVALUE_H_
13 
14 #include "RealVect.H"
15 #include "EBArith.H"
16 #include "NamespaceHeader.H"
17 
19 {
20 public:
22  {
23  }
24 
25  virtual ~BaseBCValue()
26  {
27  }
28 
29  virtual Real value(const RealVect& a_point,
30  const RealVect& a_normal,
31  const Real& a_time,
32  const int& a_comp) const = 0;
33 
34  virtual Real value(const FaceIndex& a_face,
35  const Side::LoHiSide& a_side,
36  const DataIndex& a_dit,
37  const RealVect& a_point,
38  const RealVect& a_normal,
39  const Real& a_time,
40  const int& a_comp) const
41  {
42  return value(a_point,a_normal,a_time,a_comp);
43  }
44 
45  virtual Real value(const VolIndex& a_vof,
46  const RealVect& a_centroid,
47  const RealVect& a_normal,
48  const RealVect& a_dx,
49  const RealVect& a_probLo,
50  const DataIndex& a_dit,
51  const Real& a_time,
52  const int& a_comp) const
53  {
54  RealVect point = a_centroid;
55  point *= a_dx;
56  point += EBArith::getVofLocation(a_vof,a_dx,a_probLo);
57  return value(point,a_normal,a_time,a_comp);
58  }
59 
60  virtual Real value(const IntVect& a_iv,
61  const DataIndex& a_dit,
62  const RealVect& a_point,
63  const RealVect& a_normal,
64  const Real& a_time,
65  const int& a_comp) const
66  {
67  return value(a_point,a_normal,a_time,a_comp);
68  }
69 
70  virtual Real beta(const RealVect& a_point,
71  const Real& a_time) const
72  {
73  MayDay::Error("BaseBCValue::beta virtual function not implemented");
74  return 1.2345678e20;
75  }
76 
77 };
78 
79 #include "NamespaceFooter.H"
80 #endif
static RealVect getVofLocation(const VolIndex &a_vof, const RealVect &a_dx, const RealVect &a_probLo)
gets the location in real space of a cell center
virtual Real beta(const RealVect &a_point, const Real &a_time) const
Definition: BaseBCValue.H:70
virtual Real value(const IntVect &a_iv, const DataIndex &a_dit, const RealVect &a_point, const RealVect &a_normal, const Real &a_time, const int &a_comp) const
Definition: BaseBCValue.H:60
Definition: BaseBCValue.H:18
virtual ~BaseBCValue()
Definition: BaseBCValue.H:25
Definition: FaceIndex.H:28
virtual Real value(const FaceIndex &a_face, const Side::LoHiSide &a_side, const DataIndex &a_dit, const RealVect &a_point, const RealVect &a_normal, const Real &a_time, const int &a_comp) const
Definition: BaseBCValue.H:34
double Real
Definition: REAL.H:33
BaseBCValue()
Definition: BaseBCValue.H:21
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.
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
Definition: DataIndex.H:114
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
virtual Real value(const RealVect &a_point, const RealVect &a_normal, const Real &a_time, const int &a_comp) const =0
Volume of Fluid Index.
Definition: VolIndex.H:31
virtual Real value(const VolIndex &a_vof, const RealVect &a_centroid, const RealVect &a_normal, const RealVect &a_dx, const RealVect &a_probLo, const DataIndex &a_dit, const Real &a_time, const int &a_comp) const
Definition: BaseBCValue.H:45