Module: CodeRunner::Trinity::OutputFiles

Included in:
CodeRunner::Trinity
Defined in:
lib/trinitycrmod/output_files.rb

Overview

for TextDataTools for more information.

Instance Method Summary collapse

Instance Method Details

#fluxes_outfileObject

File ending in ‘.fluxes’: contains heat flux, momentum flux etc.



15
16
17
# File 'lib/trinitycrmod/output_files.rb', line 15

def fluxes_outfile
  TextDataTools::Column::DataFile.new(@directory + '/' + @run_name + '.fluxes', true, /\S+/, /(?:\#\s+)?\d:.*?(?=\d:|\Z)/)
end

#info_outfileObject

File ending in ‘.info’: contains global results.



11
12
13
# File 'lib/trinitycrmod/output_files.rb', line 11

def info_outfile
  TextDataTools::Named::DataFile.new(@directory + '/' + @run_name + '.info', ':')
end

#nt_outfileObject

File ending in ‘.nt’: contains profiles: Ti, Te etc.



19
20
21
# File 'lib/trinitycrmod/output_files.rb', line 19

def nt_outfile
  TextDataTools::Column::DataFile.new(@directory + '/' + @run_name + '.nt', true, /\S+/, /(?:\#\s+)?\d:.*?(?=\d:|\Z)/)
end

#time_outfileObject



22
23
24
# File 'lib/trinitycrmod/output_files.rb', line 22

def time_outfile
  TextDataTools::Column::DataFile.new(@directory + '/' + @run_name + '.time', true, /\S+/, /\w+/)
end

#view_outfilesObject



25
26
27
28
29
30
31
32
# File 'lib/trinitycrmod/output_files.rb', line 25

def view_outfiles
  case ENV['EDITOR']
  when /vim/i
    "#{ENV['EDITOR']} -Rp #{info_outfile} #{nt_outfile} #{fluxes_outfile}"
  else
    "#{ENV['EDITOR']} #{info_outfile} #{nt_outfile} #{fluxes_outfile}"
  end
end