XGC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
grid_structs.hpp
Go to the documentation of this file.
1 #ifndef GRID_STRUCTS_HPP
2 #define GRID_STRUCTS_HPP
3 
4 #include "simd.hpp"
5 
6 // The three points of a grid triangle
7 struct SimdGridVec{
9 
10  // Allows array-like access pattern
11  KOKKOS_INLINE_FUNCTION const Simd<double>& operator [](int i) const {return x[i];}
12  KOKKOS_INLINE_FUNCTION Simd<double>& operator [](int i) {return x[i];}
13 
16  KOKKOS_INLINE_FUNCTION void maxloc(Simd<int> &ml) const {
17  for (int i_simd = 0; i_simd<SIMD_SIZE; i_simd++){
18  ml[i_simd] = (x[1][i_simd] > x[0][i_simd]) ? 1 : 0;
19  ml[i_simd] = (x[2][i_simd] > x[0][i_simd] && x[2][i_simd] > x[1][i_simd]) ? 2 : ml[i_simd];
20  }
21  }
22 };
23 
24 struct Vertex {
25  int vertex[3];
26 };
27 
28 struct RZPair {
29  double r;
30  double z;
31 };
32 
33 struct VertexMap {
35 };
36 
37 #endif
Definition: grid_structs.hpp:33
Simd< double > x[3]
Definition: grid_structs.hpp:8
KOKKOS_INLINE_FUNCTION void maxloc(Simd< int > &ml) const
Definition: grid_structs.hpp:16
double z
Definition: grid_structs.hpp:30
Definition: grid_structs.hpp:28
Definition: grid_structs.hpp:24
Definition: grid_structs.hpp:7
double r
Definition: grid_structs.hpp:29
int vertex[3]
Definition: grid_structs.hpp:25
RZPair vertex[3]
Definition: grid_structs.hpp:34
KOKKOS_INLINE_FUNCTION const Simd< double > & operator[](int i) const
Definition: grid_structs.hpp:11