| 5 | using namespace amrex; |
| 6 | |
| 7 | void 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 | |
| 31 | int main (int argc, char* argv[]) |
| 32 | { |