ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
para_pw_world.h
Go to the documentation of this file.
1#ifndef PARA_PW_WORLD_H
2#define PARA_PW_WORLD_H
3
4#include <vector>
5
6#include "para_world.h"
7
8namespace Parallel
9{
10
24class ParaPwWorld : public ParaWorld
25{
26public:
32 explicit ParaPwWorld(int npw);
33
34#ifdef __MPI
41 ParaPwWorld(const MPI_Comm& comm, const std::vector<int>& npw_per);
42#endif
43
45 int npw() const { return npw_; }
46
48 int npwtot() const { return npwtot_; }
49
51 int npw_per(int p) const;
52
54 int poolnproc() const { return size(); }
55
57 int poolrank() const { return rank(); }
58
59private:
60 int npw_ = 0;
61 int npwtot_ = 0;
62 std::vector<int> npw_per_;
63};
64
65} // namespace Parallel
66
67#endif // PARA_PW_WORLD_H
int npw_
local plane-wave count
Definition para_pw_world.h:60
int poolnproc() const
Number of processes in the pool (same as size()).
Definition para_pw_world.h:54
int npwtot() const
Total number of plane waves in the pool.
Definition para_pw_world.h:48
int npw() const
Number of plane waves on this process.
Definition para_pw_world.h:45
int npwtot_
total plane waves in pool
Definition para_pw_world.h:61
ParaPwWorld(int npw)
Construct a serial (single-process) pw domain.
Definition para_pw_world.cpp:9
std::vector< int > npw_per_
per-process plane-wave counts
Definition para_pw_world.h:62
int npw_per(int p) const
Number of plane waves on process p in the pool.
Definition para_pw_world.cpp:27
int poolrank() const
Rank within the pool (same as rank()).
Definition para_pw_world.h:57
MPI_Comm comm() const
Underlying MPI communicator (MPI builds only).
Definition para_world.h:60
int rank() const
Rank of this process inside the domain (0 in serial builds).
Definition para_world.h:39
ParaWorld(const std::string &tag)
Construct a serial (single-process) domain.
Definition para_world.cpp:6
int size() const
Number of processes in the domain (1 in serial builds).
Definition para_world.h:45
Definition para_band_output.cpp:11