forum.alglib.net

ALGLIB forum
It is currently Sat Dec 21, 2024 5:05 pm

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Solver for symmetric, hermitian, real, sparse Linear System
PostPosted: Fri Nov 08, 2019 4:21 pm 
Offline

Joined: Fri Nov 08, 2019 4:09 pm
Posts: 4
I have a 2D-FEM-simulation and want to solve the linear equation system Ax = b for it.
Hence, my matrix is
- quadratic
- symmetric
- hermitian
- real
- sparse as on https://en.wikipedia.org/wiki/Sparse_matrix

Which solver is the best for my matrix?
And could you maybe give me a codesnippet of how to code it in C# beginning with:
Code:
alglib.sparsematrix s;

sparsesolvesks(...) works, but is not pretty fast ...


Top
 Profile  
 
 Post subject: Re: Solver for symmetric, hermitian, real, sparse Linear Sys
PostPosted: Mon Nov 11, 2019 8:20 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
1. How many variables do you have?
2. How many non-zero elements per entire matrix do you have?


Top
 Profile  
 
 Post subject: Re: Solver for symmetric, hermitian, real, sparse Linear Sys
PostPosted: Mon Nov 11, 2019 8:56 am 
Offline

Joined: Fri Nov 08, 2019 4:09 pm
Posts: 4
1. around 5000x5000 matrix
2. around 10 non-zero-elements per row


Top
 Profile  
 
 Post subject: Re: Solver for symmetric, hermitian, real, sparse Linear Sys
PostPosted: Tue Nov 12, 2019 9:02 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
Did you try sparselu() function?

Ideally, you should use Cholesky for positive definite matrices - but presently we do not have sparse Cholesky in ALGLIB, it is planned to be included in version 3.17.0 (we have a lot of stuff in upcoming 3.16.0 which will benefit from sparse Cholesky, so it is of high priority for us).


Top
 Profile  
 
 Post subject: Re: Solver for symmetric, hermitian, real, sparse Linear Sys
PostPosted: Thu Nov 14, 2019 7:58 am 
Offline

Joined: Fri Nov 08, 2019 4:09 pm
Posts: 4
Yes, Cholesky would be very nice and I am very interested in implementing this to ALGLIB :)


Top
 Profile  
 
 Post subject: Re: Solver for symmetric, hermitian, real, sparse Linear Sys
PostPosted: Fri Nov 15, 2019 12:43 pm 
Offline

Joined: Fri Nov 08, 2019 4:09 pm
Posts: 4
How do i get a row permutation matrix and a column permutation matrix?


Top
 Profile  
 
 Post subject: Re: Solver for symmetric, hermitian, real, sparse Linear Sys
PostPosted: Fri Nov 15, 2019 2:29 pm 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
alglib::sparselu returns them in parameters p and q, as product of individual permutations (see subroutine comments for exact format)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group