[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] Re: Bug-gsl Digest, Vol 78, Issue 12
From: |
Siji P George |
Subject: |
[Bug-gsl] Re: Bug-gsl Digest, Vol 78, Issue 12 |
Date: |
Thu, 23 Jul 2009 08:41:40 +0530 (IST) |
User-agent: |
SquirrelMail/1.4.13 |
Hi,
thank you very much .
there is no windows version for gsl>1.8 .
can u guide me how can i compile it from source on windows.
thanks & regards,
Siji
> Send Bug-gsl mailing list submissions to
> address@hidden
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.gnu.org/mailman/listinfo/bug-gsl
> or, via email, send a message with subject or body 'help' to
> address@hidden
>
> You can reach the person managing the list at
> address@hidden
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Bug-gsl digest..."
>
>
> Today's Topics:
>
> 1. gsl_eigen_nonsymm_workspace (Siji P George)
> 2. Re: gsl_eigen_nonsymm_workspace (Patrick Alken)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 22 Jul 2009 17:10:32 +0530 (IST)
> From: "Siji P George" <address@hidden>
> Subject: [Bug-gsl] gsl_eigen_nonsymm_workspace
> To: address@hidden
> Message-ID: <address@hidden>
> Content-Type: text/plain;charset=iso-8859-1
>
> Hi,
>
> We are using gsl in our program and the version installed is gsl-1.8.exe.
>
> it is giving compilation error ,which is given below:
>
> : error C2065: 'gsl_eigen_nonsymm_workspace' : undeclared identifier
> : error C2065: 'workspace' : undeclared identifier
> : error C3861: 'gsl_eigen_nonsymm_alloc': identifier not found
> : error C3861: 'gsl_eigen_nonsymm': identifier not found
> : error C3861: 'gsl_eigen_nonsymm_free': identifier not found
>
> i have included the following headers:
>
> #include <gsl/gsl_errno.h>
> #include <gsl/gsl_vector.h>
> #include <gsl/gsl_matrix.h>
> #include <gsl/gsl_blas.h>
> #include <gsl/gsl_linalg.h>
> #include <gsl/gsl_multiroots.h>
> #include <gsl/gsl_sort.h>
> #include <gsl/gsl_sort_vector.h>
> #include <gsl/gsl_eigen.h>
>
> and the piece of code is also given below:
> -------------------------------------------------------------------------------
> void SteadyState::classifyState( const double* T )
> {
> unsigned int nConsv = nVarMols_ - rank_;
> gsl_matrix* J = gsl_matrix_calloc ( nVarMols_, nVarMols_ );
> // double* yprime = new double[ nVarMols_ ];
> // vector< double > yprime( nVarMols_, 0.0 );
> // Generate an approximation to the Jacobean by generating small
> // increments to each of the molecules in the steady state, one
> // at a time, and putting the resultant rate vector into a column
> // of the J matrix.
> // This needs a bit of heuristic to decide what is a 'small' increment.
> // Use the totals for this.
> double tot = 0.0;
> for ( unsigned int i = 0; i < nConsv; ++i ) {
> tot += T[i];
> }
> tot *= DELTA;
>
> // Fill up Jacobian
> for ( unsigned int i = 0; i < nVarMols_; ++i ) {
> double orig = s_->S()[i];
> s_->S()[i] = orig + tot;
> s_->updateV();
> s_->S()[i] = orig;
> // yprime.assign( nVarMols_, 0.0 )
> // vector< double >::iterator y = yprime.begin();
>
> // Compute the rates for each mol.
> for ( unsigned int j = 0; j < nVarMols_; ++j ) {
> // *y++ = N_.computeRowRate( j, s_->velocity() );
> double temp = s_->N().computeRowRate( j, s_->velocity()
> );
> gsl_matrix_set( J, i, j, temp );
> }
> }
>
> // Jacobian is now ready. Find eigenvalues.
> gsl_vector_complex* vec = gsl_vector_complex_alloc( nVarMols_ );
> gsl_eigen_nonsymm_workspace* workspace =
> gsl_eigen_nonsymm_alloc( nVarMols_ );
> int status = gsl_eigen_nonsymm( J, vec, workspace );
> if ( status != GSL_SUCCESS ) {
> cout << "Warning: failed to find eigenvalues. Status = " <<
> status << endl;
> solutionStatus_ = 2; // Steady state OK, eig classification
> failed
> } else { // Eigenvalues are ready. Classify state.
> nNegEigenvalues_ = 0;
> nPosEigenvalues_ = 0;
> for ( unsigned int i = 0; i < nVarMols_; ++i ) {
> gsl_complex z = gsl_vector_complex_get( vec, i );
> double r = GSL_REAL( z );
> nNegEigenvalues_ += ( r < -EPSILON );
> nPosEigenvalues_ += ( r > EPSILON );
> }
> if ( nNegEigenvalues_ == rank_ )
> stateType_ = 0; // Stable
> else if ( nPosEigenvalues_ == rank_ )
> stateType_ = 1; // Unstable
> else if (nNegEigenvalues_ == rank_ - 1)
> stateType_ = 2; // Saddle
> else
> stateType_ = 3; // Other
> }
>
> gsl_vector_complex_free( vec );
> gsl_matrix_free ( J );
> gsl_eigen_nonsymm_free( workspace );
> }
> ----------------------------------------------------------------------------------
>
> the same program works fine on linux. no idea what is wrong on windows?
> plz help.
>
>
> thanks & regards,
> Siji
>
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 22 Jul 2009 07:44:06 -0600
> From: Patrick Alken <address@hidden>
> Subject: Re: [Bug-gsl] gsl_eigen_nonsymm_workspace
> To: address@hidden
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset=us-ascii
>
>>
>>
> We are using gsl in our program and the version installed is gsl-1.8.exe.
>
> Nonsymmetric eigensystems were added in gsl 1.9
>
>
>
>
> ------------------------------
>
> _______________________________________________
> Bug-gsl mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-gsl
>
>
> End of Bug-gsl Digest, Vol 78, Issue 12
> ***************************************
>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-gsl] Re: Bug-gsl Digest, Vol 78, Issue 12,
Siji P George <=