XGC1
grid_stomms.hpp
Go to the documentation of this file.
1 #ifndef GRID_STOMMS_HPP
2 #define GRID_STOMMS_HPP
3 
4 #include "grid_files.hpp"
5 
6 #ifdef USE_STOMMS_GRID
7 
8 #include "xgc_reader_interface.hpp" // Mesh reader
9 
10 class PlaneFilesFromStommsMesh: public PlaneFilesBase{
11  public:
12  PlaneFilesFromStommsMesh(const std::string& stomms_mesh_file, const MPI_Comm& comm);
13 
14  // Functions
15  int get_nnodes() const override;
16  View<RZPair*, HostType> get_x() const override;
17  View<int*, HostType> get_rgn() const override;
18 
19  int get_ntriangles() const override;
20  View<Vertex*, HostType> get_nodes() const override;
21 
22  View<int*, HostType> get_i_x() const override;
23 
24  int get_nsurfaces() const override;
25  int get_nsurfaces1() const override;
26  int get_nsurfaces2() const override;
27  int get_nsurfaces3a() const override;
28  int get_nsurfaces3b() const override;
29  View<int*, HostType> get_i_surf_separatrices() const override;
30  View<int*, HostType> get_nnodes_on_surface() const override;
31  int get_sum_nnodes_on_surfaces() const override;
32  int get_num_non_aligned() const override;
33  View<int*, HostType> get_non_aligned_vert() const override;
34  View<int*, HostType> get_non_aligned_nsurf() const override;
35  View<int**, CLayout, HostType> get_non_aligned_surf_idx() const override;
36  View<int**, CLayout, HostType> get_surf_idx() const override;
37 
38  int n_specified_xpts() const override;
39  View<Equil::XPoint*, HostType> get_xpts() const override;
40  RZPair get_axis() const override;
41  RZPair get_reference_point() const override;
42  View<double*, HostType> get_psiN() const override;
43 
44  private:
45  // Data Members
46  XgcMesh xgc_mesh;
47  View<int*, HostType> axis;
48 
49  // Functions
50  void write_nodes_in_x_rgn_format(Omega_h::Mesh omegah_mesh, View<RZPair*, HostType>& x, View<int*, HostType>& rgn, const int& plane_num);
51  void write_triangles_in_node_format(Omega_h::Mesh omegah_mesh,View<Vertex*, HostType>& nodes);
52  int read_node_rgn(const int& node_id, const int& plane_num);
53  std::map <CurveIdType, std::vector<MeshIdType>> get_nodes_at_curves(const int& plane_num);
54 };
55 
56 #endif // end of USE_STOMMS_GRID guard
57 
58 #endif
Definition: grid_files.hpp:51
virtual View< int *, HostType > get_rgn() const =0
virtual int get_nsurfaces3a() const =0
virtual View< int **, CLayout, HostType > get_non_aligned_surf_idx() const =0
virtual int get_nsurfaces1() const =0
virtual int n_specified_xpts() const =0
virtual int get_nsurfaces3b() const =0
virtual View< RZPair *, HostType > get_x() const =0
virtual int get_nsurfaces() const =0
virtual int get_nnodes() const =0
virtual View< int *, HostType > get_non_aligned_nsurf() const =0
virtual RZPair get_reference_point() const =0
virtual View< Vertex *, HostType > get_nodes() const =0
virtual int get_ntriangles() const =0
virtual int get_num_non_aligned() const =0
virtual View< int *, HostType > get_nnodes_on_surface() const =0
virtual View< Equil::XPoint *, HostType > get_xpts() const =0
virtual View< int *, HostType > get_i_surf_separatrices() const =0
virtual int get_sum_nnodes_on_surfaces() const =0
virtual RZPair get_axis() const =0
virtual View< double *, HostType > get_psiN() const =0
virtual View< int **, CLayout, HostType > get_surf_idx() const =0
virtual View< int *, HostType > get_i_x() const =0
virtual int get_nsurfaces2() const =0
virtual View< int *, HostType > get_non_aligned_vert() const =0
Definition: grid_structs.hpp:28