Skip to content

Commit 29fea08

Browse files
committed
- Solve linear equation systems optionally with RecursiveFactorization.jl.
- Project.toml: Changed DiffRules from "~1.0" to "1", since issue with "1.2.1" (leading to an error in runtests) seems to be fixed. - Project.toml: Added version 1 of MonteCarloMeasurements. - Updated used packages. - Tutorial slightly improved.
1 parent 07f82a2 commit 29fea08

File tree

5 files changed

+32
-17
lines changed

5 files changed

+32
-17
lines changed

Manifest.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
138138

139139
[[Distributions]]
140140
deps = ["ChainRulesCore", "DensityInterface", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test"]
141-
git-tree-sha1 = "dc6f530de935bb3c3cd73e99db5b4698e58b2fcf"
141+
git-tree-sha1 = "380dab663ca4234c4ec91340c3211c5e73374612"
142142
uuid = "31c24e10-a181-5473-b8eb-7969acd0382f"
143-
version = "0.25.31"
143+
version = "0.25.32"
144144

145145
[[DocStringExtensions]]
146146
deps = ["LibGit2"]
@@ -313,9 +313,9 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804"
313313

314314
[[MonteCarloMeasurements]]
315315
deps = ["Distributed", "Distributions", "LinearAlgebra", "MacroTools", "Random", "RecipesBase", "Requires", "SLEEFPirates", "StaticArrays", "Statistics", "StatsBase", "Test"]
316-
git-tree-sha1 = "cdc1eb7c5a1154c15dfe7368f1ca1f693dc40202"
316+
git-tree-sha1 = "d9dc441d5a0393ee80aea49d0fb13281d7cc7c91"
317317
uuid = "0987c9cc-fe09-11e8-30f0-b96dd679fdca"
318-
version = "0.10.4"
318+
version = "1.0.3"
319319

320320
[[MozillaCACerts_jll]]
321321
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
@@ -408,9 +408,9 @@ deps = ["Serialization"]
408408
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
409409

410410
[[RecipesBase]]
411-
git-tree-sha1 = "44a75aa7a527910ee3d1751d1f0e4148698add9e"
411+
git-tree-sha1 = "a4425fe1cde746e278fa895cc69e3113cb2614f6"
412412
uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
413-
version = "1.1.2"
413+
version = "1.2.0"
414414

415415
[[RecursiveFactorization]]
416416
deps = ["LinearAlgebra", "LoopVectorization", "Polyester", "StrideArraysCore", "TriangularSolve"]
@@ -516,9 +516,9 @@ version = "0.33.13"
516516

517517
[[StatsFuns]]
518518
deps = ["ChainRulesCore", "InverseFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"]
519-
git-tree-sha1 = "385ab64e64e79f0cd7cfcf897169b91ebbb2d6c8"
519+
git-tree-sha1 = "bedb3e17cc1d94ce0e6e66d3afa47157978ba404"
520520
uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c"
521-
version = "0.9.13"
521+
version = "0.9.14"
522522

523523
[[StrideArraysCore]]
524524
deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "ManualMemory", "Requires", "SIMDTypes", "Static", "ThreadingUtilities"]

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
1818
DataFrames = "1, 0.22, 0.21, 0.20, 0.19"
1919
DiffRules = "1"
2020
Measurements = "2"
21-
MonteCarloMeasurements = "0.10, 0.9"
21+
MonteCarloMeasurements = "1, 0.10, 0.9"
2222
OrderedCollections = "1"
2323
RecursiveFactorization = "0.2, 0.1"
2424
TimerOutputs = "0.5"

docs/src/index.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,21 @@ julia> ]add Unitful, Measurements, MonteCarloMeasurements, Distributions
8383

8484
## Release Notes
8585

