XGC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
domain_decomposition.hpp
Go to the documentation of this file.
1 #ifndef DOMAIN_DECOMPOSITION_HPP
2 #define DOMAIN_DECOMPOSITION_HPP
3 #include "space_settings.hpp"
4 #include "NamelistReader.hpp"
5 #ifdef USE_MPI
6 # include "my_mpi.hpp"
7 #endif
9 
10 // Decomposition class
11 template<class Device>
13  public:
14 
15  // Constructor
16  DomainDecomposition(NLReader::NamelistReader& nlr, int nplanes, int nnodes);
17 
18  DomainDecomposition(int nranks_in);
19 
20 #ifdef USE_MPI
21  // MPI communicators etc
22  const MyMPI mpi;
23 #endif
24 
25  // Updater
26  void update_pol_decomp();
27 
28  // Constants
29  bool pol_decomp;
32  int n_pids;
33  int my_pid;
36 
39 
40  // Variables
42  int nnodes;
43 
44  // Views
45  Kokkos::View<int*,Kokkos::LayoutRight,HostType> gvid0_pid_h;
46  Kokkos::View<int*,Kokkos::LayoutRight,Device> gvid0_pid;
47 };
48 
49 #include "domain_decomposition.tpp"
50 #endif
bool decompose_fields
Whether to decompose fields.
Definition: domain_decomposition.hpp:37
int plane_totalpe
Processors per plane?
Definition: domain_decomposition.hpp:31
int plane_index
Offset of local plane.
Definition: domain_decomposition.hpp:35
Definition: NamelistReader.hpp:193
int node_offset
Offset of first mesh node belonging to this MPI rank.
Definition: domain_decomposition.hpp:41
void update_pol_decomp()
Definition: domain_decomposition.tpp:103
DomainDecomposition(NLReader::NamelistReader &nlr, int nplanes, int nnodes)
Definition: domain_decomposition.tpp:14
int nnodes
Number of nodes belonging to this MPI rank.
Definition: domain_decomposition.hpp:42
int my_pid
ID of this processor.
Definition: domain_decomposition.hpp:33
int pe_per_plane
Processors per plane.
Definition: domain_decomposition.hpp:30
Definition: my_mpi.hpp:19
int n_pids
Processors per plane?
Definition: domain_decomposition.hpp:32
Definition: field_decomposition.hpp:12
Kokkos::View< int *, Kokkos::LayoutRight, Device > gvid0_pid
Which processors get which vertices.
Definition: domain_decomposition.hpp:46
int my_plane_pid
Poloidal ID of this processor.
Definition: domain_decomposition.hpp:34
Definition: domain_decomposition.hpp:12
FieldDecomposition< Device > field_decomp
Definition: domain_decomposition.hpp:38
bool pol_decomp
Use poloidal decomposition.
Definition: domain_decomposition.hpp:29
Kokkos::View< int *, Kokkos::LayoutRight, HostType > gvid0_pid_h
Which processors get which vertices (host)
Definition: domain_decomposition.hpp:45