@@ -104,7 +104,7 @@ Define linear equation system "A*x=b" with `x::Vector{FloatType}`.
104104- If length(x) <= useRecursiveFactorizationUptoSize, then linear equation systems will be solved with
105105 `RecursiveFactorization.jl` instead of the default `lu!(..)` and `ldiv!(..)`.
106106
107- For details how to use this constructor, see [`LinearEquationsIteration`](@ref).
107+ For details how to use this constructor, see [`LinearEquationsIteration! `](@ref).
108108"""
109109mutable struct LinearEquations{FloatType <: Real }
110110 odeMode:: Bool # Set from the calling function after LinearEquations was instantiated (default: true)
@@ -137,7 +137,7 @@ mutable struct LinearEquations{FloatType <: Real}
137137 residuals:: Vector{FloatType} # Values of the residuals FloatType vector; length(residuals) = length(x)
138138
139139 # Iteration status of for-loop
140- mode:: Int # Operational mode (see function LinearEquationsIteration)
140+ mode:: Int # Operational mode (see function LinearEquationsIteration! )
141141 niter:: Int # Current number of iterations in the fix point iteration scheme
142142 niter_max:: Int # Maximum number of iterations
143143 success:: Bool # = true, if solution of A*x = b is successfully computed
@@ -216,7 +216,7 @@ function getDerivatives!(_der_x, _x, _m, _time)::Nothing
216216 ...
217217 _leq = _m.linearEquations[<nr>] # leq::LinearEquations{FloatType}
218218 _leq.mode = -3 # initializes the iteration
219- while LinearEquationsIteration(_leq, _m.isInitial, _m.solve_leq, _m.storeResult, _m.time, _m.timer)
219+ while LinearEquationsIteration! (_leq, _m.isInitial, _m.solve_leq, _m.storeResult, _m.time, _m.timer)
220220 x1 = _leq.x[1]
221221 x2 = _leq.x[2]
222222 x3 = _leq.x_vec[1]
@@ -250,7 +250,7 @@ and used in subsequent calls to solve the equation system.
250250
251251- `leq::LinearEquations{FloatType}`: Instance of `LinearEquations`.
252252- `isInitial::Bool`: = true: Called during initialization.
253- - `solve::Bool`: = true: leq.x is computed by LinearEquationsIteration.
253+ - `solve::Bool`: = true: leq.x is computed by LinearEquationsIteration! .
254254 = false: leq.x has been set by calling environment
255255 (typically when called from DAE integrator).
256256 Note, at events and at terminate, solve must be true).
@@ -281,7 +281,7 @@ leq.mode > 0: Compute "residuals .= A*e_i - b" # e_i = unit vector with i = l
281281# Hidden argument `leq.mode::Int` on input
282282
283283```julia
284- leq.mode = -3 # LinearEquationsIteration is called the first time
284+ leq.mode = -3 # LinearEquationsIteration! is called the first time
285285 if leq.odeMode || solve
286286 # ODE mode or DAE mode at an event (solve "x" from equation "residuals = A*x - b")
287287 # Initialize fixed point iteration or continue fixed point iteration (if in DAE mode)
@@ -353,7 +353,7 @@ function LinearEquationsIteration!(leq::LinearEquations{FloatType}, isInitial::B
353353 nx = length (leq. x)
354354
355355 if mode == - 3
356- # LinearEquationsIteration is called the first time in the current model evaluation
356+ # LinearEquationsIteration! is called the first time in the current model evaluation
357357 leq. niter = 0 # Number of event iterations
358358 empty! (leq. inconsistentPositive)
359359 empty! (leq. inconsistentNegative)
@@ -410,7 +410,7 @@ function LinearEquationsIteration!(leq::LinearEquations{FloatType}, isInitial::B
410410 residuals = leq. residuals
411411
412412 if length (residuals) != length (x)
413- error (" Function LinearEquationsIteration wrongly used:\n " ,
413+ error (" Function LinearEquationsIteration! wrongly used:\n " ,
414414 " length(leq.residuals) = " , length (leq. residuals), " , length(leq.x) = " , length (leq. x))
415415 end
416416
@@ -453,12 +453,12 @@ function LinearEquationsIteration!(leq::LinearEquations{FloatType}, isInitial::B
453453 else
454454 x .= b
455455 if leq. useRecursiveFactorization
456- ModiaBase. TimerOutputs. @timeit timer " ModiaBase LinearEquationsIteration (solve A*x=b Rec.Fac.)" begin
456+ ModiaBase. TimerOutputs. @timeit timer " ModiaBase LinearEquationsIteration! (solve A*x=b Rec.Fac.)" begin
457457 leq. luA = RecursiveFactorization. lu! (A, leq. pivots)
458458 ldiv! (leq. luA, x)
459459 end
460460 else
461- ModiaBase. TimerOutputs. @timeit timer " ModiaBase LinearEquationsIteration (solve A*x=b)" begin
461+ ModiaBase. TimerOutputs. @timeit timer " ModiaBase LinearEquationsIteration! (solve A*x=b)" begin
462462 leq. luA = lu! (A)
463463 ldiv! (leq. luA, x)
464464 end
0 commit comments