Skip to content

Commit

Permalink
AdS5_3_1 [compute_gauge_t, find_AH]: it makes more sense that Dxx_2D,…
Browse files Browse the repository at this point in the history
… etc, operators are unchanged and the _Dxx_2D, etc, ones are modified

also call explicitly lu to factorize the A_mat matrices
  • Loading branch information
mzilhao committed Oct 9, 2020
1 parent 235a10a commit 680a2e6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
23 changes: 13 additions & 10 deletions src/AdS5_3_1/compute_gauge_t.jl
Original file line number Diff line number Diff line change
Expand Up @@ -293,20 +293,23 @@ function compute_xi_t!(gauge_t::Gauge, bulkconstrain::BulkConstrained,
byId = Diagonal(by)
ccId = Diagonal(cc)

# overwrite the operators with the coefficients computed in the loop above
# (note that _Dxx_2D, _Dyy_2D, etc, are never overwritten)
mul!(Dxx_2D, axxId, _Dxx_2D)
mul!(Dyy_2D, ayyId, _Dyy_2D)
mul!(Dxy_2D, axyId, _Dxy_2D)
mul!(Dx_2D, bxId, _Dx_2D)
mul!(Dy_2D, byId, _Dy_2D)
# build the differential operators by multiplying with the coefficients
# computed in the loop above (note that Dxx_2D, Dyy_2D, etc, are never
# overwritten)
mul!(_Dxx_2D, axxId, Dxx_2D)
mul!(_Dyy_2D, ayyId, Dyy_2D)
mul!(_Dxy_2D, axyId, Dxy_2D)
mul!(_Dx_2D, bxId, Dx_2D)
mul!(_Dy_2D, byId, Dy_2D)

# build actual operator to be inverted
A_mat = Dxx_2D + Dyy_2D + Dxy_2D + Dx_2D + Dy_2D + ccId
A_mat = _Dxx_2D + _Dyy_2D + _Dxy_2D + _Dx_2D + _Dy_2D + ccId

sol = A_mat \ b_vec
# solve system
A_fact = lu(A_mat)
ldiv!(A_fact, b_vec)

copyto!(xi_t, sol)
copyto!(xi_t, b_vec)

nothing
end
20 changes: 11 additions & 9 deletions src/AdS5_3_1/find_AH.jl
Original file line number Diff line number Diff line change
Expand Up @@ -438,18 +438,20 @@ function find_AH!(sigma::Array, bulkconstrain::BulkConstrained,
byId = Diagonal(by)
ccId = Diagonal(cc)

# overwrite the operators with the coefficients computed in the loop above
# (note that _Dxx_2D, _Dyy_2D, etc, are never overwritten)
mul!(Dxx_2D, axxId, _Dxx_2D)
mul!(Dyy_2D, ayyId, _Dyy_2D)
mul!(Dxy_2D, axyId, _Dxy_2D)
mul!(Dx_2D, bxId, _Dx_2D)
mul!(Dy_2D, byId, _Dy_2D)
# build the differential operators by multiplying with the coefficients
# computed in the loop above (note that Dxx_2D, Dyy_2D, etc, are never
# overwritten)
mul!(_Dxx_2D, axxId, Dxx_2D)
mul!(_Dyy_2D, ayyId, Dyy_2D)
mul!(_Dxy_2D, axyId, Dxy_2D)
mul!(_Dx_2D, bxId, Dx_2D)
mul!(_Dy_2D, byId, Dy_2D)

# build actual operator to be inverted
A_mat = Dxx_2D + Dyy_2D + Dxy_2D + Dx_2D + Dy_2D + ccId
A_mat = _Dxx_2D + _Dyy_2D + _Dxy_2D + _Dx_2D + _Dy_2D + ccId

A_fact = factorize(A_mat)
# solve system
A_fact = lu(A_mat)
ldiv!(f0, A_fact, b_vec)

# update solution
Expand Down

0 comments on commit 680a2e6

Please sign in to comment.