Skip to content

Commit

Permalink
Squash a few bugs for newer namelists.
Browse files Browse the repository at this point in the history
  • Loading branch information
William Wolf committed Apr 18, 2023
1 parent d09217b commit cd904ef
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mesa_script/lib/mesa_script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def self.add_kap_defaults(verbose: false)
config_namelist(
namelist: :kap,
source_files: [File.join(ENV['MESA_DIR'], 'kap', 'private',
"kap_ctrls_io.#{f_end}"),
"kap_ctrls_io.#{f_end}")],
defaults_file: File.join(ENV['MESA_DIR'], 'kap', 'defaults',
'kap.defaults'),
verbose: verbose
Expand All @@ -183,7 +183,7 @@ def self.add_eos_defaults(verbose: false)
config_namelist(
namelist: :eos,
source_files: [File.join(ENV['MESA_DIR'], 'eos', 'private',
"eos_ctrls_io.#{f_end}"),
"eos_ctrls_io.#{f_end}")],
defaults_file: File.join(ENV['MESA_DIR'], 'eos', 'defaults',
'eos.defaults'),
verbose: verbose
Expand Down Expand Up @@ -690,14 +690,15 @@ def self.get_names_and_types(namelist)
line.split('::').map(&:strip)
end
pairs.each do |pair|
next if pair[0] == 'public'
type = case pair[0]
when /logical/ then :bool
when /character/ then :string
when /real/ then :float
when /integer/ then :int
when /type/ then :type
else
raise "Couldn't determine type of entry #{pair[0]} in " \
raise "Couldn't determine type of entry \"#{pair[0]}\" in " \
"#{source_file}."
end
name_chars = pair[1].split('')
Expand Down

0 comments on commit cd904ef

Please sign in to comment.