Chombo + EB + MF  3.2
AdvectionFunctions.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 _ADVECTIONFUNCTIONS_H_
12 #define _ADVECTIONFUNCTIONS_H_
13
14 #include "IntVect.H"
15 #include "RealVect.H"
16
17 #include "NamespaceHeader.H"
18
19 /// Velocity function interface.
20 /**
21 */
22 ///
23 typedef Real (*AdvectionVelocityFunction)(/// location of the function evaluation
24  const RealVect& a_point,
25  /// velocity component
26  const int& a_velComp);
27
28
29 /// Constant flow example
30 /**
31  Return 1.
32  */
33 Real constantAdvection(/// location of the function evaluation
34  const RealVect& a_point,
35  /// velocity component
36  const int& a_velComp);
37
38
39 /// Rotating flow example
40 /**
41  At point (x, y, z),
42  set d = (x - 1/2)^2 + (y - 1/2)^2 + (z - 1/2)^2.
43  \n
44  If d < 1/2, then return velocity ((y - 1/2)/d, -(x - 1/2)/d, 0).
45  \n
46  Otherwise, return velocity zero.
47  */
48 Real rotatingAdvection(/// location of the function evaluation
49  const RealVect& a_point,
50  /// velocity component
51  const int& a_velComp);
52
53 #include "NamespaceFooter.H"
54
55 #endif
Real(* AdvectionVelocityFunction)(const RealVect &a_point, const int &a_velComp)
Velocity function interface.
Definition: AdvectionFunctions.H:23
Real constantAdvection(const RealVect &a_point, const int &a_velComp)
Constant flow example.
double Real
Definition: REAL.H:33
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
Real rotatingAdvection(const RealVect &a_point, const int &a_velComp)
Rotating flow example.