Changeset 262
- Timestamp:
- Mar 18, 2009 8:32:37 AM (16 years ago)
- Location:
- palm/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/DOC/app/chapter_4.2.html
r240 r262 9903 9903 9904 9904 9905 <td style="vertical-align: top;"><span style="font-style: italic;">1 </span><br>9905 <td style="vertical-align: top;"><span style="font-style: italic;">100</span><br> 9906 9906 9907 9907 -
palm/trunk/DOC/app/chapter_4.6.html
r256 r262 12361 12361 12362 12362 12363 <td><span style="font-style: italic;">1 </span></td>12363 <td><span style="font-style: italic;">100</span></td> 12364 12364 12365 12365 -
palm/trunk/SCRIPTS/mrun
r261 r262 3262 3262 printf "\n *** dvr server with id=$dvrserver_id has been stopped" 3263 3263 3264 # add the current dvr configuration file to the dvr output 3265 # directory 3266 cp .dvrserver.config DATA_DVR 3267 3268 # process the dvr output (option -s for generating sequence mode 3269 # data) 3270 process_dvr_output -d DATA_DVR -f $fname -s 3264 # If there is a directory, data have been output by the 3265 # streaming server. Otherwise, user has chosen dvrp_output=local 3266 if [[ -d DATA_DVR ]] 3267 then 3268 3269 # Add the current dvr configuration file to the dvr output 3270 # directory 3271 cp .dvrserver.config DATA_DVR 3272 3273 # Process the dvr output (option -s for also generating 3274 # sequence mode data) 3275 process_dvr_output -d DATA_DVR -f $fname -s 3276 3277 else 3278 3279 # Process the local output 3280 process_dvr_output -l -d DATA_DVR -f $fname 3281 3282 fi 3283 3284 elif [[ $(echo $package_list | grep -c dvrp_graphics) != 0 ]] 3285 then 3286 3287 # Process dvr output generated in local mode (dvrp_output=local) 3288 process_dvr_output -l -d DATA_DVR -f $fname 3289 3271 3290 fi 3272 3291 fi -
palm/trunk/SCRIPTS/process_dvr_output
r261 r262 12 12 13 13 14 # variable declarations + default values14 # Variable declarations + default values 15 15 camera=false 16 16 create_sequence_output=false 17 17 data_catalog=`pwd` 18 dvrp_output=rtsp 18 19 file_identifier=all_streams 19 20 groundplate=false 21 palm_run_identifier="" 20 22 topography=false 21 23 … … 23 25 24 26 25 # read shellscript options26 while getopts :d:f: s option27 # Read shellscript options 28 while getopts :d:f:ls option 27 29 do 28 30 case $option in 29 31 (d) data_catalog=$OPTARG;; 30 32 (f) file_identifier=$OPTARG;; 33 (l) dvrp_output=local;; 31 34 (s) create_sequence_output=true;; 32 35 (\?) printf "\n +++ unknown option $OPTARG \n" 33 printf "\n allowed option are -d and -f\n"36 printf "\n allowed option are -d, -f, -l, -s \n" 34 37 exit;; 35 38 esac … … 37 40 38 41 39 # change to the given directory 40 cd $data_catalog 41 42 43 # find out the number of streams 44 (( i = 0 )) 45 while true 46 do 47 (( i = i + 1 )) 48 if (( i < 10 )) 49 then 50 cstream=0$i 42 # Find out the PALM run identifier 43 if [[ -f CPU_MEASURES ]] 44 then 45 palm_run_identifier=`head -1 CPU_MEASURES` 46 fi 47 48 # Process the streaming server output 49 if [[ $dvrp_output = rtsp ]] 50 then 51 52 # Change to the given directory 53 cd $data_catalog 54 55 56 # Find out the number of streams 57 (( i = 0 )) 58 while true 59 do 60 (( i = i + 1 )) 61 if (( i < 10 )) 62 then 63 cstream=0$i 64 else 65 cstream=$i 66 fi 67 68 if [[ $(ls -1 *.* | grep -c $cstream) = 0 ]] 69 then 70 (( i = i - 1 )) 71 break 72 fi 73 74 # find out the stream name 75 streamname[$i]=`ls -1 ${cstream}_*-ge.dvrs | cut -f1 -d"-"` 76 77 # get addres 78 adr[$i]=`grep ADR= ${streamname[$i]}.dvrs | grep '*' | cut -f2 -d"="` 79 80 # get maxbytes 81 maxbytes[$i]=`head -1 ${streamname[$i]}.max` 82 83 # get number of frames 84 frames[$i]=`tail -1 ${streamname[$i]}.max` 85 86 done 87 88 nstream=$i 89 nscenes=$nstream 90 91 92 # Check, if there are files containing the camera data, the ground plate 93 # and topography data. 94 # Check the first stream only, because all streams have the same files. 95 if [[ -f ${streamname[1]}_camera.max ]] 96 then 97 camera=true 98 adr_camera=`grep ADR= ${streamname[1]}.dvrs | grep 'camera' | cut -f2 -d"="` 99 maxbytes_camera=`head -1 ${streamname[1]}_camera.max` 100 (( nscenes = nscenes + 1 )) 101 fi 102 if [[ -f ${streamname[1]}_groundplate.max ]] 103 then 104 groundplate=true 105 adr_groundplate=`echo $adr_camera | sed "s/camera/groundplate/g"` 106 maxbytes_groundplate=`head -1 ${streamname[1]}_groundplate.max` 107 (( nscenes = nscenes + 1 )) 108 fi 109 if [[ -f ${streamname[1]}_topography.max ]] 110 then 111 topography=true 112 adr_topography=`echo $adr_camera | sed "s/camera/topography/g"` 113 maxbytes_topography=`head -1 ${streamname[1]}_topography.max` 114 (( nscenes = nscenes + 1 )) 115 fi 116 117 118 119 # Start with writing the dvrs file for the combined streams 120 dvr_file=${file_identifier}_streaming.dvrs 121 122 echo "SCENES=$nscenes" > $dvr_file 123 124 # First, add the static scenes 125 if [[ $camera = true ]] 126 then 127 echo "MED=TCP" >> $dvr_file 128 echo "ADR=$adr_camera" >> $dvr_file 129 echo "MAXBYTES=$maxbytes_camera" >> $dvr_file 130 echo "FRAMES=1" >> $dvr_file 131 echo "FRAMES_P_SEC=0" >> $dvr_file 132 echo "SCENEEND" >> $dvr_file 133 fi 134 135 if [[ $groundplate = true ]] 136 then 137 echo "MED=TCP" >> $dvr_file 138 echo "ADR=$adr_groundplate" >> $dvr_file 139 echo "MAXBYTES=$maxbytes_groundplate" >> $dvr_file 140 echo "FRAMES=1" >> $dvr_file 141 echo "FRAMES_P_SEC=0" >> $dvr_file 142 echo "SCENEEND" >> $dvr_file 143 fi 144 145 if [[ $topography = true ]] 146 then 147 echo "MED=TCP" >> $dvr_file 148 echo "ADR=$adr_topography" >> $dvr_file 149 echo "MAXBYTES=$maxbytes_topography" >> $dvr_file 150 echo "FRAMES=1" >> $dvr_file 151 echo "FRAMES_P_SEC=0" >> $dvr_file 152 echo "SCENEEND" >> $dvr_file 153 fi 154 155 156 # Now add the streams 157 (( i = 0 )) 158 while (( i < nstream )) 159 do 160 161 (( i = i + 1 )) 162 163 echo "MED=TCP" >> $dvr_file 164 echo "ADR=${adr[$i]}" >> $dvr_file 165 echo "MAXBYTES=${maxbytes[$i]}" >> $dvr_file 166 echo "FRAMES=${frames[$i]}" >> $dvr_file 167 echo "FRAMES_P_SEC=25" >> $dvr_file 168 echo "SCENEEND" >> $dvr_file 169 170 done 171 172 173 # Change path to the current file identifier 174 sed "s/DATA_DVR/${file_identifier}_dvr/g" $dvr_file > tmp_file 175 mv tmp_file $dvr_file 176 177 178 # If there is a dvr configuration file, set the BASEDIR to the parent 179 # directory of the above given path 180 if [[ -f .dvrserver.config ]] 181 then 182 old_path=`grep BASEDIR .dvrserver.config` 183 sed "s&${old_path}&BASEDIR=..&g" .dvrserver.config > .dvrserver.config.new 184 mv .dvrserver.config.new .dvrserver.config 185 fi 186 187 188 # Create the html file for the combined streames 189 cp 01_*-ge.html tmp.html 190 replace=$(echo `grep src= tmp.html`) 191 sed "s&${replace}&src=\"${file_identifier}_streaming.dvrs\"&g" tmp.html > tmp1.html 192 if [[ "$palm_run_identifier" = "" ]] 193 then 194 cp tmp1.html ${file_identifier}_streaming.html 51 195 else 52 cstream=$i 53 fi 54 55 if [[ $(ls -1 *.* | grep -c $cstream) = 0 ]] 56 then 57 (( i = i - 1 )) 58 break 59 fi 60 61 # find out the stream name 62 streamname[$i]=`ls -1 ${cstream}_*-ge.dvrs | cut -f1 -d"-"` 63 64 # get addres 65 adr[$i]=`grep ADR= ${streamname[$i]}.dvrs | grep '*' | cut -f2 -d"="` 66 67 # get maxbytes 68 maxbytes[$i]=`head -1 ${streamname[$i]}.max` 69 70 # get number of frames 71 frames[$i]=`tail -1 ${streamname[$i]}.max` 72 73 done 74 75 nstream=$i 76 nscenes=$nstream 77 78 79 # Check, if there are files containing the camera data, the ground plate 80 # and topography data. 81 # Check the first stream only, because all streams have the same files. 82 if [[ -f ${streamname[1]}_camera.max ]] 83 then 84 camera=true 85 adr_camera=`grep ADR= ${streamname[1]}.dvrs | grep 'camera' | cut -f2 -d"="` 86 maxbytes_camera=`head -1 ${streamname[1]}_camera.max` 87 (( nscenes = nscenes + 1 )) 196 sed "s&DATA_DVR/${streamname[1]}/\*\*\*\*\*.dvr (DVR 3D Streaming)&DVR 3D streaming generated by $palm_run_identifier&g" tmp1.html > ${file_identifier}_streaming.html 197 fi 198 rm tmp.html tmp1.html 199 200 201 # Informative messages 202 printf "\n\n *** processing dvr stream output:" 203 printf "\n number of detected streams = $nstream" 204 printf "\n stream names:" 205 206 (( i = 0 )) 207 while (( i < nstream )) 208 do 209 210 (( i = i + 1 )) 211 printf " ${streamname[$i]}" 212 213 done 214 printf "\n" 215 216 217 else 218 219 # This is the branch for local output (dvrp_output=local). 220 # Find out the number of streams. 221 (( i = 0 )) 222 while true 223 do 224 225 (( i = i + 1 )) 226 if (( i < 10 )) 227 then 228 cstream=0$i 229 else 230 cstream=$i 231 fi 232 233 if [[ $(ls -1 *.* | grep -c ${cstream}_) = 0 ]] 234 then 235 (( i = i - 1 )) 236 break 237 fi 238 239 # find out the stream name 240 streamname[$i]=`ls -1 ${cstream}_*.camera.dvr | cut -f1 -d"."` 241 242 done 243 244 # Exit, if there are no streams. 245 [[ $i = 0 ]] && exit 246 247 nstream=$i 248 249 mkdir -p ${data_catalog}/sequence_data 250 251 252 # First, merge static scenes into one file 253 if [[ -f ${streamname[1]}.camera.dvr ]] 254 then 255 cat ${streamname[1]}.camera.dvr >> ${data_catalog}/sequence_data/static_scenes.dvr 256 fi 257 258 if [[ -f ${streamname[1]}.groundplate.dvr ]] 259 then 260 cat ${streamname[1]}.groundplate.dvr >> ${data_catalog}/sequence_data/static_scenes.dvr 261 fi 262 263 if [[ -f ${streamname[1]}.topography.dvr ]] 264 then 265 cat ${streamname[1]}.topography.dvr >> ${data_catalog}/sequence_data/static_scenes.dvr 266 fi 267 268 269 # Find out the number of frames 270 frames[1]=`grep sequence ${streamname[1]}_00000.html | cut -f2 -d";" | cut -f1 -d'"' | cut -f2 -d"-"` 271 272 273 # Now, merge the data, frame by frame 274 (( j = 0 )) 275 while (( j < ${frames[1]} )) 276 do 277 278 nframe=`printf "%05d" $j` 279 280 (( i = 0 )) 281 while (( i < nstream )) 282 do 283 (( i = i + 1 )) 284 cat ${streamname[$i]}_$nframe.dvr >> ${data_catalog}/sequence_data/$nframe.dvr 285 done 286 287 (( j = j + 1 )) 288 289 done 290 291 292 # Create the html file to be used for the sequence mode 293 cp ${streamname[1]}_00000.html tmp1.html 294 sed "s&${streamname[1]}_camera.dvr&sequence_data/static_scenes.dvr&g" tmp1.html > tmp2.html 295 sed "s&${streamname[1]}_&sequence_data/&g" tmp2.html > tmp3.html 296 if [[ "$palm_run_identifier" = "" ]] 297 then 298 cp tmp3.html ${file_identifier}_sequence.html 299 else 300 sed "s&sequence_data/%05d.dvr (DVR 3D Sequence)&DVR 3D sequence generated by $palm_run_identifier&g" tmp3.html > ${file_identifier}_sequence.html 301 fi 302 rm tmp1.html tmp2.html tmp3.html 303 mv ${file_identifier}_sequence.html ${data_catalog} 304 305 306 # Informative messages 307 printf "\n\n *** processing dvr local output (using dvrp_output=local):" 308 printf "\n number of detected streams = $nstream" 309 printf "\n stream names:" 310 311 (( i = 0 )) 312 while (( i < nstream )) 313 do 314 315 (( i = i + 1 )) 316 printf " ${streamname[$i]}" 317 318 done 319 printf "\n" 320 88 321 fi 89 if [[ -f ${streamname[1]}_groundplate.max ]] 90 then 91 groundplate=true 92 adr_groundplate=`echo $adr_camera | sed "s/camera/groundplate/g"` 93 maxbytes_groundplate=`head -1 ${streamname[1]}_groundplate.max` 94 (( nscenes = nscenes + 1 )) 95 fi 96 if [[ -f ${streamname[1]}_topography.max ]] 97 then 98 topography=true 99 adr_topography=`echo $adr_camera | sed "s/camera/topography/g"` 100 maxbytes_topography=`head -1 ${streamname[1]}_topography.max` 101 (( nscenes = nscenes + 1 )) 102 fi 103 104 105 106 # start with writing the dvrs file for the combined streams 107 dvr_file=${file_identifier}_streaming.dvrs 108 109 echo "SCENES=$nscenes" > $dvr_file 110 111 # first, add the static scenes 112 if [[ $camera = true ]] 113 then 114 echo "MED=TCP" >> $dvr_file 115 echo "ADR=$adr_camera" >> $dvr_file 116 echo "MAXBYTES=$maxbytes_camera" >> $dvr_file 117 echo "FRAMES=1" >> $dvr_file 118 echo "FRAMES_P_SEC=0" >> $dvr_file 119 echo "SCENEEND" >> $dvr_file 120 fi 121 122 if [[ $groundplate = true ]] 123 then 124 echo "MED=TCP" >> $dvr_file 125 echo "ADR=$adr_groundplate" >> $dvr_file 126 echo "MAXBYTES=$maxbytes_groundplate" >> $dvr_file 127 echo "FRAMES=1" >> $dvr_file 128 echo "FRAMES_P_SEC=0" >> $dvr_file 129 echo "SCENEEND" >> $dvr_file 130 fi 131 132 if [[ $topography = true ]] 133 then 134 echo "MED=TCP" >> $dvr_file 135 echo "ADR=$adr_topography" >> $dvr_file 136 echo "MAXBYTES=$maxbytes_topography" >> $dvr_file 137 echo "FRAMES=1" >> $dvr_file 138 echo "FRAMES_P_SEC=0" >> $dvr_file 139 echo "SCENEEND" >> $dvr_file 140 fi 141 142 143 # now add the streams 144 (( i = 0 )) 145 while (( i < nstream )) 146 do 147 148 (( i = i + 1 )) 149 150 echo "MED=TCP" >> $dvr_file 151 echo "ADR=${adr[$i]}" >> $dvr_file 152 echo "MAXBYTES=${maxbytes[$i]}" >> $dvr_file 153 echo "FRAMES=${frames[$i]}" >> $dvr_file 154 echo "FRAMES_P_SEC=25" >> $dvr_file 155 echo "SCENEEND" >> $dvr_file 156 157 done 158 159 160 # change path to the current file identifier 161 sed "s/DATA_DVR/${file_identifier}_dvr/g" $dvr_file > tmp_file 162 mv tmp_file $dvr_file 163 164 165 # if there is a dvr configuration file, set the BASEDIR to the parent 166 # directory of the above given path 167 if [[ -f .dvrserver.config ]] 168 then 169 old_path=`grep BASEDIR .dvrserver.config` 170 sed "s&${old_path}&BASEDIR=..&g" .dvrserver.config > .dvrserver.config.new 171 mv .dvrserver.config.new .dvrserver.config 172 fi 173 174 175 # create the html file for the combined streames 176 cp 01_*-ge.html tmp.html 177 replace=$(echo `grep src= tmp.html`) 178 sed "s&${replace}&src=\"${file_identifier}_streaming.dvrs\"&g" tmp.html > ${file_identifier}_streaming.html 179 rm tmp.html 180 181 182 # informative messages 183 printf "\n\n *** processing local dvr stream output:" 184 printf "\n number of detected streams = $nstream" 185 printf "\n stream names:" 186 187 (( i = 0 )) 188 while (( i < nstream )) 189 do 190 191 (( i = i + 1 )) 192 printf " ${streamname[$i]}" 193 194 done 195 printf "\n" 196 197 198 # create output for viewing dvr data in sequence mode 322 323 324 # Create output for viewing dvr data in sequence mode 199 325 if [[ $create_sequence_output = true ]] 200 326 then … … 202 328 mkdir sequence_data 203 329 204 # first, merge static scenes into one file330 # First, merge static scenes into one file 205 331 if [[ $camera = true ]] 206 332 then … … 219 345 220 346 221 # now, merge the data, frame by frame347 # Now, merge the data, frame by frame 222 348 (( j = 0 )) 223 349 while (( j < ${frames[1]} )) … … 238 364 239 365 240 # create the html file to be used for the sequence mode366 # Create the html file to be used for the sequence mode 241 367 cp ${streamname[1]}.html tmp1.html 242 368 sed "s/camera.dvr/static_scenes.dvr/g" tmp1.html > tmp2.html 243 sed "s&${streamname[1]}&sequence_data&g" tmp2.html > ${file_identifier}_sequence.html 244 rm tmp1.html tmp2.html 369 sed "s&${streamname[1]}&sequence_data&g" tmp2.html > tmp3.html 370 if [[ "$palm_run_identifier" = "" ]] 371 then 372 cp tmp3.html ${file_identifier}_sequence.html 373 else 374 sed "s&DATA_DVR/sequence_data/\*\*\*\*\*.dvr (DVR 3D Sequence)&DVR 3D sequence generated by $palm_run_identifier&g" tmp3.html > ${file_identifier}_sequence.html 375 fi 376 rm tmp1.html tmp2.html tmp3.html 245 377 246 378 printf " data for using sequence mode generated" … … 250 382 251 383 252 # change back to directory from where script has been called253 cd - > /dev/null 384 # Change back to directory from where script has been called 385 cd - > /dev/null 2>&1 -
palm/trunk/SOURCE/CURRENT_MODIFICATIONS
r258 r262 45 45 ------ 46 46 47 Bugfix: error in check, if particles moved further than one subdomain length. 48 This check must not be applied for newly released particles. (advec_particles) 49 47 50 Bugfix: several tail counters are initialized, particle_tail_coordinates is 48 51 only written to file if its third index is > 0, arrays for tails are allocated -
palm/trunk/SOURCE/advec_particles.f90
r230 r262 5 5 ! ----------------- 6 6 ! Output of messages replaced by message handling routine 7 ! Bugfix: error in check, if particles moved further than one subdomain length. 8 ! This check must not be applied for newly released particles 7 9 ! Bugfix: several tail counters are initialized, particle_tail_coordinates is 8 10 ! only written to file if its third index is > 0 … … 3066 3068 ! 3067 3069 !-- Stop if particles have moved further than the length of one 3068 !-- PE subdomain 3069 IF ( ABS(particles(n)%speed_x) > & 3070 ((nxr-nxl+2)*dx)/(particles(n)%age-particles(n)%age_m) .OR. & 3071 ABS(particles(n)%speed_y) > & 3072 ((nyn-nys+2)*dy)/(particles(n)%age-particles(n)%age_m) ) THEN 3073 3074 WRITE( message_string, * ) 'particle too fast. n = ', n 3075 CALL message( 'advec_particles', 'PA0148', 2, 2, 0, 6, 0 ) 3070 !-- PE subdomain (newly released particles have age = age_m!) 3071 IF ( particles(n)%age /= particles(n)%age_m ) THEN 3072 IF ( ABS(particles(n)%speed_x) > & 3073 ((nxr-nxl+2)*dx)/(particles(n)%age-particles(n)%age_m) .OR. & 3074 ABS(particles(n)%speed_y) > & 3075 ((nyn-nys+2)*dy)/(particles(n)%age-particles(n)%age_m) ) THEN 3076 3077 WRITE( message_string, * ) 'particle too fast. n = ', n 3078 CALL message( 'advec_particles', 'PA0148', 2, 2, 0, 6, 0 ) 3079 ENDIF 3076 3080 ENDIF 3077 3081 -
palm/trunk/SOURCE/data_output_dvrp.f90
r254 r262 32 32 ! Current revisions: 33 33 ! ----------------- 34 ! Output of messages replaced by message handling routine. 34 ! Clipping of dvr-output implemented, 35 ! output of messages replaced by message handling routine. 35 36 ! TEST: different colours for isosurfaces 36 37 ! … … 167 168 !-- number of particles and tails to be plotted; otherwise, all 168 169 !-- particles/tails are plotted. dvrp_mask is used to mark the partikles. 169 IF ( .NOT. use_particle_tails ) THEN170 ! IF ( .NOT. use_particle_tails ) THEN 170 171 ALLOCATE( dvrp_mask(number_of_particles) ) 171 ELSE172 ALLOCATE( dvrp_mask(number_of_tails*maximum_number_of_tailpoints) )173 ENDIF172 ! ELSE 173 ! ALLOCATE( dvrp_mask(number_of_tails*maximum_number_of_tailpoints) ) 174 ! ENDIF 174 175 dvrp_mask = .TRUE. 175 176 IF ( dvrp_total_overlap ) THEN … … 202 203 dvrp_not = dvrp_not + 1 203 204 ELSE 204 dvrp_mask( k) = .FALSE.205 dvrp_mask(n) = .FALSE. 205 206 ENDIF 206 207 ENDIF … … 532 533 CALL DVRP_DATA( m-1, local_pf, 1, nx_dvrp, ny_dvrp, nz_dvrp, & 533 534 cyclic_dvrp, cyclic_dvrp, cyclic_dvrp ) 534 ! CALL DVRP_SLICER( m-1, section_mode, slicer_position ) 535 tmp_pos = 1.0 536 CALL DVRP_SLICER( m-1, 2, tmp_pos ) 535 tmp_pos = slicer_position 536 CALL DVRP_SLICER( m-1, section_mode, tmp_pos ) 537 ! tmp_pos = 1.0 538 ! CALL DVRP_SLICER( m-1, 2, tmp_pos ) 537 539 WRITE (9,*) 'nx_dvrp=', nx_dvrp 538 540 WRITE (9,*) 'ny_dvrp=', ny_dvrp
Note: See TracChangeset
for help on using the changeset viewer.