arrays - exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1 at -
i have problem when massage box tell
exception in thread "main" java.lang.arrayindexoutofboundsexception: -1 @ pla3d_2.tkmat<pla3d_2.java:509> @ pla3d_2.tkmat<pla3d_2.java:327>
below line of code reference
for line 327
/***construction , overall stiffness matrix of b mato (line 326) tkmat(xyz,e1,p1,aj,psaig,aji,detjg,detjgg,gbg1,bmat,dep);(327) /***introduction of boundary conditions (328) fix(nb,n,nband,ix,iy,iz,u,v,w,ib,dtf,ux,uy,uz); (329) /***solutions system of linear equations (330)
and
for line 509
static void tkmat(double xyz[][],double e1[],double p1[], double aj[][][],double psaig[][][],double aji[][][],double detjg[], double detjgg[][],double gbg1[][][],double bmat[][],double dep[][]){ int l,l1,l2,l3,l4,l5,ie,je,it,jt,iit,jjt; double aj11,aj12,aj13,aj21,aj22,aj23,aj31,aj32,aj33,detj,sum; double gek1[][] = new double[6][nodel*3]; double gek2[][] = new double[nodel*3][nodel*3]; double gekg[][][] = new double[8][nodel*3][nodel*3]; double gek[][] = new double[nodel*3][nodel*3]; // for(l=0;l<ne;l++){ for(l1=0;l1<nodel;l1++){ lc[3*l1][l] =3*loc[l1][l]-2; lc[3*l1+1][l]=3*loc[l1][l]-1; lc[3*l1+2][l]=3*loc[l1][l]; } for(l1=0;l1<nodel;l1++){ xyz[l1][0]=xx[loc[l1][l]-1]; [line 509] xyz[l1][1]=yy[loc[l1][l]-1]; xyz[l1][2]=zz[loc[l1][l]-1]; } for(l2=0;l2<8;l2++){ for(l1=0;l1<3;l1++){ for(l3=0;l3<3;l3++){ aj[l2][l1][l3]=0.0; for(l4=0;l4<nodel;l4++){ aj[l2][l1][l3]=aj[l2][l1][l3]+psaig[l2][l1][l4]*xyz[l4][l3]; } } } }
can me...thank in advance..:-)
apart fact code pretty ugly , nobody can understand what's going on, check
at pla3d_2.tkmat<pla3d_2.java:509>
in stack trace. it's telling you trying set object array @ line 509 array has grown out of size - there's no more space in array.
Comments
Post a Comment