Canoe
Comprehensive Atmosphere N' Ocean Engine
affine_coordinate.hpp
Go to the documentation of this file.
1 #ifndef SRC_EXO3_AFFINE_COORDINATE_HPP_
2 #define SRC_EXO3_AFFINE_COORDINATE_HPP_
3 
4 // athena
5 #include <athena/athena.hpp>
6 #include <athena/coordinates/coordinates.hpp>
7 
8 class MeshBlock;
9 class ParameterInput;
10 
11 class AffineCoordinate : public Coordinates {
12  public:
13  AffineCoordinate(MeshBlock *pmb, ParameterInput *pin, bool flag);
14 
15  void Face1Area(const int k, const int j, const int il, const int iu,
16  AthenaArray<Real> &area) final;
17  void Face2Area(const int k, const int j, const int il, const int iu,
18  AthenaArray<Real> &area) final;
19  void Face3Area(const int k, const int j, const int il, const int iu,
20  AthenaArray<Real> &area) final;
21  Real GetFace1Area(const int k, const int j, const int i) final;
22  Real GetFace2Area(const int k, const int j, const int i) final;
23  Real GetFace3Area(const int k, const int j, const int i) final;
24 
25  void VolCenterFace1Area(const int k, const int j, const int il, const int iu,
26  AthenaArray<Real> &area) final;
27  void VolCenterFace2Area(const int k, const int j, const int il, const int iu,
28  AthenaArray<Real> &area) final;
29  void VolCenterFace3Area(const int k, const int j, const int il, const int iu,
30  AthenaArray<Real> &area) final;
31  void CellVolume(const int k, const int j, const int il, const int iu,
32  AthenaArray<Real> &vol);
33  Real GetCellVolume(const int k, const int j, const int i);
34 
35  void CellMetric(const int k, const int j, const int il, const int iu,
37  void Face1Metric(const int k, const int j, const int il, const int iu,
39  void Face2Metric(const int k, const int j, const int il, const int iu,
41  void Face3Metric(const int k, const int j, const int il, const int iu,
43 
44  void PrimToLocal2(const int k, const int j, const int il, const int iu,
45  const AthenaArray<Real> &b1_vals,
46  AthenaArray<Real> &prim_left, AthenaArray<Real> &prim_right,
47  AthenaArray<Real> &bx);
48  void PrimToLocal3(const int k, const int j, const int il, const int iu,
49  const AthenaArray<Real> &b1_vals,
50  AthenaArray<Real> &prim_left, AthenaArray<Real> &prim_right,
51  AthenaArray<Real> &bx);
52 
53  void FluxToGlobal2(const int k, const int j, const int il, const int iu,
54  const AthenaArray<Real> &cons,
55  const AthenaArray<Real> &bbx, AthenaArray<Real> &flux,
57  void FluxToGlobal3(const int k, const int j, const int il, const int iu,
58  const AthenaArray<Real> &cons,
59  const AthenaArray<Real> &bbx, AthenaArray<Real> &flux,
61 
62  protected:
63  Real theta_;
64  Real sin_theta_;
65  Real cos_theta_;
66 };
67 
68 #endif // SRC_EXO3_AFFINE_COORDINATE_HPP_
Real GetCellVolume(const int k, const int j, const int i)
void Face1Area(const int k, const int j, const int il, const int iu, AthenaArray< Real > &area) final
void PrimToLocal3(const int k, const int j, const int il, const int iu, const AthenaArray< Real > &b1_vals, AthenaArray< Real > &prim_left, AthenaArray< Real > &prim_right, AthenaArray< Real > &bx)
void Face3Area(const int k, const int j, const int il, const int iu, AthenaArray< Real > &area) final
void FluxToGlobal3(const int k, const int j, const int il, const int iu, const AthenaArray< Real > &cons, const AthenaArray< Real > &bbx, AthenaArray< Real > &flux, AthenaArray< Real > &ey, AthenaArray< Real > &ez)
Real GetFace3Area(const int k, const int j, const int i) final
void Face1Metric(const int k, const int j, const int il, const int iu, AthenaArray< Real > &g, AthenaArray< Real > &g_inv)
void CellMetric(const int k, const int j, const int il, const int iu, AthenaArray< Real > &g, AthenaArray< Real > &g_inv)
void VolCenterFace1Area(const int k, const int j, const int il, const int iu, AthenaArray< Real > &area) final
void VolCenterFace3Area(const int k, const int j, const int il, const int iu, AthenaArray< Real > &area) final
void CellVolume(const int k, const int j, const int il, const int iu, AthenaArray< Real > &vol)
void PrimToLocal2(const int k, const int j, const int il, const int iu, const AthenaArray< Real > &b1_vals, AthenaArray< Real > &prim_left, AthenaArray< Real > &prim_right, AthenaArray< Real > &bx)
void FluxToGlobal2(const int k, const int j, const int il, const int iu, const AthenaArray< Real > &cons, const AthenaArray< Real > &bbx, AthenaArray< Real > &flux, AthenaArray< Real > &ey, AthenaArray< Real > &ez)
Real GetFace2Area(const int k, const int j, const int i) final
void Face2Metric(const int k, const int j, const int il, const int iu, AthenaArray< Real > &g, AthenaArray< Real > &g_inv)
AffineCoordinate(MeshBlock *pmb, ParameterInput *pin, bool flag)
Cartesian coordinates constructor.
void Face3Metric(const int k, const int j, const int il, const int iu, AthenaArray< Real > &g, AthenaArray< Real > &g_inv)
Real GetFace1Area(const int k, const int j, const int i) final
void Face2Area(const int k, const int j, const int il, const int iu, AthenaArray< Real > &area) final
void VolCenterFace2Area(const int k, const int j, const int il, const int iu, AthenaArray< Real > &area) final