Blitz++

2009-03-05
2013-05-09
  • void temperature (double T, Array <double,3> &G, Array <double,1> &Gref)
    {
    int t, p, i, j, r, k,l;
    Array <double,2> Tr(4,2);
    Array <double,5> GHSERp(4,2,2,2,11);
    Array <double,4> GHSERs(2,2,2,11); 
    Array <double,3> y(2,3,4);
    Array <double,1> n(4);

    (*nrtemperature)(Tr);
    (*nrGHSER)(GHSERp);

    /******Faire l'inscription de la matrice avec 5 indices sur matrice avec 4 indices**************/
    cout<<"Tr(t,p)"<<Tr<<endl;
    cout<<GHSERp<<endl;

    /**Here should be a search in a matrix double T. After it is necessary to fix an index and, then, rewrite this matrix GHSERp(k,l,i,j,r) in a kind matrix GHSERs(l,i,j,r). I don't no how I can do it this...:(
    I used the function extend(int dimention), but it didn't worked.**/

    for (t=0; t<4; ++t)
    {
    for (p=0; p<2; ++p)
    if (T==Tr(t,p)) {k = t; l = p;}
    if (T==Tr(t+1,p)) {k = t + 1; l = p;}
    else if ((T - Tr(t,p))>0 && (T - Tr(t+1,p))<0)

    k=t; l=p;
    for (i=0; i<2; ++i)
    for (j=0; j<2; ++j)
    for (r=0; r<11; ++r)
    GHSERs(l,i,j,r) = GHSERp(k,l,i,j,r); 
    }

    }
    cout<<"GHSERs"<<GHSERs<<endl;
    /*****Faire l'inscription de la matrice avec 4 indices sur vectore********************************/
    double dummy = 0.;
    /Here should be rewrite matrix GHSERs in a vectore a***/
    Array <double,1> a(r);
    a(r)=GHSERs;
    dummy=(*nrpolynom)(T,a);
    Array <doublen1>G=dummy; //vectore

    /************Multiplication*************************************************/
    /*
    (*nrsite)(y,n);

    Gref=G(p,i,j) * y(p,Range(fromStart,toEnd),0) * y(p,Range(fromStart,toEnd),1); */

    }

    Can you help me? Tell me please, what not so here!!!?
    :)
    Thank you