Changeset 17120


Ignore:
Timestamp:
01/16/14 09:13:33 (11 years ago)
Author:
Mathieu Morlighem
Message:

BUG: cannot allocate array with int that is not const (const int dim = 2 was required)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp

    r17114 r17120  
    8989
    9090        /*Intermediaries */
    91         int i,j,dim = 2; // solve for LSF in horizontal plane only
     91        const int  dim = 2; // solve for LSF in horizontal plane only
    9292        IssmDouble kappa;
    9393        IssmDouble Jdet, dt, D_scalar;
     
    176176                                K[0][0]=h/(2.*vel)*vx*vx;  K[0][1]=h/(2.*vel)*vx*vy;
    177177                                K[1][0]=h/(2.*vel)*vy*vx;  K[1][1]=h/(2.*vel)*vy*vy;
    178                                 for(i=0;i<dim;i++) for(j=0;j<dim;j++) K[i][j] = D_scalar*K[i][j];
     178                                for(int i=0;i<dim;i++) for(int j=0;j<dim;j++) K[i][j] = D_scalar*K[i][j];
    179179
    180180                                //GetBprime(Bprime,element,xyz_list,gauss);
Note: See TracChangeset for help on using the changeset viewer.