Underlying Implementation of LDL in Matlab

1 view (last 30 days)
The general question is: how is the ldl implemented in Matlab?
Motivation: I want to confirm the ldl implementation is not using the same algorithm as the lu() function (which I'm aware uses umfpack). The reason I am asking is that when I compare the speed of the ldl and lu on the same sparse laplacian matrix, the ldl comes out a lot slower than doing [L,U,P,Q] = lu(A), even though we expect the ldl to be, at best, up to 50% faster. My hunch here is that the ldl is not using the same multifrontal solver as umfpack is:
Code snippet for reference:
A = (delsq(numgrid('L', 400)));
%A2 = full(delsq(numgrid('L', 40)));
bA = sum(A,2);
tic
[LA, DA, PA, SA] = ldl(A);
toc
x = SA*(PA'\(LA'\(DA\(LA\(PA\(SA*bA))))));
tic
[L,U,P,Q] = lu(A);
toc
xl = P\(U\(L\(Q\bA)));
figure(); plot(x);
hold on;
plot(xl)

Answers (0)

Categories

Find more on Linear Algebra in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!