Debian Codegraph @

examples/simulations/heatTransfer/read/ReadSettings.h

raw
1 /*
2 * SPDX-FileCopyrightText: 2026 Oak Ridge National Laboratory and Contributors
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7 #ifndef READSETTINGS_H_
8 #define READSETTINGS_H_
9
10 #include <string>
11 #include <vector>
12
13 class ReadSettings
14 {
15
16 public:
17 // user arguments
18 std::string configfile;
19 std::string inputfile;
20 std::string outputfile;
21 unsigned int npx; // Number of processes in X (slow) dimension
22 unsigned int npy; // Number of processes in Y (fast) dimension
23
24 int rank;
25 int nproc;
26
27 // Calculated in constructor
28 unsigned int posx; // Position of this process in X dimension
29 unsigned int posy; // Position of this process in Y dimension
30
31 // Calculated in DecomposeArray
32 std::vector<size_t> readsize; // Local array size in X-Y dimensions per process
33 std::vector<size_t> offset; // Offset of local array in X-Y dimensions on this process
34
35 ReadSettings(int argc, char *argv[], int rank, int nproc);
36 void DecomposeArray(int gndx, int gndy);
37 };
38
39 #endif /* READSETTINGS_H_ */