Changeset 23066 for issm/trunk-jpl/src/c/shared/Numerics
- Timestamp:
- 08/07/18 10:22:46 (7 years ago)
- Location:
- issm/trunk-jpl/src/c/shared/Numerics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/shared/Numerics/BrentSearch.cpp
r18137 r23066 68 68 _printf0_(" x = "<<setw(9)<<xmin<<" | "); 69 69 fxmin = (*g)(&G,X0,usr); if(xIsNan<IssmDouble>(fxmin)) _error_("Function evaluation returned NaN"); 70 70 71 71 /*Get f(xmax)*/ 72 72 _printf0_(" x = "<<setw(9)<<xmax<<" | "); … … 244 244 J[n]=fxbest; 245 245 } 246 246 247 247 /*return*/ 248 248 xDelete<IssmDouble>(X); -
issm/trunk-jpl/src/c/shared/Numerics/legendre.cpp
r20033 r23066 121 121 122 122 for i = 2 : n 123 123 124 124 v(:,i+1) = ( ( 2 * i - 1 ) * x .* v(:,i) ... 125 125 - ( i - 1 ) * v(:,i-1) ) ... 126 126 / ( i ); 127 127 128 128 end 129 129 }}} */ … … 240 240 polynomials of order 0 through N. 241 241 }}}*/ 242 242 243 243 int i,j; 244 244 … … 254 254 for ( i = 0; i < m; i++ ) { 255 255 for ( j = 2; j <= n; j++ ) { 256 256 257 257 v[j+i*(n+1)] = ( ( IssmDouble ) ( 2 * j - 1 ) * x[i] * v[(j-1)+i*(n+1)] 258 258 - ( IssmDouble ) ( j - 1 ) * v[(j-2)+i*(n+1)] )
Note:
See TracChangeset
for help on using the changeset viewer.