Skip to content

Commit

Permalink
Add logic to handle TRANX on MULTIPLY
Browse files Browse the repository at this point in the history
  • Loading branch information
moyner committed Mar 7, 2024
1 parent 0190f60 commit 6194b9e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/InputParser/keywords/special.jl
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,24 @@ function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:MULTIPLY})
kl = parsed[7]
ku = parsed[8]
target = get_operation_section(outer_data, dst)
Ibox, Jbox, Kbox = (il, iu), (jl, ju), (kl, ku)
do_apply = true
if ismissing(target)
if dst == "PORV" && haskey(grid, "PORO")
# TODO: Bit of a hack
target = grid["PORO"]
elseif dst in ("TRANX", "TRANY", "TRANZ")
parser_message(cfg, outer_data, "MULTIPLY", "MULTIPLY on $dst is not currently supported in solvers.", important = true)
dir = dst[end]
push_and_create!(data, "MULTRAN$dir", (i = Ibox, j = Jbox, k = Kbox, factor = factor))
do_apply = false
else
throw(ArgumentError("Unable to apply MULTIPLY to non-declared field $dst"))
end
end
apply_multiply!(target, factor, (il, iu), (jl, ju), (kl, ku), dims)
if do_apply
apply_multiply!(target, factor, Ibox, Jbox, Kbox, dims)
end
rec = read_record(f)
end
end
Expand Down
1 change: 1 addition & 0 deletions src/InputParser/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ function parse_keyword!(data, outer_data, units, cfg, f, v::Val{T}) where T
skip_kw!(:NOWARNEP, 0)
skip_kw!(:NOHYKR, 0)
skip_kw!(:NOMIX, 0)
skip_kw!(:FILLEPS, 0)
skip_kw!(:NPROCX, 0)
skip_kw!(:NPROCY, 0)
skip_kw!(:NONNC, 0)
Expand Down

0 comments on commit 6194b9e

Please sign in to comment.