86+
### Version 0.7.6
87+
88+
- Solve linear equation systems optionally with [RecursiveFactorization.jl](https://github.com/YingboMa/RecursiveFactorization.jl)
89+
instead of the default `lu!(..)` and `ldiv!(..)`.
90+
91+
- Project.toml: Changed DiffRules from "~1.0" to "1", since issue with "1.2.1"
92+
(leading to an error in runtests) seems to be fixed.
93+
94+
- Project.toml: Added version 1 of MonteCarloMeasurements.
95+
96+
- Updated used packages.
97+
98+
- Tutorial slightly improved.
99+
100+
86101
### Version 0.7.5
87102

88103
- Added a restriction, so that DiffRules 1.0.2 is used, instead of 1.2.1 (which leads to an error in the test suite).

src/EquationAndStateInfo.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ const niter_max = 20 # Maximum number of fixed-point iterations to solve A*x =
5959
"""
6060
leq = LinearEquations{FloatType}(vTear_names::Vector{String}, vTear_lengths::Vector{Int},
6161
nResiduals::Int, A_is_constant::Bool;
62-
nxRecursiveFactorization = 0)
62+
useRecursiveFactorizationUptoSize = 0)
6363
6464
Define linear equation system "A*x=b" with `length(x) = sum(vTear_lengths)`.
6565
If `A_is_constant = true` then `A` is a matrix that is constant after
6666
initialization.
6767
68-
If length(x) <= nxRecursiveFactorization, then linear equation systems will be solved with
68+
If length(x) <= useRecursiveFactorizationUptoSize, then linear equation systems will be solved with
6969
`RecursiveFactorization.jl` instead of the default `lu!(..)` and `ldiv!(..)`.
7070
7171
For details of its usage for code generation see [`LinearEquationsIteration`](@ref).
@@ -97,24 +97,24 @@ mutable struct LinearEquations{FloatType <: Real}
9797
# Constructed during initialization
9898
residual_unitRanges::Vector{UnitRange{Int}} # residuals[residual_unitRanges[i]] = residual_value[i], if residual is a vector
9999
residual_indices::Vector{Int} # residuals[residual_indices[i]] = residual_value[i], if residual is a scalar
100-
recursiveFactorization::Bool # = true, if RecursiveFactorization.jl shall be used to solve the linear equation system
100+
useRecursiveFactorization::Bool # = true, if RecursiveFactorization.jl shall be used to solve the linear equation system
101101

102102
luA::LU{FloatType,Array{FloatType,2}} # lu-Decomposition of A
103103

104104
function LinearEquations{FloatType}(vTear_names::Vector{String}, vTear_lengths::Vector{Int},
105105
nResiduals::Int, A_is_constant::Bool;
106-
nxRecursiveFactorization::Int = 0) where {FloatType <: Real}
106+
useRecursiveFactorizationUptoSize::Int = 0) where {FloatType <: Real}
107107
@assert(length(vTear_names) > 0)
108108
@assert(length(vTear_names) == length(vTear_lengths))
109109
nx = sum(vTear_lengths)
110110
@assert(nx > 0)
111111
state = -1
112-
recursiveFactorization = nx <= nxRecursiveFactorization
112+
useRecursiveFactorization = nx <= useRecursiveFactorizationUptoSize
113113

114114
new(A_is_constant, vTear_names, vTear_lengths, zeros(FloatType,nx), nResiduals,
115115
zeros(FloatType,nx,nx), zeros(FloatType,nx), fill(0,nx), zeros(FloatType,nx),
116116
Vector{Any}(undef,nResiduals), -4, -1, niter_max, false, String[], String[],
117-
fill(0:0,nResiduals), fill(0,nResiduals), recursiveFactorization)
117+
fill(0:0,nResiduals), fill(0,nResiduals), useRecursiveFactorization)
118118
end
119119
end
120120
LinearEquations(args...) = LinearEquations{Float64}(args...)

src/ModiaBase.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Main module of ModiaBase.
99
module ModiaBase
1010

1111
const path = dirname(dirname(@__FILE__)) # Absolute path of package directory
12-
const Version = "0.7.2-dev"
13-
const Date = "2021-04-19"
12+
const Version = "0.7.2"
13+
const Date = "2021-11-23"
1414

1515
#println("\nImporting ModiaBase Version $Version ($Date)")
1616

0 commit comments

Comments
 (0)