-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from voduchuy/exponential
Compatibility updates
- Loading branch information
Showing
13 changed files
with
72 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ authors = ["Huy D. Vo <[email protected]> and contributors"] | |
version = "0.1.3" | ||
|
||
[deps] | ||
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" | ||
Catalyst = "479239e8-5488-4da2-87a7-35f2df7eef83" | ||
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" | ||
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa" | ||
|
@@ -13,24 +14,14 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | |
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" | ||
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" | ||
ReusePatterns = "a39b5e78-89b5-562b-97d8-70689129df0c" | ||
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" | ||
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" | ||
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" | ||
Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4" | ||
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" | ||
|
||
[compat] | ||
Catalyst = "10, 11, 12" | ||
DataStructures = "0.18, 0.19" | ||
DifferentialEquations = "7" | ||
DocStringExtensions = "0.8" | ||
ForwardDiff = "0.10, 0.11" | ||
LinearAlgebra = "1" | ||
ModelingToolkit = "8" | ||
ReusePatterns = "0.2, 0.3" | ||
StaticArrays = "1" | ||
Sundials = "4" | ||
Symbolics = "4" | ||
julia = "^1.6" | ||
|
||
|
||
[extras] | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# This test suite verifies that DifferentialEquations.jl Exponential integrators can be used with the FSP | ||
using NumCME | ||
using DifferentialEquations | ||
using StaticArrays | ||
import Catalyst | ||
|
||
## Test Fixture: telegraph gene expression | ||
Catalyst.@parameters k₀₁ k₁₀ λ γ | ||
bursting_rn = Catalyst.@reaction_network begin | ||
k₀₁, G0 --> G1 | ||
k₁₀, G1 --> G0 | ||
λ, G1 --> G1 + mRNA | ||
γ, mRNA --> ∅ | ||
end k₀₁ k₁₀ λ γ | ||
|
||
parameter_values = [k₀₁ => 0.05, k₁₀ => 0.1, λ => 5.0, γ => 0.5] | ||
model_from_catalyst = CmeModel(bursting_rn, parameter_values) | ||
|
||
fspalgorithm = AdaptiveFspSparse( | ||
ode_method=LinearExponential(), | ||
space_adapter=RStepAdapter(5, 10, true) | ||
) | ||
p0 = FspVectorSparse([@MVector [1, 0, 0]], [1.0]) | ||
fspsol = solve(model_from_catalyst, p0, (0.0, 100.0), fspalgorithm; saveat=[0.0, 50.0, 100.0]) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters