MCPcopy Create free account
hub / github.com/AMReX-Astro/Castro / ScanArguments

Function ScanArguments

Util/ConvertCheckpoint/Embiggen.cpp:111–148  ·  view source on GitHub ↗

---------------------------------------------------------------

Source from the content-addressed store, hash-verified

109
110// ---------------------------------------------------------------
111static void ScanArguments() {
112 ParmParse pp;
113
114 if(pp.contains("checkin")) {
115 pp.get("checkin", CheckFileIn);
116 }
117 if(pp.contains("checkout")) {
118 pp.get("checkout", CheckFileOut);
119 }
120 if(pp.contains("nfiles")) {
121 pp.get("nfiles", nFiles);
122 }
123 if(pp.contains("verbose")) {
124 pp.get("verbose", verbose);
125 }
126 if(pp.contains("ref_ratio")) {
127 pp.get("ref_ratio", ref_ratio);
128 }
129
130 if(pp.contains("grown_factor")) {
131 pp.get("grown_factor", grown_factor);
132 }
133
134 pp.get("star_at_center", star_at_center);
135
136 if (star_at_center != 0 && star_at_center != 1)
137 amrex::Abort("star_at_center must be 0 or 1");
138
139 if (ref_ratio != 2 && ref_ratio != 4)
140 amrex::Abort("ref_ratio must be 2 or 4");
141
142 if (grown_factor <= 1)
143 amrex::Abort("must have grown_factor > 1");
144
145 if (star_at_center == 1)
146 if (grown_factor != 2 && grown_factor != 3)
147 amrex::Abort("must have grown_factor = 2 or 3 for star at center");
148}
149
150// ---------------------------------------------------------------
151static void PrintUsage (char *progName) {

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected