SPEED
READ_FILESYS.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine read_filesys (filec, num_nodes, label, x, y, z, axis_rot)
 Reads SYS.input file.
 

Function/Subroutine Documentation

◆ read_filesys()

subroutine read_filesys ( character*70  filec,
integer*4  num_nodes,
integer*4, dimension(num_nodes)  label,
real*8, dimension(num_nodes)  x,
real*8, dimension(num_nodes)  y,
real*8, dimension(num_nodes)  z,
real*8, dimension(num_nodes)  axis_rot 
)

Reads SYS.input file.

Author
Aline Herlin, Srihari Sangaraju
Date
February, 2021
Version
1.0
Parameters
[in]filecfile name
[in]num_nodesnumber of oscillators
[out]labelsystem ID
[out]x,y,zcoord. of the structure

Definition at line 28 of file READ_FILESYS.f90.

29
30 implicit none
31
32 character*70 :: filec
33 character*100000 :: input_line
34 integer*4 :: i, num_nodes, ileft, iright, status
35 real*8, dimension(num_nodes) :: x, y, z, axis_rot
36 integer*4, dimension(num_nodes) :: label
37 real*8 :: dummy, pi
38
39 pi = 4.0*atan(1.d0);
40
41 open(20,file=filec)
42 read(20,'(A)',iostat = status) input_line
43 ileft = 1
44 iright = len(input_line)
45 read(input_line(ileft:iright),*) num_nodes
46
47 do i = 1,num_nodes
48 read(20,'(A)',iostat = status) input_line
49 if (status.ne.0) exit
50 ileft = 1
51 iright = len(input_line)
52 read(input_line(ileft:iright),*) label(i), x(i), y(i), z(i), dummy
53 axis_rot(i) = dummy*pi/180.d0
54 enddo
55
56 close(20)
57
58 return
59

Referenced by read_system_position().

Here is the caller graph for this function: