Query on Conjugate Gradient for Sparse System


obriendj
01-10-2003, 10:31 AM
I was hoping if somone could help me, in the Conjugate Gradient Method for a Sparse System, there is a method LINBCG.

It has two external variables Vec_INT ija_p; and Vec_DP sa_p;

I would like to use this method with my program but when i pass in my Vectors it gives me an error. About the 2 external variables how do I create them do i have to call a different method??

Thanks in advance for any help
Donal O'Brien
(IRELAND)

Saul Teukolsky
01-10-2003, 06:02 PM
Dear Donal,

Use the scheme described on p. 23 of the C++ book. The calling program [e.g. with main()] has the global pointer declarations and assigns them with new. There is an example in xlinbcg.cpp if you have the example routines.

Saul Teukolsky