SPEED
READ_FILE_MPGM_SYS.f90
Go to the documentation of this file.
1! Copyright (C) 2012 The SPEED FOUNDATION
2! Author: Ilario Mazzieri
3!
4! This file is part of SPEED.
5!
6! SPEED is free software; you can redistribute it and/or modify it
7! under the terms of the GNU Affero General Public License as
8! published by the Free Software Foundation, either version 3 of the
9! License, or (at your option) any later version.
10!
11! SPEED is distributed in the hope that it will be useful, but
12! WITHOUT ANY WARRANTY; without even the implied warranty of
13! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14! Affero General Public License for more details.
15!
16! You should have received a copy of the GNU Affero General Public License
17! along with SPEED. If not, see <http://www.gnu.org/licenses/>.
18
30
31 subroutine read_file_mpgm_sys(filec,&
32 SDOFnum,n_monitor_pgm,el_monitor_pgm,&
33 xr_monitor_pgm,yr_monitor_pgm,zr_monitor_pgm,axis_rot)
34
35 implicit none
36
37 character*70 :: filec
38 character*100000 :: input_line
39
40 integer*4 :: SDOFnum
41 integer*4 :: i
42 integer*4 :: trash
43 integer*4 :: ileft,iright
44 integer*4 :: status
45
46 integer*4,dimension(SDOFnum) :: n_monitor_pgm
47 integer*4,dimension(SDOFnum) :: el_monitor_pgm
48
49 real*8,dimension(SDOFnum) :: xr_monitor_pgm
50 real*8,dimension(SDOFnum) :: yr_monitor_pgm
51 real*8,dimension(SDOFnum) :: zr_monitor_pgm
52 real*8,dimension(SDOFnum) :: axis_rot
53
54
55 open(20,file=filec)
56 read(20,'(A)',iostat = status) input_line
57 ileft = 1
58 iright = len(input_line)
59 read(input_line(ileft:iright),*)sdofnum
60
61 do i = 1,sdofnum
62 read(20,'(A)',iostat = status) input_line
63 if (status.ne.0) exit
64
65 ileft = 1
66 iright = len(input_line)
67 read(input_line(ileft:iright),*)trash,n_monitor_pgm(i),el_monitor_pgm(i),&
68 xr_monitor_pgm(i),yr_monitor_pgm(i),zr_monitor_pgm(i),axis_rot(i)
69
70 enddo
71
72 close(20)
73
74 return
75
76 end subroutine read_file_mpgm_sys
77
subroutine read_file_mpgm_sys(filec, sdofnum, n_monitor_pgm, el_monitor_pgm, xr_monitor_pgm, yr_monitor_pgm, zr_monitor_pgm, axi
Reads files such as MLST.input, MLST.position or MPGM.input.