/* Simple will take two command line arguments: number of iterations and problem size. The problem size is assumed to be square, and the parameter for each should be an integer. */ main(int argc, char *argv[]) { int iter; if (argc!=3) { printf("EK's Simple expects two arguments: # iterations, problem size\n"); printf("The two arguments are integers, and the problem size should\n"); printf("be at least 4\n"); exit(1); } niterations = atoi(argv[1]); problem_size = atoi(argv[2]); compute_initial_state(); for (iter=0;iter<niterations;iter++) compute_next_state(); print_simple_state(); exit(0); }
void PhysicalEntity::prepare_next_pos(float dt) { next_state = compute_next_state(dt); }