Commit 7daffc3a authored by Leonardo Solis's avatar Leonardo Solis
Browse files

#58, defined constant for max-grid-points (still 128 as originally)

parent bf42077e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define MAX_NUM_OF_ROTATIONS 	(MAX_NUM_OF_ATOMS * MAX_NUM_OF_ROTBONDS)
#define MAX_POPSIZE 		2048
#define MAX_NUM_OF_RUNS 	1000
#define MAX_NUM_GRIDPOINTS      128

// Must be bigger than MAX_NUM_OF_ROTBONDS+6
#define GENOTYPE_LENGTH_IN_GLOBMEM 64
+2 −2
Original line number Diff line number Diff line
@@ -90,9 +90,9 @@ int get_gridinfo(const char* fldfilename, Gridinfo* mygrid)
			mygrid->size_xyz[2] = gpoints_even[2] + 1;

			//If the grid is too big, send message and change the value of truncated_size_xyz
			if ((mygrid->size_xyz [0] > 128) || (mygrid->size_xyz [1] > 128) || (mygrid->size_xyz [2] > 128))
			if ((mygrid->size_xyz [0] > MAX_NUM_GRIDPOINTS) || (mygrid->size_xyz [1] > MAX_NUM_GRIDPOINTS) || (mygrid->size_xyz [2] > MAX_NUM_GRIDPOINTS))
			{
				printf("Error: each dimension of the grid must be below 128.\n");
				printf("Error: each dimension of the grid must be below %i.\n", MAX_NUM_GRIDPOINTS);
				return 1;
			}
		}