criptic v1
Cosmic Ray Interstellar Propagation Tool using Itô Calculus
Loading...
Searching...
No Matches
Gas.H
Go to the documentation of this file.
1
15#ifndef _GAS_H_
16#define _GAS_H_
17
18#include <cmath>
19#include <vector>
20#include "GasData.H"
21#include "../MPI/MPIUtil.H"
22#include "../Utils/ErrCodes.H"
23#include "../Utils/Types.H"
24#include "../Utils/RealTensor2.H"
25#include "../Utils/Vec3.H"
26
27namespace criptic {
28
33 namespace gas {
34
44 class Gas {
45
46 public:
47
51 virtual ~Gas() { };
52
67 virtual void frame(const RealVec &x,
68 const Real t,
69 RealVec& v,
70 TNBBasis& tnb) const {
71 GasData gd = gasData(x, t);
72 v = gd.v;
73 tnb = TNBVectors(gd.B, gd.BGrad);
74 }
75
86 virtual GasData gasData(const RealVec &x,
87 const Real t) const = 0;
88
107 virtual Real dxGhost() const { return 0.0; }
108
126 virtual void updateState(const Real t,
127 Real& tNext) { }
128
129 };
130
131 }
132}
133#endif
134// _GAS_H_
Class to describe the background gas at a single point.
Trivial class to hold gas data.
Definition GasData.H:29
RealVec v
Definition GasData.H:38
RealVec B
Definition GasData.H:39
RealTensor2 BGrad
Definition GasData.H:45
Interface class to describe background gas.
Definition Gas.H:44
virtual void frame(const RealVec &x, const Real t, RealVec &v, TNBBasis &tnb) const
Compute the comoving TNB frame for the gas.
Definition Gas.H:67
virtual void updateState(const Real t, Real &tNext)
Update the gas data.
Definition Gas.H:126
virtual GasData gasData(const RealVec &x, const Real t) const =0
Return background gas state.
virtual Real dxGhost() const
Size of the ghost region in the gas data.
Definition Gas.H:107
virtual ~Gas()
Empty virtual destructor.
Definition Gas.H:51
The primary namespace for criptic objects.
Definition AdvancePacket.H:25
TNBBasis TNBVectors(const RealVec &v, const RealTensor2 &vGrad)
Compute tangent, normal, and binormal vectors.
Definition RealTensor2.H:913
double Real
Definition Types.H:38
Structure to hold TNB basis data.
Definition RealTensor2.H:898