Athena++/Atmosphere
Planetary Atmosphere Simulator
athena.hpp File Reference
#include <cmath>
#include <cstdint>
#include "athena_arrays.hpp"
#include "defs.hpp"

Go to the source code of this file.

Classes

struct  LogicalLocation
 
struct  RegionSize
 
struct  FaceField
 
struct  EdgeField
 

Macros

#define SIMD_WIDTH   4
 
#define CACHELINE_BYTES   64
 

Typedefs

using Real = double
 
using BValFunc = void(*)(MeshBlock *pmb, Coordinates *pco, AthenaArray< Real > &prim, FaceField &b, Real time, Real dt, int is, int ie, int js, int je, int ks, int ke, int ngh)
 
using AMRFlagFunc = int(*)(MeshBlock *pmb)
 
using MeshGenFunc = Real(*)(Real x, RegionSize rs)
 
using SrcTermFunc = void(*)(MeshBlock *pmb, const Real time, const Real dt, const AthenaArray< Real > &prim, const AthenaArray< Real > &bcc, AthenaArray< Real > &cons)
 
using TimeStepFunc = Real(*)(MeshBlock *pmb)
 
using HistoryOutputFunc = Real(*)(MeshBlock *pmb, int iout)
 
using MetricFunc = void(*)(Real x1, Real x2, Real x3, ParameterInput *pin, AthenaArray< Real > &g, AthenaArray< Real > &g_inv, AthenaArray< Real > &dg_dx1, AthenaArray< Real > &dg_dx2, AthenaArray< Real > &dg_dx3)
 
using MGBoundaryFunc = void(*)(AthenaArray< Real > &dst, Real time, int nvar, int is, int ie, int js, int je, int ks, int ke, int ngh, Real x0, Real y0, Real z0, Real dx, Real dy, Real dz)
 
using ViscosityCoeffFunc = void(*)(HydroDiffusion *phdif, MeshBlock *pmb, const AthenaArray< Real > &w, const AthenaArray< Real > &bc, int is, int ie, int js, int je, int ks, int ke)
 
using ConductionCoeffFunc = void(*)(HydroDiffusion *phdif, MeshBlock *pmb, const AthenaArray< Real > &w, const AthenaArray< Real > &bc, int is, int ie, int js, int je, int ks, int ke)
 
using FieldDiffusionCoeffFunc = void(*)(FieldDiffusion *pfdif, MeshBlock *pmb, const AthenaArray< Real > &w, const AthenaArray< Real > &bmag, int is, int ie, int js, int je, int ks, int ke)
 

Enumerations

enum  ConsIndex {
  IDN =0 , IM1 =1+NVAPOR , IM2 =2+NVAPOR , IM3 =3+NVAPOR ,
  IEN =4+NVAPOR
}
 
enum  MagneticIndex { IB1 =0 , IB2 =1 , IB3 =2 }
 
enum  PrimIndex {
  IVX =1+NVAPOR , IVY =2+NVAPOR , IVZ =3+NVAPOR , IPR =4+NVAPOR ,
  IBY =(NHYDRO) , IBZ =((NHYDRO)+1) , IV1 =IVX , IV2 =IVY ,
  IV3 =IVZ
}
 
enum  ElectricIndex {
  X1E2 =0 , X1E3 =1 , X2E3 =0 , X2E1 =1 ,
  X3E1 =0 , X3E2 =1
}
 
enum  MetricIndex {
  I00 =0 , I01 =1 , I02 =2 , I03 =3 ,
  I11 =4 , I12 =5 , I13 =6 , I22 =7 ,
  I23 =8 , I33 =9 , NMETRIC =10
}
 
enum  TriangleIndex {
  T00 =0 , T10 =1 , T11 =2 , T20 =3 ,
  T21 =4 , T22 =5 , T30 =6 , T31 =7 ,
  T32 =8 , T33 =9 , NTRIANGULAR =10
}
 
enum  CoordinateDirection { X1DIR =0 , X2DIR =1 , X3DIR =2 }
 
enum class  BoundaryQuantity {
  cc , fc , cc_flcor , fc_flcor ,
  mggrav , mggrav_f
}
 
enum class  HydroBoundaryQuantity { cons , prim }
 
enum class  BoundaryCommSubset { mesh_init , gr_amr , all }
 
enum class  FluidFormulation { evolve , background , disabled }
 
enum class  UserHistoryOperation { sum , max , min }
 
enum class  VariableType { prim , cons , chem }
 

Macro Definition Documentation

◆ SIMD_WIDTH

#define SIMD_WIDTH   4

Definition at line 44 of file athena.hpp.

◆ CACHELINE_BYTES

#define CACHELINE_BYTES   64

Definition at line 47 of file athena.hpp.

Typedef Documentation

◆ Real

using Real = double

Definition at line 29 of file athena.hpp.

◆ BValFunc

using BValFunc = void (*)( MeshBlock *pmb, Coordinates *pco, AthenaArray<Real> &prim, FaceField &b, Real time, Real dt, int is, int ie, int js, int je, int ks, int ke, int ngh)

