Separated wrap option to reduce opy and pasted code. Fixed warnings and added wrapping when inserting a dislocation or loop
This commit is contained in:
parent
636ae9421b
commit
dc42b7b925
11 changed files with 55 additions and 46 deletions
16
src/main.f90
16
src/main.f90
|
@ -39,20 +39,27 @@ program main
|
|||
call box_init
|
||||
call random_seed
|
||||
force_overwrite=.false.
|
||||
wrap_flag = .false.
|
||||
|
||||
end_mode_arg = 0
|
||||
|
||||
! Command line parsing
|
||||
arg_num = command_argument_count()
|
||||
|
||||
!Check to see if overwrite flag is passed
|
||||
!First check to see if certain commands are passed, these commands must be known before code
|
||||
!is executed.
|
||||
do i = 1, arg_num
|
||||
call get_command_argument(i,argument)
|
||||
select case(trim(adjustl(argument)))
|
||||
|
||||
!This lets us know if we are overwriting all files
|
||||
case('-ow')
|
||||
force_overwrite = .true.
|
||||
print *, "Overwrite flag passed, output files will be overwritten"
|
||||
|
||||
!This lets us know if we need to wrap atomic positions back into the cell
|
||||
case('-wrap')
|
||||
wrap_flag=.true.
|
||||
end select
|
||||
end do
|
||||
!Determine if a mode is being used and what it is. The first argument has to be the mode
|
||||
|
@ -86,11 +93,14 @@ program main
|
|||
call call_option(argument, arg_pos)
|
||||
!Otherwise print that the argument is not accepted and move on
|
||||
else
|
||||
print *, trim(adjustl(argument)), " is not accepted. Skipping to next argument"
|
||||
arg_pos = arg_pos + 1
|
||||
print *, trim(adjustl(argument)), " is not an accepted command."
|
||||
stop 3
|
||||
end if
|
||||
end do
|
||||
|
||||
!If wrap flag was passed then call the wrap atoms command
|
||||
if(wrap_flag) call wrap_atoms
|
||||
|
||||
!Check to make sure a file was passed to be written out and then write out
|
||||
! Before building do a check on the file
|
||||
if (outfilenum == 0) then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue