18 double* node_vol_ff_h,
20 double* node_vol_nearest_h,
double* node_vol_h,
double* node_area_h,
double* psi00_h,
int npsi00);
56 #ifndef NO_FORTRAN_MODULES
69 template<
class Device>
73 template<
class Device2>
friend class Grid;
84 template<
class Device2>
126 #ifdef NO_FORTRAN_MODULES
127 m.gradient_matrices_h = gradient_matrices_h;
135 KOKKOS_INLINE_FUNCTION
void psi_search(
double psi,
double &wp,
int &ip)
const;
137 template<PhiInterpType PIT>
140 template<PhiInterpType PIT>
143 template<PhiInterpType PIT>
146 template<PhiInterpType PIT>
149 template<PhiInterpType PIT>
152 template<PhiInterpType PIT>
155 template<PhiInterpType PIT>
170 KOKKOS_INLINE_FUNCTION
int get_node_index(
int triangle_index,
int tri_vertex_index)
const;
184 KOKKOS_INLINE_FUNCTION
int uses_rz_basis(
const int inode)
const;
186 KOKKOS_INLINE_FUNCTION
double get_r(
const int inode)
const;
188 KOKKOS_INLINE_FUNCTION
void get_rz_coordinates(
const int inode,
double& r,
double& z)
const;
213 Kokkos::View<double*,Kokkos::LayoutRight,Device>
psi;
214 Kokkos::View<double*,Kokkos::LayoutRight,Device>
bfield;
215 Kokkos::View<double*,Kokkos::LayoutRight,Device>
psi_surf2;
228 #ifdef NO_FORTRAN_MODULES
double inv_delta_phi
1/delta_phi
Definition: grid.hpp:206
VolumesAndAreas volumes_and_areas
Definition: grid.hpp:219
VolumesAndAreas(int ntriangle_in, int nnode_in, int npsi00_in)
Definition: grid.hpp:36
KOKKOS_INLINE_FUNCTION RZPair get_wall_rz(int i_wall) const
Definition: grid.tpp:291
Grid()
Definition: grid.hpp:81
void init_fortran_vols_and_areas(double *tr_area_h, double *tr_vol_h, double *node_vol_ff_h, double *node_vol_nearest_h, double *node_vol_h, double *node_area_h, double *psi00_h, int npsi00)
Definition: gradient_matrices.hpp:9
bool axisymmetric
Definition: grid.hpp:194
void set_fortran_ptrs()
Definition: grid.hpp:55
Definition: grid_weights.hpp:73
Kokkos::View< double *, Kokkos::LayoutRight, Device > bfield
Magnetic field magnitude at nodes.
Definition: grid.hpp:214
int ntriangle
Number of grid triangles.
Definition: grid.hpp:201
double minval_psi_surf2
Definition: grid.hpp:210
View< double *, CLayout, HostType > vol00_h
Definition: grid.hpp:32
KOKKOS_INLINE_FUNCTION bool node_is_in_private_region_no_wall(const int inode) const
Definition: grid.tpp:209
Definition: grid_weights.hpp:47
Definition: NamelistReader.hpp:193
Definition: magnetic_field.hpp:12
Grid< Device2 > mirror() const
Definition: grid.hpp:85
KOKKOS_INLINE_FUNCTION bool node_is_in_included_region(const int inode, const bool exclude_private_region) const
Definition: grid.tpp:222
View< double *, CLayout, HostType > node_area_h
Definition: grid.hpp:31
Definition: grid_files.hpp:672
KOKKOS_INLINE_FUNCTION void get_triangle_area_and_volume(const MagneticField< Device > &magnetic_field, int i, double &area, double &volume) const
Definition: grid.tpp:191
int nplanes
Number of planes.
Definition: grid.hpp:203
KOKKOS_INLINE_FUNCTION void get_wall_index(const Simd< bool > &just_left_the_grid, const SimdVector2D &x, const SimdGridWeights< Order::One, PIT_GLOBAL > &grid_wts, Simd< int > &widx) const
Definition: grid.tpp:106
Projection< HostType > half_plane_ff
Definition: grid.hpp:222
KOKKOS_INLINE_FUNCTION int uses_rz_basis(const int inode) const
Definition: grid.tpp:248
Kokkos::View< double *, Kokkos::LayoutRight, Device > psi_surf2
Definition: grid.hpp:215
double wedge_angle
The size of the wedge (the model is periodic in phi, a angle of e.g. pi means half the tokamak is mod...
Definition: grid.hpp:204
int nwall
Definition: grid.hpp:207
Definition: grid_structs.hpp:28
Kokkos::View< double *, Kokkos::LayoutRight, Device > psi
An array of psi coordinates.
Definition: grid.hpp:213
KOKKOS_INLINE_FUNCTION void get_rz_coordinates(const int inode, double &r, double &z) const
Definition: grid.tpp:281
void write_to_file() const
Projection< HostType > ff_to_midplane
Definition: grid.hpp:225
View< double **, CLayout, HostType > node_vol_ff_l_h
Definition: grid.hpp:27
View< double *, CLayout, HostType > tr_area_h
Definition: grid.hpp:24
int npsi_surf2
Definition: grid.hpp:209
KOKKOS_INLINE_FUNCTION int get_node_index(int triangle_index, int tri_vertex_index) const
Definition: grid.tpp:160
KOKKOS_INLINE_FUNCTION double get_r(const int inode) const
Definition: grid.tpp:260
KOKKOS_INLINE_FUNCTION bool node_is_inside_psi_range(const MagneticField< Device > &magnetic_field, const int node) const
Definition: grid.tpp:120
Projection< HostType > ff_lplane_to_neighbors
Definition: grid.hpp:224
KOKKOS_INLINE_FUNCTION void nearest_node(const SimdGridWeights< Order::One, PIT > &grid_wts, SimdGridWeights< Order::Zero, PIT > &grid_wts0) const
Definition: grid.tpp:64
KOKKOS_INLINE_FUNCTION int get_plane_index(double phi) const
Definition: grid.tpp:133
KOKKOS_INLINE_FUNCTION void wedge_modulo_phi(Simd< double > &phi_mod) const
Definition: grid.tpp:86
Bounds get_local_wedge_bounds(int plane_index) const
Definition: grid.tpp:145
View< double *, CLayout, HostType > tr_vol_h
Definition: grid.hpp:25
Projection< HostType > ff_rplane_to_neighbors
Definition: grid.hpp:223
KOKKOS_INLINE_FUNCTION double node_area_to_volume(const MagneticField< Device > &magnetic_field, double area, int node_index) const
Definition: grid.tpp:176
KOKKOS_INLINE_FUNCTION bool node_is_in_region_1_or_2_no_wall(const int inode) const
Definition: grid.tpp:204
Kokkos::View< int *, Kokkos::LayoutRight, Device > wall_nodes
Definition: grid.hpp:216
Definition: grid_weights.hpp:52
View< double *, CLayout, HostType > node_vol_h
Definition: grid.hpp:30
View< double **, CLayout, HostType > node_vol_ff_r_h
Definition: grid.hpp:28
UniformRange psi00
Definition: grid.hpp:212
Definition: magnetic_field.F90:1
KOKKOS_INLINE_FUNCTION void get_grid_weights(const MagneticField< Device > &magnetic_field, const SimdVector &v, const Simd< double > &psi, SimdVector2D &xff, SimdGridWeights< Order::One, PIT > &grid_wts) const
Definition: grid.tpp:32
double maxval_psi_surf2
Definition: grid.hpp:211
Plane< Device > midplane
Definition: grid.hpp:197
int nnode
Number of grid nodes.
Definition: grid.hpp:202
Plane< Device > lplane
Definition: grid.hpp:198
double delta_phi
Distance between planes.
Definition: grid.hpp:205
KOKKOS_INLINE_FUNCTION void psi_search(double psi, double &wp, int &ip) const
Definition: grid.tpp:17
Kokkos::ViewAllocateWithoutInitializing NoInit
Definition: space_settings.hpp:68
Plane< Device > rplane
Definition: grid.hpp:199
View< double *, CLayout, HostType > node_vol_nearest_h
Definition: grid.hpp:29
VolumesAndAreas()
Definition: grid.hpp:34
KOKKOS_INLINE_FUNCTION bool node_is_in_region_1_or_2(const MagneticField< Device > &magnetic_field, const int inode) const
Definition: grid.tpp:236
View< double **, CLayout, HostType > node_vol_ff_h
Definition: grid.hpp:26