| 12 | using namespace amrex; |
| 13 | |
| 14 | void PrintUsage () |
| 15 | { |
| 16 | amrex::Print() |
| 17 | << "\n" |
| 18 | << " Compute gradient of variables in a given plofile. The results are saved in a\n" |
| 19 | << " new plotfile.\n" |
| 20 | << "\n" |
| 21 | << " Usage:\n" |
| 22 | << " fgradient [-o outfile] [-v varnames] [-xlo xlo_bc] [-ylo ylo_bc]\n" |
| 23 | << " [-zlo zlo_bc] [-xhi xhi_bc] [-yhi yhi_bc] [-zhi zhi_bc]\n" |
| 24 | << " [-i interp] plotfile\n" |
| 25 | << "\n" |
| 26 | << " optional arguments:\n" |
| 27 | << " -o|--output outfile\n" |
| 28 | << " Gradient plotfile name. If it's not provided, it is grad.PLOTFILE,\n" |
| 29 | << " where PLOTFILE is the original plotfile name.\n" |
| 30 | << "\n" |
| 31 | << " -v|--variables varnames\n" |
| 32 | << " Variable names separated by spaces. If there are multiple names,\n" |
| 33 | << " they must be inside a pair of double quotes. If not provided, all\n" |
| 34 | << " variables in the plotfile are included.\n" |
| 35 | << "\n" |
| 36 | << " -xlo|--xlo_boundary xlo_bc\n" |
| 37 | << " Domain boundary conditions at x-lo. Choices are\n" |
| 38 | << " reflect_odd : reflecting odd\n" |
| 39 | << " reflect_even : reflecting even\n" |
| 40 | << " foextrap : first-order extrapolation\n" |
| 41 | << " hoextrap : second-order extrapolation.\n" |
| 42 | << " periodic : periodic boundary.\n" |
| 43 | << " One could provide either different BC types for different\n" |
| 44 | << " variables or just one type for all variables. If not provided, the\n" |
| 45 | << " default is hoextrap, equivalent to one-sided derivative.\n" |
| 46 | << "\n" |
| 47 | << " -ylo|--ylo_boundary ylo_bc\n" |
| 48 | << " Domain boundary conditions at y-lo.\n" |
| 49 | << "\n" |
| 50 | << " -zlo|--zlo_boundary zlo_bc\n" |
| 51 | << " Domain boundary conditions at z-lo.\n" |
| 52 | << "\n" |
| 53 | << " -xhi|--xhi_boundary xhi_bc\n" |
| 54 | << " Domain boundary conditions at x-hi.\n" |
| 55 | << "\n" |
| 56 | << " -yhi|--yhi_boundary yhi_bc\n" |
| 57 | << " Domain boundary conditions at y-hi.\n" |
| 58 | << "\n" |
| 59 | << " -zhi|--zhi_boundary zhi_bc\n" |
| 60 | << " Domain boundary conditions at z-hi.\n" |
| 61 | << "\n" |
| 62 | << " -i|--interpolater interp\n" |
| 63 | << " Interpolation from coarse to fine level. Choices are 0 (default)\n" |
| 64 | << " or 1, where 0 is amrex::cell_cons_interp (conservative linear)\n" |
| 65 | << " and 1 is amrex::pc_interp (piecewise constant).\n" |
| 66 | << "\n" |
| 67 | << " -h|--help\n" |
| 68 | << " Print usage.\n" |
| 69 | << "\n"; |
| 70 | } |
| 71 | |