Underlying Implementation of LDL in Matlab

1 vue (au cours des 30 derniers jours)
Nathan Zhao
Nathan Zhao le 5 Jan 2022
Commenté : Nathan Zhao le 5 Jan 2022
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)

Réponses (0)

Catégories

En savoir plus sur Linear Algebra dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by