Changeset 3572 in Sophya for trunk/SophyaLib/NTools/functab.cc
- Timestamp:
- Feb 7, 2009, 10:50:34 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/NTools/functab.cc
r2618 r3572 53 53 Dx = (r_8)(XMax-XMin)/(r_8)(NTab-1); 54 54 Tabul = new r_8[NTab+2]; 55 for( int_4 i=0;i<NTab+2;i++) Tabul[i] = 0.;55 for(uint_4 i=0;i<NTab+2;i++) Tabul[i] = 0.; 56 56 PInterpL = PInterpP[0] = PInterpP[1] = NULL; 57 57 if(!Tabul) return; 58 for( int_4 i=0;i<NTab;i++) Tabul[i+1] = func(XMin + i*Dx);58 for(uint_4 i=0;i<NTab;i++) Tabul[i+1] = func(XMin + i*Dx); 59 59 Tabul[0] = Tabul[1]; 60 60 Tabul[NTab+1] = Tabul[NTab]; … … 106 106 if(PInterpL) delete [] PInterpL; 107 107 PInterpL = new r_8[NTab+2]; 108 for( int_4 i=0;i<NTab+1;i++)108 for(uint_4 i=0;i<NTab+1;i++) 109 109 PInterpL[i] = (Tabul[i+1]-Tabul[i])/Dx; 110 110 PInterpL[NTab+1] = 0.; … … 116 116 PInterpP[0] = new r_8[NTab+2]; 117 117 PInterpP[1] = new r_8[NTab+2]; 118 for( int_4 i=1;i<=NTab;i++) {118 for(uint_4 i=1;i<=NTab;i++) { 119 119 PInterpP[0][i] = (Tabul[i+1]+Tabul[i-1]-2.*Tabul[i])/(2.*Dx*Dx); 120 120 PInterpP[1][i] = (Tabul[i+1]-Tabul[i-1])/(2.*Dx);
Note:
See TracChangeset
for help on using the changeset viewer.