Skip to content

Commit

Permalink
change interpolation to linear
Browse files Browse the repository at this point in the history
  • Loading branch information
kaarthiksundar committed Sep 29, 2020
1 parent 31e990f commit 52d5bd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

## v0.8.2

- changed default interpolation to linear
- bug fix in reservoir constraints

## v0.8.1
Expand Down
4 changes: 3 additions & 1 deletion src/io/transient.jl
Original file line number Diff line number Diff line change
Expand Up @@ -383,17 +383,19 @@ at least 4 time series data points are available (and result in an error otherwi
for (type, id, param) in fields
if (additional_time > 0.0)
start_val = interpolators[type][id][param]["reduced_data_points"][1]
#= remove cubic spline interpolation
end_val = interpolators[type][id][param]["reduced_data_points"][end]
middle_time = total_time + additional_time / 2
middle_val = (end_val + start_val) / 2
push!(interpolators[type][id][param]["times"], middle_time)
push!(interpolators[type][id][param]["reduced_data_points"], middle_val)
=#
push!(interpolators[type][id][param]["times"], end_time)
push!(interpolators[type][id][param]["reduced_data_points"], start_val)
end
x = interpolators[type][id][param]["times"]
y = interpolators[type][id][param]["reduced_data_points"]
interpolators[type][id][param]["itp"] = Spline1D(x, y, periodic = periodic)
interpolators[type][id][param]["itp"] = Spline1D(x, y, k = 1, periodic = periodic)

if !haskey(time_series_block, type)
time_series_block[type] = Dict{String,Any}()
Expand Down

2 comments on commit 52d5bd9

@kaarthiksundar
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/22182

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.8.2 -m "<description of version>" 52d5bd9a02c9faf290911c7e0867569ea0ea5544
git push origin v0.8.2

Please sign in to comment.