|
[Sponsors] |
April 13, 2015, 19:00 |
scalar block pentadiagonal solver
|
#1 |
Senior Member
Joachim
Join Date: Mar 2012
Location: Paris, France
Posts: 145
Rep Power: 15 |
Hello everyone!
I am looking for a code that would solve a block pentadiagonal system of equations, in which all 5 blocks are diagonal. Basically, I have Ax(i-2) + Bx(i-1) + Cx(i) + Dx(i+1) + Ex(i+2) = F in which x is a vector of dimension N, and A, B, C,... are diagonal matrices of dimension N by N. Would you know an efficient way to solve this system (exact solution)? A fortran code would be perfect, but even if you only have the theory, I'll take it! thank you! Joachim |
|
April 14, 2015, 09:45 |
|
#2 |
Senior Member
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25 |
I gave a lot of details and links to sample code here a week or so ago:
http://www.cfd-online.com/Forums/mai...tml#post540661 There is discussion above about block Thomas solvers too. You can easily take the scalar pentadiagonal code and turn the scalar elimination into block elimination. The only tricky part is replacing the scalar division with multiplication by matrix inverse (really, LU factorization of the divisor matrix and repeated LU evaluation for each block). |
|
April 14, 2015, 09:58 |
|
#3 |
Member
Join Date: Dec 2012
Posts: 92
Rep Power: 13 |
http://www.math.uakron.edu/~kreider/anpde/penta.f
Or use SIP (Strongly implicit procedure) if you want a more general approach. Apart from that I would always encourage people to use libraries like petsc or paralution. They are very fast, precise and stable. Also they are easy to use (some more, some less) and open source. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Floating Point Exception Error | nyox | FLUENT | 11 | November 30, 2018 12:31 |
Transport Equation for a scalar - Compressible Solver | alessio.nz | OpenFOAM Programming & Development | 5 | April 11, 2013 09:04 |
block tridiagonal system solver for periodic bc | Abdullah | Main CFD Forum | 8 | February 23, 2007 13:15 |
Block Tridiagonal Solver | Abdulhafid M. Elfaghi | Main CFD Forum | 2 | December 23, 2006 12:20 |
matrix solver about block structured grid | young min, Sohn | Main CFD Forum | 1 | July 11, 2000 19:35 |