Setup.
86 use scale_prc, only: &
87 prc_abort
88 implicit none
89
90 logical :: use_globalcomm = .false.
91 namelist / param_meshfield_statistics / &
92 use_globalcomm
93
94 integer :: ierr
95
96
97 log_newline
98 log_info("MeshField_statistics_setup",*) 'Setup'
99
100
101 rewind(io_fid_conf)
102 read(io_fid_conf,nml=param_meshfield_statistics,iostat=ierr)
103 if( ierr < 0 ) then
104 log_info("MeshField_statistics_setup",*) 'Not found namelist. Default used.'
105 elseif( ierr > 0 ) then
106 log_error("MeshField_statistics_setup",*) 'Not appropriate names in namelist PARAM_MeshField_statistics. Check!'
107 call prc_abort
108 endif
109 log_nml(param_meshfield_statistics)
110
111 base%use_globalcomm = use_globalcomm
112
113 if ( base%use_globalcomm ) then
114 log_info_cont(*) '=> The total is calculated for the global domain.'
115 else
116 log_info_cont(*) '=> The total is calculated for the local domain.'
117 endif
118
119 if ( rp == kind(0.d0) ) then
120 base%comm_datatype = mpi_double_precision
121 elseif( rp == kind(0.0) ) then
122 base%comm_datatype = mpi_real
123 else
124 log_error("MeshField_statistics_setup",*) 'precision is not supportd'
125 call prc_abort
126 endif
127
128 return