@@ -71,41 +71,50 @@ end subroutine getcmd
71
71
! +-------------------------------------------------------------------+
72
72
! | The end of the subroutine getcmd. |
73
73
! +-------------------------------------------------------------------+
74
- !
75
- ! +-------------------------------------------------------------------+
76
- ! | This subroutine is to list all command that is predefined. |
77
- ! +-------------------------------------------------------------------+
74
+ ! !+-------------------------------------------------------------------+
75
+ ! | Subroutine: listcmd |
76
+ ! | |
77
+ ! | Purpose: |
78
+ ! | This subroutine prints out a list of all predefined |
79
+ ! | command-line options available in the ASTR code. |
80
+ ! | Only the root MPI rank (rank 0) performs the output. |
81
+ ! | |
82
+ ! | Commands supported: |
83
+ ! | - list / help : list all available functionalities |
84
+ ! | - run : run a computation using a given input file |
85
+ ! | (usage: mpirun -np 8 ./astr run datin/input) |
86
+ ! | - test : run internal code tests |
87
+ ! | - pp : enter pre/post-processing mode |
88
+ ! | |
78
89
! | CHANGE RECORD |
79
90
! | ------------- |
80
91
! | 28-05-2021 | Created by J. Fang @ Warrington |
92
+ ! | 03-07-2025 | Prettify by J. Fang @ IMech, Beijing, using ChatGPT |
81
93
! +-------------------------------------------------------------------+
82
94
subroutine listcmd
83
- !
84
- use parallel, only: mpirank
85
- !
86
- if (mpirank== 0 ) then
87
- !
88
- write (* ,* )' +------------------------------------------------------------+'
89
- write (* ,* )' | command line |'
90
- write (* ,* )' +----------------+-------------------------------------------+'
91
- write (* ,* )' | command | |'
92
- write (* ,* )' +----------------+-------------------------------------------+'
93
- write (* ,* )' | list / help | to list all functionalities |'
94
- write (* ,* )' +----------------+-------------------------------------------+'
95
- write (* ,* )' | run | to run a computation |'
96
- write (* ,* )' | | inputfile |'
97
- write (* ,* )' +----------------+-------------------------------------------+'
98
- write (* ,* )' | pp | pre/post-process |'
99
- write (* ,* )' | | init casename generate a example case |'
100
- write (* ,* )' +----------------+-------------------------------------------+'
101
- !
102
- endif
103
- !
95
+
96
+ use parallel, only : mpirank
97
+
98
+ if (mpirank == 0 ) then
99
+ write (* ,* ) ' +------------------------------------------------------------+'
100
+ write (* ,* ) ' | Command Line Help |'
101
+ write (* ,* ) ' +----------------+-------------------------------------------+'
102
+ write (* ,* ) ' | Command | Description |'
103
+ write (* ,* ) ' +----------------+-------------------------------------------+'
104
+ write (* ,* ) ' | list / help | List all functionalities |'
105
+ write (* ,* ) ' | run | Run a computation with an input file |'
106
+ write (* ,* ) ' | usage: mpirun -np 8 ./astr run datin/input |'
107
+ write (* ,* ) ' | test | Run code test routines |'
108
+ write (* ,* ) ' | usage: mpirun -np 8 ./astr test grad |'
109
+ write (* ,* ) ' | pp | Pre/Post-processing |'
110
+ write (* ,* ) ' +----------------+-------------------------------------------+'
111
+ end if
112
+
104
113
end subroutine listcmd
105
114
! +-------------------------------------------------------------------+
106
- ! | The end of the subroutine listcmd. |
115
+ ! | End of subroutine listcmd |
107
116
! +-------------------------------------------------------------------+
108
- !
117
+
109
118
end module cmdefne
110
119
! +---------------------------------------------------------------------+
111
120
! | The end of the module cmdefne |
0 commit comments