/****This checks the symmetry of the second moment function****/ /****If there is a loss in symmetry the program exits***/ void check() { int i,j; int alarm=0; int spp1, spp2; /***Check for symmetry in the kernels***/ if(elapsed <=dt) /***Only check at the beginning***/ for(spp1=0;spp1 0.000000001 ) exit(1); if( fabs( prob_move[spp1][i][j] - prob_move[spp1][2*radial_max-2-i][2*radial_max-2-j]) > 0.000000001 ) exit(1); } */ /***At every time step check the symmetry in the second moments***/ for(spp1=0;spp1 0.0000000001 ) { printf("1: %d 2: %d i: %d\tj: %d\tC2: %.8lf\t-i: %d\t-j: %d\tC2: %.8lf\n", spp1, spp2, i,j, C2_bin[spp1][spp2][i][j], 2*xbin-2-i, 2*ybin-2-j, C2_bin[spp2][spp1][2*xbin-2-i][2*ybin-2-j]); fflush(stdout); alarm = 1; } } if(alarm == 1) { printf("LOSS OF SYMMETRY IN C2. EXITING....\n"); fprintf(first, "LOSS OF SYMMETRY IN C2. EXITING....\n"); exit(1); } }