Added ability to have spaces in orient string if passed with quotes

This commit is contained in:
Alex Selimov 2020-05-19 15:42:38 -04:00
parent 66670671b5
commit ffbe83f2f5
4 changed files with 11 additions and 8 deletions

View file

@ -149,13 +149,16 @@ module subroutines
subroutine parse_ori_vec(ori_string, ori_vec)
!This subroutine parses a string to vector in the format [ijk]
character(len=8), intent(in) :: ori_string
character(len=20), intent(in) :: ori_string
real(kind=dp), dimension(3), intent(out) :: ori_vec
integer :: i, ori_pos, stat
ori_pos=2
do i = 1,3
do while(ori_string(ori_pos:ori_pos)==' ')
ori_pos=ori_pos+1
end do
if (ori_string(ori_pos:ori_pos) == '-') then
ori_pos = ori_pos + 1
read(ori_string(ori_pos:ori_pos), *, iostat=stat) ori_vec(i)