34 subroutine make_monitor_files(nmonitlst,elem_mlst,local_el_num, ne_loc,&
35 count_monitor, filename, monitor_file, mpi_id, &
40 integer*4,
intent(inout) :: count_monitor
41 integer*4 :: imon, ielem, ne_loc, ie, mpi_id, unit_monitor, i
42 integer*4 :: nmonitlst
44 integer*4,
dimension(nmonitlst) :: elem_mlst
45 integer*4,
dimension(ne_loc) :: local_el_num
46 integer*4,
dimension (6) :: option_out_var
47 integer*4,
dimension(:),
allocatable :: monitor_index
49 character*70 :: filename, monitor_file, filename_new
50 character*5 :: filesuffix
55 do imon = 1, nmonitlst
56 ielem = elem_mlst(imon)
58 if (ie .ne. 0) count_monitor = count_monitor + 1
61 allocate(monitor_index(count_monitor)); count_monitor = 0
63 do imon = 1, nmonitlst
64 ielem = elem_mlst(imon)
67 count_monitor = count_monitor + 1
68 monitor_index(count_monitor) = imon
72 unit_monitor = 40 + mpi_id
74 if (count_monitor .ne. 0)
then
80 if (i .eq. 1 .and. option_out_var(i) .eq. 1 ) filesuffix =
'.D'
81 if (i .eq. 2 .and. option_out_var(i) .eq. 1 ) filesuffix =
'.V'
82 if (i .eq. 3 .and. option_out_var(i) .eq. 1 ) filesuffix =
'.A'
83 if (i .eq. 4 .and. option_out_var(i) .eq. 1 ) filesuffix =
'.S'
84 if (i .eq. 5 .and. option_out_var(i) .eq. 1 ) filesuffix =
'.E'
87 if (option_out_var(i) .eq. 1)
then
91 write(filename,
'(A,I5.5,A5)')
'MONITOR', mpi_id, filesuffix
99 if(len_trim(monitor_file) .ne. 70)
then
100 filename_new = monitor_file(1:len_trim(monitor_file)) //
'/'
102 filename_new = filename
105 write(*,*)
'Creating file ', trim(filename_new)
106 open(unit_monitor,file=trim(filename_new))
112 write(filename,
'(A,I5.5,A5)')
'MONITOR', mpi_id,
'.INFO'
115 if(len_trim(monitor_file) .ne. 70)
then
117 filename_new = monitor_file(1:len_trim(monitor_file)) //
'/' /
119 filename_new = filename
122 write(*,*)
'Creating file ', trim(filename_new)
123 open(unit_monitor,file=trim(filename_new))
124 write(unit_monitor,*) count_monitor, monitor_index
130 deallocate(monitor_index)
132 end subroutine make_monitor_files
subroutine get_indloc_from_indglo(local_el, nel_loc, ie, ic)
Returns local id from global id.