forked from christophersanborn/Radiative3D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
params.hpp
71 lines (63 loc) · 2.06 KB
/
params.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// params.hpp
//
// This file defines a number of "parameter" classes used to pass
// behavioral arguments in a simplified way. Useful when a large
// number of parameters needs to be passed to a function or class
// constructor, or otherwise handed around.
//
// Currently just defines the MissionParams class, but in future I may
// (or may not) move the ModelParams or other similar classes over to
// here.
//
// As a general rule, it's the parameter classes that I want the user
// to be able to control via the command line that I develop here, so
// that only this file needs to be included by the module where
// command-line processing occurs (most likely main.cpp). If a
// parameter class is used purely internally, it should be defined
// alongside the class that it parameterizes, rather than here.
//
//
#ifndef PARAMS_H_
#define PARAMS_H_
//
//////
// CLASSES: Definitions
//
// INCLUDING:
//
// o class MissionParams
//
//////
// CLASS: :::: MissionParams ::::
//
// Basically a set of flags encoding the actions desired by the user
// when they run the program. Usually, they just want to run the
// simulation, but sometimes they may want to run tests or diags.
//
class MissionParams {
public:
bool bRunSim; // Run simulation
bool bHelpMsg; // Print help message and exit
bool bDumpGrid; // Output grid as plaintext
bool bOutputModParamsOctv; // Output Model params in GNU/Octave format
bool bRTCoefTest; // Perform R/T coefficient test
bool bSourcePatternTest; // Inspect source patterns
std::string FNModParamsOctv; // Filename for octave model params
MissionParams() :
bRunSim (true),
bHelpMsg (false),
bDumpGrid (false),
bOutputModParamsOctv (false),
bRTCoefTest (false),
bSourcePatternTest (false),
FNModParamsOctv ("paramsout.octv")
{}
bool ModelBuildRequired() const {
// Return true if any flags indicate the need for a constructed
// Model object.
return (bRunSim || bDumpGrid);
}
};
///
#endif //#ifndef PARAMS_H_
//