20 template<
class Device>
24 template<
class Device2>
friend class Grid;
35 template<
class Device2>
80 #ifdef NO_FORTRAN_MODULES
81 m.gradient_matrices_h = gradient_matrices_h;
90 KOKKOS_INLINE_FUNCTION
void psi_search(
double psi,
double &wp,
int &ip)
const;
92 template<PhiInterpType PIT>
95 template<PhiInterpType PIT>
98 template<PhiInterpType PIT>
101 template<PhiInterpType PIT>
104 template<PhiInterpType PIT>
107 template<PhiInterpType PIT>
110 template<PhiInterpType PIT>
125 KOKKOS_INLINE_FUNCTION
int get_node_index(
int triangle_index,
int tri_vertex_index)
const;
141 KOKKOS_INLINE_FUNCTION
int uses_rz_basis(
const int inode)
const;
143 KOKKOS_INLINE_FUNCTION
double get_r(
const int inode)
const;
145 KOKKOS_INLINE_FUNCTION
void get_rz_coordinates(
const int inode,
double& r,
double& z)
const;
170 Kokkos::View<double*,Kokkos::LayoutRight,Device>
psi;
171 Kokkos::View<double*,Kokkos::LayoutRight,Device>
bfield;
172 Kokkos::View<double*,Kokkos::LayoutRight,Device>
psi_surf2;
185 #ifdef NO_FORTRAN_MODULES
double inv_delta_phi
1/delta_phi
Definition: grid.hpp:163
VolumesAndAreas volumes_and_areas
Definition: grid.hpp:176
KOKKOS_INLINE_FUNCTION RZPair get_wall_rz(int i_wall) const
Definition: grid.tpp:294
Grid()
Definition: grid.hpp:32
Definition: gradient_matrices.hpp:9
bool axisymmetric
Definition: grid.hpp:151
Definition: grid_weights.hpp:73
Kokkos::View< double *, Kokkos::LayoutRight, Device > bfield
Magnetic field magnitude at nodes.
Definition: grid.hpp:171
int ntriangle
Number of grid triangles.
Definition: grid.hpp:158
double minval_psi_surf2
Definition: grid.hpp:167
KOKKOS_INLINE_FUNCTION bool node_is_in_private_region_no_wall(const int inode) const
Definition: grid.tpp:212
Definition: grid_weights.hpp:47
Definition: NamelistReader.hpp:193
Definition: magnetic_field.hpp:12
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:225
Definition: grid_files.hpp:731
KOKKOS_INLINE_FUNCTION void get_triangle_area_and_volume(const MagneticField< Device > &magnetic_field, int i, double &area, double &volume) const
Definition: grid.tpp:189
int nplanes
Number of planes.
Definition: grid.hpp:160
Definition: flux_surface_average.hpp:8
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:179
KOKKOS_INLINE_FUNCTION int uses_rz_basis(const int inode) const
Definition: grid.tpp:251
Kokkos::View< double *, Kokkos::LayoutRight, Device > psi_surf2
Definition: grid.hpp:172
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:161
int nwall
Definition: grid.hpp:164
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:170
KOKKOS_INLINE_FUNCTION void get_rz_coordinates(const int inode, double &r, double &z) const
Definition: grid.tpp:284
void write_to_file() const
Projection< HostType > ff_to_midplane
Definition: grid.hpp:182
int npsi_surf2
Definition: grid.hpp:166
KOKKOS_INLINE_FUNCTION int get_node_index(int triangle_index, int tri_vertex_index) const
Definition: grid.tpp:158
KOKKOS_INLINE_FUNCTION double get_r(const int inode) const
Definition: grid.tpp:263
Bounds get_local_wedge_bounds() const
Definition: grid.tpp:145
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:181
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
Projection< HostType > ff_rplane_to_neighbors
Definition: grid.hpp:180
KOKKOS_INLINE_FUNCTION double node_area_to_volume(const MagneticField< Device > &magnetic_field, double area, int node_index) const
Definition: grid.tpp:174
FluxSurfaceAverage< Device > fsa_matrices
Definition: grid.hpp:188
KOKKOS_INLINE_FUNCTION bool node_is_in_region_1_or_2_no_wall(const int inode) const
Definition: grid.tpp:202
Kokkos::View< int *, Kokkos::LayoutRight, Device > wall_nodes
Definition: grid.hpp:173
Definition: grid_weights.hpp:52
UniformRange psi00
Definition: grid.hpp:169
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:168
Plane< Device > midplane
Definition: grid.hpp:154
int nnode
Number of grid nodes.
Definition: grid.hpp:159
Plane< Device > lplane
Definition: grid.hpp:155
double delta_phi
Distance between planes.
Definition: grid.hpp:162
KOKKOS_INLINE_FUNCTION void psi_search(double psi, double &wp, int &ip) const
Definition: grid.tpp:17
Plane< Device > rplane
Definition: grid.hpp:156
KOKKOS_INLINE_FUNCTION bool node_is_in_region_1_or_2(const MagneticField< Device > &magnetic_field, const int inode) const
Definition: grid.tpp:239
KOKKOS_INLINE_FUNCTION bool node_is_in_region_2_or_3_no_wall(const int inode) const
Definition: grid.tpp:207