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

Function main_main

Tools/Plotfile/ftime.cpp:7–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5using namespace amrex;
6
7void main_main()
8{
9 const int narg = amrex::command_argument_count();
10
11 if (narg == 0) {
12 amrex::Print()
13 << "\n"
14 << " Usage:\n"
15 << " ftime plotfile\n"
16 << "\n"
17 << " Description:\n"
18 << " This program takes a whitespace-separated list of plotfiles and\n"
19 << " returns the time for each plotfile.\n"
20 << '\n';
21 return;
22 }
23
24 for (int f = 1; f <= narg; ++f) {
25 const auto& fname = amrex::get_command_argument(f);
26 PlotFileData plotfile(fname);
27 amrex::Print().SetPrecision(17) << fname << " " << plotfile.time() << '\n';
28 }
29}
30
31int main (int argc, char* argv[])
32{

Callers 1

mainFunction · 0.70

Calls 2

PrintClass · 0.85
timeMethod · 0.45

Tested by

no test coverage detected