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;
96 KOKKOS_INLINE_FUNCTION
void psi_search(
double psi,
double &wp,
int &ip)
const;
98 template<PhiInterpType PIT>
101 template<PhiInterpType PIT>
104 template<PhiInterpType PIT>
107 template<PhiInterpType PIT>
110 template<PhiInterpType PIT>
113 template<PhiInterpType PIT>
116 template<PhiInterpType PIT>
119 template<PhiInterpType PIT>
122 template<PhiInterpType PIT>
137 KOKKOS_INLINE_FUNCTION
int get_node_index(
int triangle_index,
int tri_vertex_index)
const;
151 template<
class Device2>
154 KOKKOS_INLINE_FUNCTION
int uses_rz_basis(
const int inode)
const;
156 KOKKOS_INLINE_FUNCTION
double get_r(
const int inode)
const;
158 KOKKOS_INLINE_FUNCTION
void get_rz_coordinates(
const int inode,
double& r,
double& z)
const;
164 KOKKOS_INLINE_FUNCTION
int get_ip(
const int inode)
const;
185 Kokkos::View<double*,Kokkos::LayoutRight,Device>
psi;
186 Kokkos::View<double*,Kokkos::LayoutRight,Device>
bfield;
187 Kokkos::View<double*,Kokkos::LayoutRight,Device>
psi_surf2;
200 #ifdef NO_FORTRAN_MODULES
Definition: flux_surface_average.hpp:8
int npsi_surf2
Definition: grid.hpp:181
KOKKOS_INLINE_FUNCTION void get_grid_weights(const MagneticField< Device > &magnetic_field, const SimdVector &v, SimdVector2D &xff, SimdGridWeights< Order::One, PIT > &grid_wts) const
KOKKOS_INLINE_FUNCTION bool node_is_in_region_1_or_2(const MagneticField< Device2 > &magnetic_field, const int inode) const
Definition: grid.tpp:254
KOKKOS_INLINE_FUNCTION bool node_is_inside_psi_range(const MagneticField< Device > &magnetic_field, const int node) const
Definition: grid.tpp:134
FluxSurfaceAverage< Device > fsa_matrices
Definition: grid.hpp:203
Bounds get_local_wedge_bounds() const
Definition: grid.tpp:159
KOKKOS_INLINE_FUNCTION bool node_is_in_region_2_or_3_no_wall(const int inode) const
Definition: grid.tpp:221
double maxval_psi_surf2
Definition: grid.hpp:183
Grid< Device2 > mirror() const
Definition: grid.hpp:36
bool axisymmetric
Definition: grid.hpp:166
Kokkos::View< double *, Kokkos::LayoutRight, Device > psi
An array of psi coordinates.
Definition: grid.hpp:185
double delta_phi
Distance between planes.
Definition: grid.hpp:177
VolumesAndAreas volumes_and_areas
Definition: grid.hpp:191
Grid()
Definition: grid.hpp:32
KOKKOS_INLINE_FUNCTION double node_area_to_volume(const MagneticField< Device > &magnetic_field, double area, int node_index) const
Definition: grid.tpp:188
Kokkos::View< double *, Kokkos::LayoutRight, Device > psi_surf2
Definition: grid.hpp:187
int nwall
Definition: grid.hpp:179
KOKKOS_INLINE_FUNCTION void get_rz_coordinates(const int inode, double &r, double &z) const
Definition: grid.tpp:299
HostArray< VertexList > flux_surfaces_h
Definition: grid.hpp:204
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:120
KOKKOS_INLINE_FUNCTION int get_plane_index(double phi) const
Definition: grid.tpp:147
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:176
Grid(NLReader::NamelistReader &nlr, const GridFiles &grid_files, const DomainDecomposition< DeviceType > &pol_decomp, const MagneticField< DeviceType > &magnetic_field)
Projection< HostType > ff_to_midplane
Definition: grid.hpp:197
Plane< Device > lplane
Definition: grid.hpp:170
Projection< HostType > half_plane_ff
Definition: grid.hpp:194
KOKKOS_INLINE_FUNCTION void nearest_node(const SimdGridWeights< Order::One, PIT > &grid_wts, SimdGridWeights< Order::Zero, PIT > &grid_wts0) const
Definition: grid.tpp:64
int ntriangle
Number of grid triangles.
Definition: grid.hpp:173
KOKKOS_INLINE_FUNCTION void get_triangle_area_and_volume(const MagneticField< Device > &magnetic_field, int i, double &area, double &volume) const
Definition: grid.tpp:203
KOKKOS_INLINE_FUNCTION double get_r(const int inode) const
Definition: grid.tpp:278
KOKKOS_INLINE_FUNCTION void psi_search(double psi, double &wp, int &ip) const
Definition: grid.tpp:17
Projection< HostType > ff_lplane_to_neighbors
Definition: grid.hpp:196
Kokkos::View< double *, Kokkos::LayoutRight, Device > bfield
Magnetic field magnitude at nodes.
Definition: grid.hpp:186
KOKKOS_INLINE_FUNCTION void wedge_modulo_phi(Simd< double > &phi_mod) const
Definition: grid.tpp:100
void psi_surf_region_check(const MagneticField< DeviceType > &magnetic_field, const PlaneFilesInterface &right_plane_files)
int nplanes
Number of planes.
Definition: grid.hpp:175
Kokkos::View< int *, Kokkos::LayoutRight, Device > wall_nodes
Definition: grid.hpp:188
Projection< HostType > ff_rplane_to_neighbors
Definition: grid.hpp:195
KOKKOS_INLINE_FUNCTION bool node_is_in_private_region_no_wall(const int inode) const
Definition: grid.tpp:226
double inv_delta_phi
1/delta_phi
Definition: grid.hpp:178
void write_to_file(const DomainDecomposition< DeviceType > &pol_decomp, MagneticEquilFiles::Ptr equil_files_ptr, bool is_stellarator) const
double minval_psi_surf2
Definition: grid.hpp:182
Plane< Device > rplane
Definition: grid.hpp:171
KOKKOS_INLINE_FUNCTION bool node_is_in_included_region(const int inode, const bool exclude_private_region) const
Definition: grid.tpp:239
KOKKOS_INLINE_FUNCTION int uses_rz_basis(const int inode) const
Definition: grid.tpp:266
KOKKOS_INLINE_FUNCTION int get_node_index(int triangle_index, int tri_vertex_index) const
Definition: grid.tpp:172
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
KOKKOS_INLINE_FUNCTION bool node_is_in_region_1_or_2_no_wall(const int inode) const
Definition: grid.tpp:216
KOKKOS_INLINE_FUNCTION RZPair get_wall_rz(int i_wall) const
Definition: grid.tpp:309
int nnode
Number of grid nodes.
Definition: grid.hpp:174
UniformRange psi00
Definition: grid.hpp:184
Plane< Device > midplane
Definition: grid.hpp:169
KOKKOS_INLINE_FUNCTION int get_ip(const int inode) const
Definition: grid.tpp:319
size_t size() const
Definition: host_array.hpp:78
Definition: magnetic_field.hpp:12
Definition: NamelistReader.hpp:193
Definition: grid_files.hpp:13
real(8), parameter phi
Definition: load_balance_constraint_mod.F90:18
Definition: magnetic_field.F90:1
Definition: gradient_matrices.hpp:9
Definition: grid_files.hpp:157
std::shared_ptr< MagneticEquilFiles > Ptr
Definition: magnetic_equil_files.hpp:11
Definition: grid_structs.hpp:28
Definition: grid_weights.hpp:73
Definition: grid_weights.hpp:52
Definition: grid_weights.hpp:47
Definition: volumes_and_areas.hpp:8