|
V3FIT
|
Go to the documentation of this file.
91 CHARACTER (len=max_length) :: command
93 CHARACTER (len=max_arg_length),
DIMENSION(:),
POINTER ::
97 CHARACTER (len=path_length),
DIMENSION(:),
POINTER ::
127 CHARACTER (len=max_length) :: temp
128 INTEGER :: num_args, i, value_index
129 REAL (rprec) :: start_time
144 IF (num_args .le. 0 .and. parallel%offset .eq. 0)
THEN
155 CALL getcarg(i, temp, num_args)
158 IF (temp(1:1) .eq.
'-')
THEN
159 value_index = index(temp,
'=')
160 IF (value_index .eq. 0)
THEN
162 IF (trim(temp) .eq.
'-h' .and.
163 & parallel%offset .eq. 0)
THEN
171 & temp(1:value_index - 1)
173 & temp(value_index + 1:len_trim(temp))
202 TYPE (bmw_commandline_parser_class),
POINTER :: this
205 IF (
ASSOCIATED(this%arg))
THEN
210 IF (
ASSOCIATED(this%value))
THEN
211 DEALLOCATE(this%value)
240 CHARACTER (len=*),
INTENT(in) :: arg
244 REAL (rprec) :: start_time
252 IF (
ASSOCIATED(this%arg))
THEN
253 DO i = 1,
SIZE(this%arg)
254 IF (trim(this%arg(i)) .eq. trim(arg))
THEN
258 &
'bmw_commandline_parser_get_string', start_time)
291 CHARACTER (len=*),
INTENT(in) :: arg
292 INTEGER,
INTENT(in) :: default_value
295 CHARACTER (len=path_length) :: value
297 REAL (rprec) :: start_time
304 IF (trim(
value) .eq.
'')
THEN
308 &
'bmw_commandline_parser_get_integer', start_time)
315 IF (status .ne. 0)
THEN
346 CHARACTER (len=*),
INTENT(in) :: arg
347 REAL (rprec),
INTENT(in) :: default_value
350 CHARACTER (len=path_length) :: value
352 REAL (rprec) :: start_time
359 IF (trim(
value) .eq.
'')
THEN
370 IF (status .ne. 0)
THEN
399 CHARACTER (len=*),
INTENT(in) :: arg
403 REAL (rprec) :: start_time
411 IF (
ASSOCIATED(this%arg))
THEN
412 DO i = 1,
SIZE(this%arg)
413 IF (trim(this%arg(i)) .eq. trim(arg))
THEN
417 &
'bmw_commandline_parser_is_flag_set', start_time)
454 TYPE (bmw_commandline_parser_class),
INTENT(in) :: this
455 INTEGER,
INTENT(in) :: index
458 REAL (rprec) :: start_time
463 SELECT CASE (trim(this%arg(index)))
465 CASE (
'-mgridf',
'-woutf',
'-siestaf',
'-outf',
'-logf')
466 IF (trim(this%value(index)) .eq.
'')
THEN
467 WRITE (*,1000) trim(this%arg(index)),
468 & trim(this%arg(index))
476 &
'bmw_commandline_parser_flag_requires_value', start_time)
478 1000
FORMAT(a,
' flag requires value. Usage: ',a,
'=value')
501 WRITE(*,*)
'Usage: xbmw [-arg][=option] ... '
503 WRITE(*,*)
'Options: '
504 WRITE(*,*)
'All options are displayed as [arg][takesoption][text]'
505 WRITE(*,*)
' -h N Display this information '
507 WRITE(*,*)
' -mgridf Y Specify the mgrid file name. '
509 WRITE(*,*)
' -woutf Y Specify the wout file name. '
511 WRITE(*,*)
' -siestaf Y Specify the siesta restart file name. '
512 WRITE(*,*)
' When this flag is used, plasma currents '
513 WRITE(*,*)
' are computed from siesta fields instead '
514 WRITE(*,*)
' instead of vmec fields. Overrides the '
515 WRITE(*,*)
' -ju and -jv flags. '
517 WRITE(*,*)
' -outf Y Specify the output file name. '
519 WRITE(*,*)
' -logf Y Write screen output to a log file. '
521 WRITE(*,*)
' -jv N Force balance j^v from curl derived j^u.'
522 WRITE(*,*)
' Overrdes the -ju flag. '
524 WRITE(*,*)
' -ju N Force balance j^u from curl derived j^v.'
real(rprec) function bmw_commandline_parser_get_real(this, arg, default_value)
Get the value of an argument as a Real.
Defines functions for measuring an tabulating performance of function and subroutine calls....
type(bmw_commandline_parser_class) function, pointer bmw_commandline_parser_construct(parallel)
Construct a bmw_commandline_parser_class object.
integer, parameter bmw_commandline_parser_arg_not_found
Commandline argument not found.
character(len=path_length) function bmw_commandline_parser_get_string(this, arg)
Get the value of an argument as a string.
integer, parameter, private max_length
Maximum length of the complete flag. All command line flags take the form of '-flag=value'.
logical function bmw_commandline_parser_is_flag_set(this, arg)
Check if a command line argument was set.
Defines the base class of the type bmw_parallel_context_class. This contains the state variables need...
Defines the base class of the type bmw_commandline_parser_class.
subroutine bmw_commandline_parser_destruct(this)
Deconstruct a bmw_commandline_parser_class object.
Base class containing a parsed bmw_commandline.
real(rprec) function profiler_get_start_time()
Gets the start time of profiled function.
subroutine bmw_commandline_parser_flag_requires_value(this, index)
Check if a command line argument requires a value.
integer, parameter bmw_commandline_parser_no_error
Commandline argument not found.
Contains cross platform routines for manipulating files on the file system. Defines a functions to mo...
subroutine bmw_parallel_context_abort(status)
Abort the entire program.
integer, parameter, private max_arg_length
Maximum length of the argument including the '-' character.
subroutine profiler_set_stop_time(symbol_name, start_time)
Gets the end time of profiled function.
subroutine bmw_commandline_parser_print_help
Print out help text.
Base class representing a bmw parallel context. This contains all memory needed parameters needed to ...
integer function bmw_commandline_parser_get_integer(this, arg, default_value)
Get the value of an argument as an integer.
integer, parameter path_length
Length of file paths.