Skip to content

Commit 52f3694

Browse files
committed
added array access functions to Field class
1 parent d4ffaaf commit 52f3694

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/MeshField.hpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,21 @@ class Field {
1919
auto& access(int s, int a) const {
2020
return slice.access(s,a);
2121
}
22-
22+
23+
KOKKOS_INLINE_FUNCTION
24+
auto& access(int s, int a, int i) const {
25+
return slice.access(s,a,i);
26+
}
27+
28+
KOKKOS_INLINE_FUNCTION
29+
auto& access(int s, int a, int i, int j) const {
30+
return slice.access(s,a,i,j);
31+
}
32+
33+
KOKKOS_INLINE_FUNCTION
34+
auto& access(int s, int a, int i, int j, int k) const {
35+
return slice.access(s,a,i,j,k);
36+
}
2337
};
2438

2539
template <class Controller>

0 commit comments

Comments
 (0)