MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / main_main

Function main_main

Tools/Plotfile/fgradient.cpp:72–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72void main_main()
73{
74 const int narg = amrex::command_argument_count();
75
76 std::string pltfile;
77 std::string outfile;
78 std::string varnames_arg;
79 std::string xlobc_arg;
80 std::string xhibc_arg;
81 std::string ylobc_arg;
82 std::string yhibc_arg;
83 std::string zlobc_arg;
84 std::string zhibc_arg;
85 int interpolater = 0;
86 bool print_help = false;
87
88 int farg = 1;
89 while (farg <= narg) {
90 const std::string& name = amrex::get_command_argument(farg);
91 if (name == "-o" || name == "--output") {
92 outfile = amrex::get_command_argument(++farg);
93 } else if (name == "-v" || name == "--variables") {
94 varnames_arg = amrex::get_command_argument(++farg);
95 } else if (name == "-xlo" || name == "--xlo_boundary") {
96 xlobc_arg = amrex::get_command_argument(++farg);
97 } else if (name == "-xhi" || name == "--xhi_boundary") {
98 xhibc_arg = amrex::get_command_argument(++farg);
99 } else if (name == "-ylo" || name == "--ylo_boundary") {
100 ylobc_arg = amrex::get_command_argument(++farg);
101 } else if (name == "-yhi" || name == "--yhi_boundary") {
102 yhibc_arg = amrex::get_command_argument(++farg);
103 } else if (name == "-zlo" || name == "--zlo_boundary") {
104 zlobc_arg = amrex::get_command_argument(++farg);
105 } else if (name == "-zhi" || name == "--zhi_boundary") {
106 zhibc_arg = amrex::get_command_argument(++farg);
107 } else if (name == "-i" || name == "--interpolater") {
108 interpolater = std::stoi(amrex::get_command_argument(++farg));
109 } else if (name == "-h" || name == "--help") {
110 print_help = true;
111 } else {
112 break;
113 }
114 ++farg;
115 }
116
117 if (farg <= narg) {
118 pltfile = amrex::get_command_argument(farg);
119 }
120
121 if (pltfile.empty() || print_help) {
122 PrintUsage();
123 return;
124 }
125
126 if (pltfile.back() == '/') {
127 pltfile.pop_back();
128 }
129

Callers 1

mainFunction · 0.70

Calls 15

AbortFunction · 0.85
FillPatchSingleLevelFunction · 0.85
FillPatchTwoLevelsFunction · 0.85
TilingIfNotGPUFunction · 0.85
WriteMultiLevelPlotfileFunction · 0.85
GetVecOfConstPtrsFunction · 0.85
DistributionMapMethod · 0.80
tileboxMethod · 0.80
PrintUsageFunction · 0.70
RealBoxClass · 0.50
ParallelForFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected