Skip to content
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
18caa96
Added MPDeC for conservative PDS
SKopecz Mar 10, 2025
0b0de40
fix
SKopecz Mar 10, 2025
6a14d62
first tests
SKopecz Mar 10, 2025
80f699a
fix error test
SKopecz Mar 10, 2025
723e02d
added TODOs in tests
SKopecz Mar 10, 2025
6e42eab
added mpdec api reference
SKopecz Mar 10, 2025
1163864
Added MPDeC for non-autonomous PDS
SKopecz Mar 12, 2025
b9bdc01
added adaptive MPDeC
SKopecz Mar 12, 2025
280cffa
mpdec interpolation
SKopecz Mar 12, 2025
d417f72
MPDeC for PDSProblem (out-of-place)
SKopecz Mar 12, 2025
6bb4bfc
added mpdec for non-conservative PDS (in-place)
SKopecz Mar 13, 2025
9861f79
bugfix MPDeC for PDSProblem & additional tests
SKopecz Mar 14, 2025
a6b9254
fix testset 'zero intial values'
SKopecz Mar 14, 2025
0373369
code restructuring
SKopecz Mar 14, 2025
e681d50
performance enhancement
SKopecz Mar 17, 2025
f859596
check theta < 0 only once
SKopecz Mar 17, 2025
68c7eca
Support Tridiagonal
SKopecz Mar 17, 2025
d857f19
Support for sparse matrices
SKopecz Mar 18, 2025
1905e22
fixed sparse matrix support
SKopecz Mar 18, 2025
8b6cbdd
minor changes and tests
SKopecz Mar 19, 2025
4759126
format
SKopecz Mar 19, 2025
35ff52a
fix - change in sparsity pattern
SKopecz Mar 19, 2025
e63d9a5
Use POSITIVE PDS in tests
SKopecz Mar 20, 2025
8d9e128
Apply suggestions from code review
SKopecz Mar 21, 2025
a1cf60e
additiional changes after review
SKopecz Mar 21, 2025
03ee723
Removed breaks in loops for sparse matrices
SKopecz Mar 21, 2025
f1b32a4
fixed breaks in loops for sparse matrices
SKopecz Mar 21, 2025
3f7acd4
use algebraic expressions for integration nodes and weights
SKopecz Mar 23, 2025
f07407a
fix strato benchmark
SKopecz Mar 24, 2025
b82a80a
Merge branch 'main' into sk/mpdec
SKopecz Mar 24, 2025
5b6e8e2
merge main into branch
SKopecz Mar 24, 2025
c712402
Convergence tests for high order schemes
SKopecz Mar 27, 2025
12f4d91
merge main into branch
SKopecz Mar 27, 2025
736780a
Updated NEWS.md
SKopecz Mar 27, 2025
c63e353
Added DoubleFloats to test environment
SKopecz Mar 27, 2025
d078fd7
made SVector available in tests
SKopecz Mar 27, 2025
8a2eaa2
made SMatrix available in tests
SKopecz Mar 27, 2025
b99b396
import only Double64 from DoubleFloats
SKopecz Mar 27, 2025
82e9168
added suggested changes from reviews
SKopecz Mar 30, 2025
9c37c4e
Merge branch 'main' into sk/mpdec
SKopecz Mar 30, 2025
fb7bfb8
format
SKopecz Mar 30, 2025
ea54eef
use better variable name M_plus_1
SKopecz Mar 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ for human readability.

- The minimum required Julia version was updated to v1.10

### Added

- MPDeC methods of Öffner and Torlo

## Changes when updating to v0.2 from v0.1.x

Expand Down
1 change: 1 addition & 0 deletions docs/src/api_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ SSPMPRK22
MPRK43I
MPRK43II
SSPMPRK43
MPDeC
```

## Auxiliary functions
Expand Down
2 changes: 1 addition & 1 deletion docs/src/stratospheric_reaction_benchmark.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function stratreac_plot(sols, labels = fill("", length(sols)), sol_ref = nothing
labels = [labels]
end

tspan = prob.tspan
tspan = prob_pds_stratreac.tspan
layout = (3, 2)
linewidth = 2
xticks = (range(first(tspan), last(tspan), 4), range(12.0, 84.0, 4))
Expand Down
6 changes: 5 additions & 1 deletion src/PositiveIntegrators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using Statistics: median

using SparseArrays: SparseArrays, AbstractSparseMatrix,
issparse, nonzeros, nzrange, rowvals, spdiagm
using StaticArrays: SVector, SMatrix, StaticArray, @SVector, @SMatrix
using StaticArrays: SVector, SMatrix, StaticArray, @SVector, @SMatrix, MMatrix

using FastBroadcast: @..
using MuladdMacro: @muladd
Expand Down Expand Up @@ -48,6 +48,7 @@ export ConservativePDSFunction, ConservativePDSProblem

export MPE, MPRK22, MPRK43I, MPRK43II
export SSPMPRK22, SSPMPRK43
export MPDeC

export prob_pds_linmod, prob_pds_linmod_inplace, prob_pds_nonlinmod,
prob_pds_robertson, prob_pds_brusselator, prob_pds_sir,
Expand All @@ -69,6 +70,9 @@ include("mprk.jl")
# modified Patankar-Runge-Kutta based on the SSP formulation of RK methods (SSPMPRK)
include("sspmprk.jl")

# MPDeC methods
include("mpdec.jl")

# interpolation for dense output
include("interpolation.jl")

Expand Down
3 changes: 2 additions & 1 deletion src/interpolation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ const MPRKCaches = Union{MPEConstantCache, MPECache, MPEConservativeCache,
MPRK22ConstantCache, MPRK22Cache, MPRK22ConservativeCache,
MPRK43ConstantCache, MPRK43Cache, MPRK43ConservativeCache,
SSPMPRK22ConstantCache, SSPMPRK22Cache, SSPMPRK22ConservativeCache,
SSPMPRK43ConstantCache, SSPMPRK43Cache, SSPMPRK43ConservativeCache}
SSPMPRK43ConstantCache, SSPMPRK43Cache, SSPMPRK43ConservativeCache,
MPDeCConstantCache, MPDeCCache, MPDeCConservativeCache}

function interp_summary(::Type{cacheType},
dense::Bool) where {cacheType <: MPRKCaches}
Expand Down
766 changes: 766 additions & 0 deletions src/mpdec.jl

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
DoubleFloats = "497a8b3b-efae-58df-a0af-a86822472b78"
ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
Expand All @@ -21,6 +22,7 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
[compat]
ADTypes = "1.12"
Aqua = "0.8"
DoubleFloats = "1.4.3"
ExplicitImports = "1.0.1"
LinearAlgebra = "1"
LinearSolve = "3.7.1"
Expand Down
Loading
Loading