XGC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
magnetic_equil_files.hpp
Go to the documentation of this file.
1 #ifndef MAGNETIC_EQUIL_FILES_HPP
2 #define MAGNETIC_EQUIL_FILES_HPP
3 
4 #include "space_settings.hpp"
5 #include "NamelistReader.hpp"
6 #include "globals.hpp"
7 #include "rz_bounds.hpp"
8 #include "file_reader.hpp"
9 
11  using Ptr = std::shared_ptr<MagneticEquilFiles>;
12 
13  virtual ~MagneticEquilFiles() = default;
14 
16 };
17 
20  View<double*, HostType> rgrid;
21  View<double*, HostType> zgrid;
22  View<double*, HostType> phigrid;
23  View<double***, CLayout, HostType> psi;
24  View<double***, CLayout, HostType> Br;
25  View<double***, CLayout, HostType> Bz;
26  View<double***, CLayout, HostType> Bphi;
27 
28  void read_eq_dims(FileReader& file_reader, int& mr, int& mz, int& mphi, int& wedge_n);
29 
30  void read_eq(FileReader& file_reader, int iphi);
31 
32  MagneticEquilFiles3D(const std::string& eq_filebase);
33 
35 };
36 
39  double axis_r;
40  double axis_z;
41  double axis_b;
42  double x_psi;
43  double x_r;
44  double x_z;
45  View<double*, CLayout, HostType> rgrid;
46  View<double*, CLayout, HostType> zgrid;
47  View<double*, CLayout, HostType> psi_grid;
48  View<double*, CLayout, HostType> I;
49  View<double**, CLayout, HostType> psi_rz;
50 
51  void read_eq_dims(FileReader& file_reader, int& mr, int& mz, int& mpsi);
52 
53  void read_eq(FileReader& file_reader);
54 
55  MagneticEquilFiles2D(bool read_m3dc1, const std::string& eq_filename);
56 
58 
60 };
61 
62 #endif
Definition: magnetic_equil_files.hpp:10
View< double *, HostType > phigrid
Definition: magnetic_equil_files.hpp:22
View< double ***, CLayout, HostType > Bphi
Definition: magnetic_equil_files.hpp:26
View< double ***, CLayout, HostType > Bz
Definition: magnetic_equil_files.hpp:25
virtual ~MagneticEquilFiles()=default
View< double *, HostType > zgrid
Definition: magnetic_equil_files.hpp:21
double axis_z
Definition: magnetic_equil_files.hpp:40
Definition: rz_bounds.hpp:4
Definition: NamelistReader.hpp:193
Definition: magnetic_equil_files.hpp:37
double x_r
Definition: magnetic_equil_files.hpp:43
View< double ***, CLayout, HostType > Br
Definition: magnetic_equil_files.hpp:24
MagneticEquilFiles2D(bool read_m3dc1, const std::string &eq_filename)
Definition: magnetic_equil_files.cpp:168
View< double *, CLayout, HostType > rgrid
Definition: magnetic_equil_files.hpp:45
View< double *, HostType > rgrid
Definition: magnetic_equil_files.hpp:20
View< double *, CLayout, HostType > zgrid
Definition: magnetic_equil_files.hpp:46
double x_psi
Definition: magnetic_equil_files.hpp:42
void read_eq_dims(FileReader &file_reader, int &mr, int &mz, int &mphi, int &wedge_n)
Definition: magnetic_equil_files.cpp:11
Definition: file_reader.hpp:6
double axis_b
Definition: magnetic_equil_files.hpp:41
static MagneticEquilFiles2D eq_files_from_namelist(NLReader::NamelistReader &nlr)
Definition: magnetic_equil_files.cpp:273
View< double *, CLayout, HostType > psi_grid
Definition: magnetic_equil_files.hpp:47
View< double *, CLayout, HostType > I
Definition: magnetic_equil_files.hpp:48
void read_eq_dims(FileReader &file_reader, int &mr, int &mz, int &mpsi)
Definition: magnetic_equil_files.cpp:136
double x_z
Definition: magnetic_equil_files.hpp:44
RZBounds bounds
Definition: magnetic_equil_files.hpp:19
static Ptr eq_files_ptr_from_namelist(NLReader::NamelistReader &nlr, bool is_3D)
Definition: magnetic_equil_files.cpp:313
double axis_r
Definition: magnetic_equil_files.hpp:39
Definition: magnetic_equil_files.hpp:18
static MagneticEquilFiles3D eq_files_from_namelist(NLReader::NamelistReader &nlr)
Definition: magnetic_equil_files.cpp:109
void read_eq(FileReader &file_reader)
Definition: magnetic_equil_files.cpp:148
void read_eq(FileReader &file_reader, int iphi)
Definition: magnetic_equil_files.cpp:26
MagneticEquilFiles3D(const std::string &eq_filebase)
Definition: magnetic_equil_files.cpp:43
View< double **, CLayout, HostType > psi_rz
Definition: magnetic_equil_files.hpp:49
RZBounds bounds
Definition: magnetic_equil_files.hpp:38
View< double ***, CLayout, HostType > psi
Definition: magnetic_equil_files.hpp:23
std::shared_ptr< MagneticEquilFiles > Ptr
Definition: magnetic_equil_files.hpp:11