XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 #ifdef USE_MPI
19  // MPI communicators etc
20  const MyMPI mpi;
21 #endif
22 
23  // Updater
24  void update_pol_decomp();
25 
26  // Constants
27  bool pol_decomp;
30  int n_pids;
31  int my_pid;
33 
36 
37  // Variables
38  int first_node;
39  int nnodes;
40 
41  // Views
42  Kokkos::View<int*,Kokkos::LayoutRight,HostType> gvid0_pid_h;
43  Kokkos::View<int*,Kokkos::LayoutRight,Device> gvid0_pid;
44  Kokkos::View<int*,Kokkos::LayoutRight,HostType> gvid0_pid_old_h;
45 };
46 
47 #include "domain_decomposition.tpp"
48 #endif
bool decompose_fields
Whether to decompose fields.
Definition: domain_decomposition.hpp:34
int plane_totalpe
Processors per plane?
Definition: domain_decomposition.hpp:29
Definition: NamelistReader.hpp:163
Kokkos::View< int *, Kokkos::LayoutRight, HostType > gvid0_pid_old_h
Which processors had which vertices (host)
Definition: domain_decomposition.hpp:44
void update_pol_decomp()
Definition: domain_decomposition.tpp:96
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:39
int my_pid
ID of this processor.
Definition: domain_decomposition.hpp:31
int pe_per_plane
Processors per plane.
Definition: domain_decomposition.hpp:28
Definition: my_mpi.hpp:17
int n_pids
Processors per plane?
Definition: domain_decomposition.hpp:30
Definition: field_decomposition.hpp:12
Kokkos::View< int *, Kokkos::LayoutRight, Device > gvid0_pid
Which processors get which vertices.
Definition: domain_decomposition.hpp:43
int my_plane_pid
Poloidal ID of this processor.
Definition: domain_decomposition.hpp:32
Definition: domain_decomposition.hpp:12
FieldDecomposition< Device > field_decomp
Definition: domain_decomposition.hpp:35
int first_node
First mesh node belonging to this MPI rank.
Definition: domain_decomposition.hpp:38
bool pol_decomp
Use poloidal decomposition.
Definition: domain_decomposition.hpp:27
Kokkos::View< int *, Kokkos::LayoutRight, HostType > gvid0_pid_h
Which processors get which vertices (host)
Definition: domain_decomposition.hpp:42