25 #include "pips_config.h"
31 #define MAX_CONTROLS_IN_UNSTRUCTURED 100
49 for (i=0; i<n; i++ ) {
51 for ( j=0; j<n; j++) {
52 if ( fabs(a[i][j]) > aamax ) {
53 aamax = fabs(a[i][j]);
58 fprintf(stderr,
"Singular matrix -- No nonzero element\n");
63 for ( j=0; j<n; j++ ) {
64 for ( i=0; i<=j; i++ ) {
66 for ( k=0; k<i; k++) {
67 sum =
sum - a[i][k]*a[k][j];
74 for ( i=j+1; (i<n) ; i++ ) {
76 for ( k=0; k<j; k++ ) {
77 sum =
sum - a[i][k]*a[k][j];
80 dum = vv[i]*fabs(
sum);
88 for ( k=0; k<n; k++ ) {
102 for ( i=j+1; i<n; i++ ) {
103 a[i][j] = a[i][j]*dum;
120 for (i=0; i<n; i++ ) {
125 for ( j=ii; j<=i-1; j++ ) {
129 else if (
sum != 0.0 ) {
136 for ( i=n-1; i>=0; i-- ) {
139 for ( j=i+1; j < n; j++ ) {
157 for (i=0; i<n; i++ ) {
158 for ( j=0; j<n; j++ )
165 for ( j=0; j<n; j++ ) {
168 for ( j=0; j<n; j++ )
169 for ( i=0; i<n; i++ )
181 for (i=0; i<n; i++) {
186 a[2][3] = a[2][37] = -1.;
187 a[6][7] = a[6][33] = -1.;
188 a[10][11] = a[10][29] = -1.;
189 a[15][16] = a[15][17] = -1.;
192 a[17][18] = a[17][19] = -1.0;
195 a[21][22] = a[21][23] = -1.0;
198 a[23][24] = a[23][28] = -1.;
205 a[29][30] = a[30][31] = -1.0;
212 a[33][34] = a[33][35] = -1.0;
220 a[37][38] = a[37][39] = -1.0;
227 for ( i=0; i<n; i++ ) {
228 for(j=0; j<n; j++ ) {
229 a[i][j] = a[i][j]/2.0;
230 printf(
"%-4.1f ",a[i][j]);
237 printf(
"Final results -----------------\n");
238 printf(
"indx[0] indx[1] are %d %d\n",indx[0], indx[1] );
241 printf(
"a[0][0] a[0][1] %f %f\n", (a[0][0]), (a[0][1]) );
242 printf(
"a[1][0] a[1][1] %f %f\n", (a[1][0]), (a[1][1]) );
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
t_real sum(int n1, int n2, int n3, t_real u[n1][n2][n3])
#define MAX_CONTROLS_IN_UNSTRUCTURED
void lu_decomposition(a, int n, indx, int *pd)
void float_matrice_inversion(a, int n, indx, int *pd)
void lu_back_substitution(a, int n, indx, b)