ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
parameter.h
Go to the documentation of this file.
1#ifndef PARAMETER_H
2#define PARAMETER_H
3#include "input_parameter.h"
4#include "system_parameter.h"
5namespace ModuleIO
6{
7 class ReadInput;
8}
9
10namespace elecstate
11{
12 class ParamUpdater;
13}
14
16{
17 public:
18 // Construct a new Parameter object
20 // Destruct the Parameter object
22
23 public:
24 // ---------------------------------------------------------------
25 // -------------- Getters ----------------
26 // ---------------------------------------------------------------
27
28 // We can only read the value of input, but cannot modify it.
30 // We can only read the value of mdp, but cannot modify it.
31 const MD_para& mdp = input.mdp;
32 // We can only read the value of globalv parameters, but cannot modify it.
34
35 // Set the rank & nproc & nthreads_per_proc
36 // changed from set_rank_nproc in 2024-1018
37 void set_pal_param(const int& myrank, const int& nproc, const int& nthread_per_proc);
38 // Set the start time
39 void set_start_time(const std::time_t& start_time);
40 private:
41 friend class ModuleIO::ReadInput; // ReadInput read INPUT file and give the value to Parameter
42 friend class elecstate::ParamUpdater; // ParamUpdater updates Parameter values from atoms_info
43 friend class TestParameters; // TestParameters modifies Parameter values for unit tests
44
45 // INPUT parameters
47 // System parameters
49};
50
51extern Parameter PARAM;
52
53// temperarily put here
54namespace GlobalV
55{
56 extern int NPROC;
57 extern int MY_RANK;
58 extern std::ofstream ofs_running;
59 extern std::ofstream ofs_warning;
60} // namespace GlobalV
61#endif
Definition read_input.h:14
Definition parameter.h:16
Input_para input
Definition parameter.h:46
const Input_para & inp
Definition parameter.h:29
Parameter()
Definition parameter.h:19
~Parameter()
Definition parameter.h:21
const MD_para & mdp
Definition parameter.h:31
void set_pal_param(const int &myrank, const int &nproc, const int &nthread_per_proc)
Definition parameter.cpp:6
System_para sys
Definition parameter.h:48
const System_para & globalv
Definition parameter.h:33
void set_start_time(const std::time_t &start_time)
Definition parameter.cpp:13
friend class TestParameters
Definition parameter.h:43
Definition param_update.h:8
Definition global_variable.cpp:14
int NPROC
global number of process
Definition global_variable.cpp:19
int MY_RANK
global index of process
Definition global_variable.cpp:21
std::ofstream ofs_warning
Definition global_variable.cpp:39
Internal helpers shared by the R-space sparse text writers. Declared here (instead of duplicated in e...
Definition csr_reader.cpp:8
Definition read_atoms_hlp_test.cpp:13
Parameter PARAM
Definition parameter.cpp:3
Definition input_parameter.h:13
input parameters used in md
Definition md_parameter.h:12
Definition system_parameter.h:7