CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

scalar block pentadiagonal solver

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 13, 2015, 19:00
Default scalar block pentadiagonal solver
  #1
Senior Member
 
Joachim
Join Date: Mar 2012
Location: Paris, France
Posts: 145
Rep Power: 15
Joachim is on a distinguished road
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
Joachim is offline   Reply With Quote

Old   April 14, 2015, 09:45
Default
  #2
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
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).
mprinkey is offline   Reply With Quote

Old   April 14, 2015, 09:58
Default
  #3
Member
 
Join Date: Dec 2012
Posts: 92
Rep Power: 13
beer is on a distinguished road
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.
beer is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 05:30.