[CSC 435] Fwd: Matrices

Andrew Pounds pounds at sandbox.mercer.edu
Sat Mar 26 04:58:06 EDT 2016


The earlier e-mail I sent you about building diagonally dominant 
matrices apparently does not go far enough. Change the line

matrixa(j,i) = 2.0 * ranval * DIM

to


matrixa(j,i) =  ranval * DIM * DIM


to guarantee that the matrix will be diagonally dominant.  Again, this 
should only be a problem when it comes to the iterative linear solver.


-------- Forwarded Message --------
Subject: 	[CSC 435] Matrices
Resent-From: 	pounds_aj at mercer.edu
Date: 	Wed, 23 Mar 2016 18:43:46 +0000
From: 	Andrew J. Pounds <POUNDS_AJ at mercer.edu>
Reply-To: 	Andrew J. Pounds <POUNDS_AJ at mercer.edu>
To: 	csc435 at theochem.mercer.edu <csc435 at theochem.mercer.edu>



Guys -- while the direct linear solver does not have to have a 
diagonally dominant matrix to guarantee convergence (it does the row 
interchanges to obviate the need for that requirement) the iterative 
linear solver needs to have a diagonally dominant matrix "A" to 
/guarantee/ convergence.

Here is how I constructed my matrix A in my Fortran code to make sure I 
was close to diagonal dominance.


do i = 1, DIM
    do j = 1, DIM
    call random_number(ranval)
      if ( i .ne. j) then
        matrixa(j,i) = ranval
      else
        matrixa(j,i) = 2.0 * ranval * DIM
      endif
    enddo
enddo


-- 
Andrew J. Pounds, Ph.D.  (pounds_aj at mercer.edu)
Professor of Chemistry and Computer Science
Mercer University,  Macon, GA 31207   (478) 301-5627
http://faculty.mercer.edu/pounds_aj



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc435/attachments/20160326/08631341/attachment.html>
-------------- next part --------------
_______________________________________________
csc435 mailing list
csc435 at theochem.mercer.edu
http://theochem.mercer.edu/mailman/listinfo/csc435


More information about the csc435 mailing list