help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] What's the meaning???


From: Marco Morbe
Subject: [Help-gsl] What's the meaning???
Date: Tue, 25 Apr 2006 00:03:28 +0200 (CEST)

I receive the message when my program was running:

gsl: sinint.c:359: ERROR: domain error
Default GSL error handler invoked.
Aborted

what's the meaning???
My prgram was ok since i addicted the following rows:

if (fabs (j - j_esterno) == 1.0)
{
    distanza_collinear = dist_adiacenti_collinear ;
}
else
{
    distanza_collinear = (dist_adiacenti_collinear / fabs (j - j_esterno)) + 
(lunghezza_dipolo / fabs (j_esterno - j - 1)) ;
}


Now my program is:

void onda_vert_piano_gp (gsl_matrix_complex *matrice_acc_dipoli, gsl_vector 
*elementi_guasti_x, gsl_vector *elementi_guasti_y, int guasti, int N, int M, 
int dist_adiacenti_side_by_side, int dist_adiacenti_collinear, int 
lunghezza_dipolo, char *parassita)
{
    int i, j, i_esterno, j_esterno, guasto = 0 ;
    double distanza_collinear, distanza_side_by_side ;
    gsl_complex accoppiamento, collinear_x, side_y ;

    for (i_esterno = 0 ; i_esterno < M ; i_esterno++)
    {
        for (j_esterno = 0 ; j_esterno < N ; j_esterno++)
        {
            for (i = 0 ; i < M ; i++)
            {
                /* Lungo x sono collinear. */
//                 distanza_collinear = dist_adiacenti_collinear * fabs 
(i_esterno - i) ;
                        distanza_side_by_side = dist_adiacenti_side_by_side / 
fabs (i_esterno - i) ;
                for (j = 0 ; j < N ; j++)
                {
                    if ((i_esterno == i) && (j_esterno == j))
                    {
                        guasto = ricerca_guasto_piano (elementi_guasti_x, 
elementi_guasti_y, guasti, i, j, i_esterno, j_esterno) ;
                        if (guasto == 1)
                        {
                            if (strcmp (parassita, "ca") == 0)
                            {
                                GSL_SET_COMPLEX (&accoppiamento, 10e30, 0.0) ; 
/* Caso di ca. */
                            }
                            else
                            {
                                GSL_SET_COMPLEX (&accoppiamento, 0.0, 0.0) ; /* 
Caso di cc. */
                            }
                            guasto = 0 ;
                        }
                        else
                        {
                            auto_impedenza (&accoppiamento, lunghezza_dipolo) ;
                        }
                    }
                    else
                    {
                        /* Lungo y sono side-by-side. */
    if (fabs (j - j_esterno) == 1.0)
    {
        distanza_collinear = dist_adiacenti_collinear ;
    }
    else
    {
        distanza_collinear = (dist_adiacenti_collinear / fabs (j - j_esterno)) 
+ (lunghezza_dipolo / fabs (j_esterno - j - 1)) ;
    }
                        guasto_piano_d_gp (distanza_collinear, 
distanza_side_by_side, lunghezza_dipolo, &side_y, &collinear_x, &accoppiamento) 
;
                    }
                    gsl_matrix_complex_set (matrice_acc_dipoli, N * i_esterno + 
j_esterno, N * i + j, accoppiamento) ;
                }
            }
        }
    }
}

I think the problem is with the if () written with red. Do u know the reason?

bye Marco.

                
---------------------------------
Yahoo! Messenger with Voice: chiama da PC a telefono a tariffe esclusive


reply via email to

[Prev in Thread] Current Thread [Next in Thread]