| 16 | }; |
| 17 | |
| 18 | void PrintUsage() |
| 19 | { |
| 20 | amrex::Print() |
| 21 | << "\n" |
| 22 | << " Compare two plotfiles, zone by zone, to machine precision\n" |
| 23 | << " and report the maximum absolute and relative errors for each\n" |
| 24 | << " variable.\n" |
| 25 | << "\n" |
| 26 | << " usage:\n" |
| 27 | << " fcompare [-n|--norm num] [-d|--diffvar var] [-z|--zone_info var] [-a|--allow_diff_grids] [-l|--allow_diff_num_levels] [-r|rel_tol] [--abs_tol] [--abort_if_not_all_found] file1 file2\n" |
| 28 | << "\n" |
| 29 | << " optional arguments:\n" |
| 30 | << " -n|--norm num : what norm to use (default is 0 for inf norm)\n" |
| 31 | << " -d|--diffvar var : output a plotfile showing the differences for\n" |
| 32 | << " variable var\n" |
| 33 | << " -z|--zone_info var : output the information for a zone corresponding\n" |
| 34 | << " to the maximum error for the given variable\n" |
| 35 | << " -a|--allow_diff_grids : allow different BoxArrays covering the same domain\n" |
| 36 | << " -l|--allow_diff_num_levels : allow different number of levels (only the levels in common will be compared)\n" |
| 37 | << " -r|--rel_tol rtol : relative tolerance (default is 0)\n" |
| 38 | << " --abs_tol atol : absolute tolerance (default is 0)\n" |
| 39 | << " --abort_if_not_all_found : abort if not all variables are present in both files\n" |
| 40 | << '\n'; |
| 41 | } |
| 42 | |
| 43 | int main_main() |
| 44 | { |