XGC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gradparx2.hpp
Go to the documentation of this file.
1 #ifndef GRADPARX2_HPP
2 #define GRADPARX2_HPP
3 
4 #include "globals.hpp"
5 #include "grid.hpp"
6 #include "boundary.hpp"
7 
8 struct GradParXTmp{
9  double sgn;
12  View<int*,CLayout,DeviceType> is_inside;
13 
15 
16  GradParXTmp(const Grid<DeviceType>& grid, const Boundary& boundary, double sml_bt_sign)
17  : sgn(-(sml_bt_sign<0.0 ? -1.0 : 1.0)), // Reverse sign since negative gradient is desired
18  lplane_to_neighbors(grid.ff_lplane_to_neighbors.template mirror<DeviceType>()),
19  rplane_to_neighbors(grid.ff_rplane_to_neighbors.template mirror<DeviceType>()),
20  is_inside(NoInit("is_inside"),grid.nnode)
21 
22  {
23  // get is_inside for every node
25  }
26 };
27 
28 void negative_gradparx2(const GradParXTmp& gptx, const View<double**,CLayout,DeviceType>& input, const View<double**,CLayout,DeviceType>& output, Order derivative_order);
29 
30 #endif
void negative_gradparx2(const GradParXTmp &gpxt, const Kokkos::View< double **, Kokkos::LayoutRight, DeviceType > &input, const Kokkos::View< double **, Kokkos::LayoutRight, DeviceType > &output, Order derivative_order)
Definition: gradparx2.cpp:97
GradParXTmp()
Definition: gradparx2.hpp:14
double sgn
Definition: gradparx2.hpp:9
Definition: gradparx2.hpp:8
View< int *, CLayout, DeviceType > is_inside
Definition: gradparx2.hpp:12
Definition: boundary.hpp:85
Order
Definition: globals.hpp:77
Projection< DeviceType > lplane_to_neighbors
Definition: gradparx2.hpp:10
View< int *, CLayout, Device > get_view_int_not_in_list(int nnode_in) const
Definition: vertex_list.hpp:185
Kokkos::Device< ExSpace, MemSpace > DeviceType
Definition: space_settings.hpp:48
int nnode
Number of grid nodes.
Definition: grid.hpp:159
GradParXTmp(const Grid< DeviceType > &grid, const Boundary &boundary, double sml_bt_sign)
Definition: gradparx2.hpp:16
Kokkos::ViewAllocateWithoutInitializing NoInit
Definition: space_settings.hpp:69
Projection< DeviceType > rplane_to_neighbors
Definition: gradparx2.hpp:11