20 template<
class Device>
24 template<
class Device2>
friend class Grid;
35 template<
class Device2>
77 #ifdef NO_FORTRAN_MODULES
78 m.gradient_matrices_h = gradient_matrices_h;
87 KOKKOS_INLINE_FUNCTION
void psi_search(
double psi,
double &wp,
int &ip)
const;
89 template<PhiInterpType PIT>
92 template<PhiInterpType PIT>
95 template<PhiInterpType PIT>
98 template<PhiInterpType PIT>
101 template<PhiInterpType PIT>
104 template<PhiInterpType PIT>
107 template<PhiInterpType PIT>
122 KOKKOS_INLINE_FUNCTION
int get_node_index(
int triangle_index,
int tri_vertex_index)
const;
136 KOKKOS_INLINE_FUNCTION
int uses_rz_basis(
const int inode)
const;
138 KOKKOS_INLINE_FUNCTION
double get_r(
const int inode)
const;
140 KOKKOS_INLINE_FUNCTION
void get_rz_coordinates(
const int inode,
double& r,
double& z)
const;
165 Kokkos::View<double*,Kokkos::LayoutRight,Device>
psi;
166 Kokkos::View<double*,Kokkos::LayoutRight,Device>
bfield;
167 Kokkos::View<double*,Kokkos::LayoutRight,Device>
psi_surf2;
180 #ifdef NO_FORTRAN_MODULES
double inv_delta_phi
1/delta_phi
Definition: grid.hpp:158
VolumesAndAreas volumes_and_areas
Definition: grid.hpp:171
KOKKOS_INLINE_FUNCTION RZPair get_wall_rz(int i_wall) const
Definition: grid.tpp:291
Grid()
Definition: grid.hpp:32
Definition: gradient_matrices.hpp:9
bool axisymmetric
Definition: grid.hpp:146
Definition: grid_weights.hpp:73
Kokkos::View< double *, Kokkos::LayoutRight, Device > bfield
Magnetic field magnitude at nodes.
Definition: grid.hpp:166
int ntriangle
Number of grid triangles.
Definition: grid.hpp:153
double minval_psi_surf2
Definition: grid.hpp:162
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:13
Grid< Device2 > mirror() const
Definition: grid.hpp:36
KOKKOS_INLINE_FUNCTION bool node_is_in_included_region(const int inode, const bool exclude_private_region) const
Definition: grid.tpp:222
Definition: grid_files.hpp:721
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:155
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:174
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:167
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:156
int nwall
Definition: grid.hpp:159
Definition: grid_structs.hpp:28
Definition: volumes_and_areas.hpp:14
Kokkos::View< double *, Kokkos::LayoutRight, Device > psi
An array of psi coordinates.
Definition: grid.hpp:165
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:177
int npsi_surf2
Definition: grid.hpp:161
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:176
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
Projection< HostType > ff_rplane_to_neighbors
Definition: grid.hpp:175
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:168
Definition: grid_weights.hpp:52
UniformRange psi00
Definition: grid.hpp:164
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:163
Plane< Device > midplane
Definition: grid.hpp:149
int nnode
Number of grid nodes.
Definition: grid.hpp:154
Plane< Device > lplane
Definition: grid.hpp:150
double delta_phi
Distance between planes.
Definition: grid.hpp:157
KOKKOS_INLINE_FUNCTION void psi_search(double psi, double &wp, int &ip) const
Definition: grid.tpp:17
Plane< Device > rplane
Definition: grid.hpp:151
KOKKOS_INLINE_FUNCTION bool node_is_in_region_1_or_2(const MagneticField< Device > &magnetic_field, const int inode) const
Definition: grid.tpp:236