#include #include #include #include "fortran.h" #include "basis.h" int MAIN(){ int i,j,k,np=6,kt,multi,o,charge; int hlist[HINDEX]; reduced_basis *basis; partype p; latype g; enum state_type type=TYPE_SOURCE; #if 0 /* loop thingy */ for(i=0; i<7; i++){ int shift,j; printf("starting length=%i\n",i); for(shift=1; i>=shift; shift*=2); while((shift>>=1) >= 1){ for(j=shift-1; jlength<200){ printf("(helicity,K) shown for each particle\n"); for(i=0; ilength; i++){ for(j=0; js[np*i+j]!=HOLE; j++); k=innerproduct(basis->s+np*i,basis->s+np*i,type,j,charge,o,multi); printf(" "); printstate(basis->s+np*i,type,np); #if 1 /* print out inner product */ printf(" %i",k); #endif printf("\n"); } } printf("length = %i \n",basis->length); free_reduced(); #if 0 /* Test action of the lattice operator on a state */ printf("Transforms by statelat. Input state number: "); scanf("%i",&i); for(g=0; gs+np*i,type,np,g); printstate(out,type,np); printf("\n"); } #endif #elif 0 /* test Jacobi weights routine */ doublereal xxx[4]={0.1,0.1,0.3,0.3},yyy[4]={0,0.2,0.1,0.2}; integer kind=5,n=10,kpts=0; doublereal alpha=0.5,ends[2]={0.0,1.0},b[10],tt[10],w[10]; printf("Try out bessel function J_n(x).\n"); for(j=0;j<4;j++) printf("%g %g %.16f\n",xxx[j],yyy[j],MYBESSELJ(xxx+j,yyy+j)); printf("Try out Jacobi weights, alpha=%f:\n",alpha); GAUSSQ(&kind,&n,&alpha,&alpha,&kpts,ends,b,tt,w); for(j=0, b[0]=0.0; j3 particles inner13, beta=%f\n",b); #if 1 for(k=1; k<6; k++) for(i=0; i1){ hlist[1]=5; printf("test vector: ("); for(i=0; i>HSHIFT); } printf("},\n"); } #endif #if 1==0 printf("try out resthk; to make a basis, input" " ht[%i], np, kt, cyclic, o, multi:\n",HINDEX); for(i=0;ilength<200) for(i=0;i< s->length;i++){ printf(" "); for(j=0;jlocate)[np*i+j]&~(~0<locate)[np*i+j]>>HSHIFT); printf("\n"); } printf("loc, length = %p %i \n",s->locate,s->length); printf("Input which state to apply resthk to: "); scanf("%i",&k); printf("\n"); /* Make associated basis and get state from basis*/ makebasis(&x,hlist,np,kt,cyclic,o,multi); t=resthk(&x,np,s->locate+np*k,np); printf("%i-particle states\n",np); if(t->length<200) for(i=0;i< t->length;i++){ printf(" "); for(j=0;jlocate)[np*i+j]&~(~0<locate)[np*i+j]>>HSHIFT); printf("\n"); } printf("length = %i \n",t->length); t=resthk(&x,np+2,s->locate+np*k,np); printf("%i-particle states\n",np+2); if(t->length<200) for(i=0;i< t->length;i++){ printf(" "); for(j=0;jlocate[(np+2)*i+j]&~(~0<locate[(np+2)*i+j]>>HSHIFT)); printf("\n"); } printf("length = %i \n",t->length); if(s->length<50){ printf("helicity map:\n"); for(i=0; i < 2*HINDEX; i++){ p=i<