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

flop count for linear system solvers

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 7, 2005, 17:53
Default flop count for linear system solvers
  #1
no_name
Guest
 
Posts: n/a
Hi All,

does any one have a reference clearly describing how to do a floating/double point count for linear sys. slovers like gauss elemination, cholesky, LU ....ect . For eg. Gauss elem. is O(N^3/3).... how does one come with this estimate ??? explanations, references appreciated ???

thnx.

  Reply With Quote

Old   December 7, 2005, 20:46
Default Re: flop count for linear system solvers
  #2
Tiger
Guest
 
Posts: n/a
Try this website http://www.nr.com/

Other good references are

Linear Algebra and Its Applications Author: Gilbert Strang

Numerical Linear Algebra Author: Lloyd Trefethen

  Reply With Quote

Old   December 7, 2005, 23:10
Default Re: flop count for linear system solvers
  #3
Ynot
Guest
 
Posts: n/a
First of all, write down your algorithm as pseudocode. Now simply count the number of operations that the algorithm is doing (per iteration of course). all operations: addition, subtraction, multiplication, and division count the same. This is not exact since multiplication has several additions inside it and division has several multiplications... But it seems reasonable to assume that all operations are the same.

Here is an example (just for illustration):

for i = 0 to P

for n = 1 to N (number of elements in array)

B(n) = a(n)*a(n-1) - 2*c(n) + 3

next n

next i

for each n you have 2 multiplications, one subtraction, and one addition = 2+1+1 = 4 operations. For all the number of elements you therefore have: 4N operations. It is at this stage that you state the order of your algorithm. In this example, its is O(4N) or simply O(N) (constants do not count). For all iterations, you have 4N(P+1) operations. (remember, if u're starting from zero, you are doing p+1 steps).

Hope that was helpful
  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
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 19:56
Systems of Nonlinear Equations Tanay Main CFD Forum 5 November 2, 2010 16:27
New linear system solvers chegdan OpenFOAM Running, Solving & CFD 11 April 30, 2010 11:22
Need ideas-fuel discharge system Jan CFX 1 October 9, 2006 09:16
[Other] Importing a mesh in system memory using C directly to OpenFoam Solvers juanduque OpenFOAM Meshing & Mesh Conversion 1 August 10, 2006 05:15


All times are GMT -4. The time now is 00:09.