XGC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
flux_surface_average.hpp
Go to the documentation of this file.
1 #ifndef FLUX_SURFACE_AVERAGE_HPP
2 #define FLUX_SURFACE_AVERAGE_HPP
3 
4 #include "plane.hpp"
5 #include "volumes_and_areas.hpp"
6 
7 template<class Device>
11  View<double*, CLayout, Device> surf_vol;
12 
13  void wall_nodes_strikep_method(NLReader::NamelistReader& nlr, const MagneticField<DeviceType>& magnetic_field, const Plane<HostType>& plane, const PlaneFiles& plane_files, const View<double*,CLayout,HostType>& psi_surf, const View<int*,CLayout,DeviceType>& num_t_node, const View<int**,CLayout,DeviceType>& tr_node);
14 
15  public:
16 
18 
19  // Create a mirror with a different device type
20  template<class Device2>
23 
24  m.to_flux_surface = to_flux_surface.template mirror<Device2>();
25  m.from_flux_surface = from_flux_surface.template mirror<Device2>();
26 
27  m.surf_vol = my_mirror_view(surf_vol, Device2());
29 
30  return m;
31  }
32 
33  FluxSurfaceAverage(NLReader::NamelistReader& nlr, const MagneticField<DeviceType>& magnetic_field, const Plane<HostType>& plane, const PlaneFiles& plane_files, const VolumesAndAreas& volumes_and_areas, const View<int*,CLayout,DeviceType>& num_t_node, const View<int**,CLayout,DeviceType>& tr_node);
34 
35  void average(const View<double*, CLayout, Device>& array) const;
36 };
37 
38 
39 template<class Device>
40 void flux_surface_average(const View<double*, CLayout, Device>& input_view, const View<double*, CLayout, HostType>& output_view, const View<double*, CLayout, HostType>& tmp00_surf);
41 
42 template<class Device>
43 void flux_surface_average(const View<double*, CLayout, Device>& input_view, const View<double*, CLayout, HostType>& output_view);
44 
45 template<class Device>
46 void flux_surface_average_in_place(const View<double*, CLayout, Device>& input_view, View<double*, CLayout, HostType>& tmp, View<double*, CLayout, HostType>& tmp00_surf);
47 
48 template<class Device>
49 void flux_surface_average_in_place(const View<double*, CLayout, Device>& input_view);
50 
51 template<class Device>
52 void flux_surface_average_in_place(const View<double**, CLayout, Device>& input_view);
53 
54 #endif
FluxSurfaceAverage()
Definition: flux_surface_average.hpp:17
Matrix< Device > to_flux_surface
Definition: flux_surface_average.hpp:9
void mirror_copy(T1 &view_dest, const T2 &view_src)
Definition: my_mirror_view.hpp:122
void wall_nodes_strikep_method(NLReader::NamelistReader &nlr, const MagneticField< DeviceType > &magnetic_field, const Plane< HostType > &plane, const PlaneFiles &plane_files, const View< double *, CLayout, HostType > &psi_surf, const View< int *, CLayout, DeviceType > &num_t_node, const View< int **, CLayout, DeviceType > &tr_node)
Definition: NamelistReader.hpp:193
Definition: magnetic_field.hpp:13
Definition: flux_surface_average.hpp:8
Definition: plane.hpp:17
Matrix< Device > from_flux_surface
Definition: flux_surface_average.hpp:10
Definition: volumes_and_areas.hpp:14
void flux_surface_average(const View< double *, CLayout, Device > &input_view, const View< double *, CLayout, HostType > &output_view, const View< double *, CLayout, HostType > &tmp00_surf)
Definition: flux_surface_average.cpp:339
void flux_surface_average_in_place(const View< double *, CLayout, Device > &input_view, View< double *, CLayout, HostType > &tmp, View< double *, CLayout, HostType > &tmp00_surf)
Definition: flux_surface_average.cpp:362
FluxSurfaceAverage< Device2 > mirror() const
Definition: flux_surface_average.hpp:21
Definition: matrix.hpp:11
View< double *, CLayout, Device > surf_vol
Definition: flux_surface_average.hpp:11
View< T *, CLayout, Device > my_mirror_view(const View< T *, CLayout, Device > &view, Device nd)
Definition: my_mirror_view.hpp:14
Definition: magnetic_field.F90:1
Definition: grid_files.hpp:21
void average(const View< double *, CLayout, Device > &array) const
Definition: flux_surface_average.cpp:327