The problem is, as I loop though my parameter space, I need to solve a lot 
of linear systems of the type \(A,B), where B stays the same but A changes 
depending on the parameters. Therefore a method that overwrites B doen't 
really help.

On Friday, April 10, 2015 at 6:19:34 PM UTC+2, Andreas Noack wrote:
>
> Yes. This has to be made more clear. The problem is that the libraries we 
> are using for sparse factorizations don't allow us to update b in place.
>
> 2015-04-10 4:26 GMT-07:00 Kristoffer Carlsson <[email protected] 
> <javascript:>>:
>
>> I think it should be A_ldiv_B! however this seems inconcistent to me:
>>
>> julia> a = rand(3,3); b = rand(3)
>> 3-element Array{Float64,1}:
>>  0.95134 
>>  0.43887 
>>  0.719551
>>
>> julia> A_ldiv_B!(sparse(a), b) 
>> 3-element Array{Float64,1}:
>>  0.455667
>>  0.712479
>>  0.326213
>>
>>
>> julia> b # Note: b is not overwritten
>> 3-element Array{Float64,1}:
>>  0.95134 
>>  0.43887 
>>  0.719551
>>
>>
>> julia> A_ldiv_B!(lufact(a), b)
>> 3-element Array{Float64,1}:
>>  0.455667
>>  0.712479
>>  0.326213
>>
>>
>> julia> b # For this, b is overwritten
>> 3-element Array{Float64,1}:
>>  0.455667
>>  0.712479
>>  0.326213
>>
>>
>>
>>
>> On Friday, April 10, 2015 at 11:19:45 AM UTC+2, Andrei Berceanu wrote:
>>
>>> I am solving a linear system of the type A*X == B, where A is a sparse 
>>> matrix. I use the matrix division function
>>> \(*A*, *B*)
>>>
>>> Is there an in-place version of this function, where one can 
>>> pre-allocate the output X and then pass it, i.e.
>>>
>>> \!(A,B,X)
>>>
>>>
>>>
>

Reply via email to