Skip to content

Commit

Permalink
fix compatibility with openmdao 2.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
relf committed Nov 8, 2019
1 parent 7aa2857 commit a1aaef2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/lib/whats_opt/templates/run_doe.py.erb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ data['outputs']['<%= r.name %>'] = np.zeros((n,)+<%= r.shape=="1"?"(1,)":r.shape
for i in range(len(cases)):
case = reader.get_case(cases[i])
<% @mda.design_variables.each do |dv| -%>
data['inputs']['<%= dv.name %>'][i,:] = case.inputs['<%= dv.name %>']
data['inputs']['<%= dv.name %>'][i,:] = case.outputs['<%= dv.name %>']
<% end -%>
<% @mda.responses_of_interest.each do |r| -%>
data['outputs']['<%= r.name %>'][i,:] = case.outputs['<%= r.name %>']
Expand Down
2 changes: 1 addition & 1 deletion test/lib/whats_opt/openmdao_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def _assert_file_generation(expected, with_server: true, with_runops: true, with
ogen2 = WhatsOpt::OpenmdaoGenerator.new(mda)
ok, log = ogen2.check_mda_setup
assert_not ok # check raises a runtime error
assert_match(/Error: Variable name .* already exists/, log.join(" "))
assert_match(/Variable name .* already exists/, log.join(" "))
# assert_match /already been used/, log.join(' ') # thrift error
end

Expand Down

0 comments on commit a1aaef2

Please sign in to comment.