Definition at line 173 of file athena.hpp.

◆ AMRFlagFunc

using AMRFlagFunc = int (*)(MeshBlock *pmb)

Definition at line 177 of file athena.hpp.

◆ MeshGenFunc

using MeshGenFunc = Real (*)(Real x, RegionSize rs)

Definition at line 178 of file athena.hpp.

◆ SrcTermFunc

using SrcTermFunc = void (*)( MeshBlock *pmb, const Real time, const Real dt, const AthenaArray<Real> &prim, const AthenaArray<Real> &bcc, AthenaArray<Real> &cons)

Definition at line 179 of file athena.hpp.

◆ TimeStepFunc

using TimeStepFunc = Real (*)(MeshBlock *pmb)

Definition at line 182 of file athena.hpp.

◆ HistoryOutputFunc

using HistoryOutputFunc = Real (*)(MeshBlock *pmb, int iout)

Definition at line 183 of file athena.hpp.

◆ MetricFunc

using MetricFunc = void (*)( Real x1, Real x2, Real x3, ParameterInput *pin, AthenaArray<Real> &g, AthenaArray<Real> &g_inv, AthenaArray<Real> &dg_dx1, AthenaArray<Real> &dg_dx2, AthenaArray<Real> &dg_dx3)

Definition at line 184 of file athena.hpp.

◆ MGBoundaryFunc

using MGBoundaryFunc = void (*)( AthenaArray<Real> &dst,Real time, int nvar, int is, int ie, int js, int je, int ks, int ke, int ngh, Real x0, Real y0, Real z0, Real dx, Real dy, Real dz)

Definition at line 188 of file athena.hpp.

◆ ViscosityCoeffFunc

using ViscosityCoeffFunc = void (*)( HydroDiffusion *phdif, MeshBlock *pmb, const AthenaArray<Real> &w, const AthenaArray<Real> &bc, int is, int ie, int js, int je, int ks, int ke)

Definition at line 192 of file athena.hpp.

◆ ConductionCoeffFunc

using ConductionCoeffFunc = void (*)( HydroDiffusion *phdif, MeshBlock *pmb, const AthenaArray<Real> &w, const AthenaArray<Real> &bc, int is, int ie, int js, int je, int ks, int ke)

Definition at line 196 of file athena.hpp.

◆ FieldDiffusionCoeffFunc

using FieldDiffusionCoeffFunc = void (*)( FieldDiffusion *pfdif, MeshBlock *pmb, const AthenaArray<Real> &w, const AthenaArray<Real> &bmag, int is, int ie, int js, int je, int ks, int ke)

Definition at line 200 of file athena.hpp.

Enumeration Type Documentation

◆ ConsIndex

enum ConsIndex
Enumerator
IDN 
IM1 
IM2 
IM3 
IEN 

Definition at line 135 of file athena.hpp.

◆ MagneticIndex

Enumerator
IB1 
IB2 
IB3 

Definition at line 136 of file athena.hpp.

◆ PrimIndex

enum PrimIndex
Enumerator
IVX 
IVY 
IVZ 
IPR 
IBY 
IBZ 
IV1 
IV2 
IV3 

Definition at line 139 of file athena.hpp.

◆ ElectricIndex

Enumerator
X1E2 
X1E3 
X2E3 
X2E1 
X3E1 
X3E2 

Definition at line 143 of file athena.hpp.

◆ MetricIndex

Enumerator
I00 
I01 
I02 
I03 
I11 
I12 
I13 
I22 
I23 
I33 
NMETRIC 

Definition at line 146 of file athena.hpp.

◆ TriangleIndex

Enumerator
T00 
T10 
T11 
T20 
T21 
T22 
T30 
T31 
T32 
T33 
NTRIANGULAR 

Definition at line 148 of file athena.hpp.

◆ CoordinateDirection

Enumerator
X1DIR 
X2DIR 
X3DIR 

Definition at line 155 of file athena.hpp.

◆ BoundaryQuantity

enum BoundaryQuantity
strong
Enumerator
cc 
fc 
cc_flcor 
fc_flcor 
mggrav 
mggrav_f 

Definition at line 162 of file athena.hpp.

◆ HydroBoundaryQuantity

enum HydroBoundaryQuantity
strong
Enumerator
cons 
prim 

Definition at line 163 of file athena.hpp.

◆ BoundaryCommSubset

enum BoundaryCommSubset
strong
Enumerator
mesh_init 
gr_amr 
all 

Definition at line 164 of file athena.hpp.

◆ FluidFormulation

enum FluidFormulation
strong
Enumerator
evolve 
background 
disabled 

Definition at line 166 of file athena.hpp.

◆ UserHistoryOperation

enum UserHistoryOperation
strong
Enumerator
sum 
max 
min 

Definition at line 167 of file athena.hpp.

◆ VariableType

enum VariableType
strong
Enumerator
prim 
cons 
chem 

Definition at line 168 of file athena.hpp.