Changeset 29


Ignore:
Timestamp:
07/23/10 08:35:48 (22 months ago)
Author:
jwise
Message:

N-body simulations sometimes have grids without particles. When this
happens, there is no filename. This is only a problem when having an
N-body simulation with smoothed DM fields on the grids. Jacques now
reconstructs the filenames for these grids from the Task number.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/TOOLS/read_grid_info.pro

    r23 r29  
    163163           partfile = strmid(partfile, lastslash+1) 
    164164        endif 
     165        taskstr = fstring[where(strmatch(fstring, 'Task*') eq 1)] 
     166        tasks = get_int_value_arr(taskstr) 
     167        if (N_elements(tasks) gt 0) then begin 
     168           dot_is_at = StrPos(file_name, '.',/reverse_search) 
     169           slash_is_at = StrPos(file_name, '/',/reverse_search) 
     170           l_file_name = STRMID(file_name, slash_is_at+1, $ 
     171                                dot_is_at-slash_is_at-1) 
     172           zeros = where(npartvalue eq 0, zero_count) 
     173           if (zero_count gt 0) then $ 
     174              partfile[zeros] = l_file_name + $ 
     175                                STRING(tasks[zeros], FORMAT='(".cpu",I4.4)') 
     176        endif 
    165177     endelse 
    166178 
Note: See TracChangeset for help on using the changeset viewer.