long fill_pure_polynomials_array(double* output, long lmax, long nrep, long stride) { long result = 0; for (long irep=0; irep<nrep; irep++) { result = fill_pure_polynomials(output, lmax); output += stride; } return result; }
void fill_polynomials_wrapper(double* work, double* delta, long lmax, long mtype) { if (mtype==1) { work[0] = delta[0]; work[1] = delta[1]; work[2] = delta[2]; fill_cartesian_polynomials(work, lmax); } else if (mtype==2) { work[0] = delta[2]; work[1] = delta[0]; work[2] = delta[1]; fill_pure_polynomials(work, lmax); } else if (mtype==3) { work[0] = sqrt(delta[0]*delta[0] + delta[1]*delta[1] + delta[2]*delta[2]); fill_radial_polynomials(work, lmax); } else if (mtype==4) { double r = sqrt(delta[0]*delta[0] + delta[1]*delta[1] + delta[2]*delta[2]); work[0] = delta[2]/r; work[1] = delta[0]/r; work[2] = delta[1]/r; fill_pure_polynomials(work, lmax); } }