read "itall.txt": MAKEBASEEIGENS:=0: MAKEALLEIGENS:=0: SAVENORMS:=0: NORMALIZEEIGENS:=0: TESTSTUFF:=0: CHECKORTHONORMAL:=1: TOLNORMALITY:=.0000000001: TOLORTHOGONALITY:=.0000000001: CHECKEIGENVALS:=1: TOLEIGENVALS:=.0000000001: FATTENEIGENS:=1: MAKEPSIS:=1: PSIMAKINGTOLERANCE:=0; CHECKPHATEIGENVALS:=0: lvl:=5; phatlvl:=10; path:=cat("../data/level",lvl,"/"); inpath:=cat("../data/level",lvl,"/"); outpath:=cat("../data/level",lvl,"/"); numEigens:=(3^(lvl+1)-3)/2; starteigen:=243; T:=verGasket(phatlvl+2): basetris:=[[[0,seq(2,i=1..lvl-1)],phatlvl-1],[[2,seq(0,i=1..lvl-1)],phatlvl-1]]; alltris:=makeTriList(basetris): allverts:=[op(ourVertices(lvl)),op(makeVertList(T,basetris))]: allverts:=removeDuplicates(allverts): if(MAKEBASEEIGENS=1) then makeOrthoEigen5(T,lvl,outpath); makeOrthoEigen6(T,lvl,outpath); print("All done making basic orthonormal Eigen Set"); end if: if(MAKEALLEIGENS=1) then genalllevel(T,lvl,path); print("All done making full orthogonal Eigen Set"); end if: if (SAVENORMS=1) then fd:=fopen(cat(path,lvl,"squarednorms.txt"),WRITE); for i from 1 to numEigens do readFunc(T,12,cat(path,lvl,"eigen.",i)); fprintf(fd,"%20.20g\n",discInnerProduct(T,lvl,12,12)); end do; fclose(fd); print("All done Saving Norms"); end if: if (NORMALIZEEIGENS=1) then for i from 1 to numEigens do readFunc(T,12,cat(path,lvl,"eigen.",i)); normalizeFunc(T,lvl,12); saveFunc(T,12,lvl,cat(path,lvl,"eigen.",i)); end do; print("All done Normalizing"); end if: if (TESTSTUFF=1) then startEigen:=12; tol2:=TOLEIGENVALS; tol1:=TOLORTHOGONALITY; tol0:=TOLNORMALITY; for i from 1 to numEigens do readFunc(T,i+startEigen-1,cat(path,lvl,"eigen.",i)); end do; if (CHECKORTHONORMAL=1) then for i from 1 to numEigens do for j from i to numEigens do m:=discInnerProduct(T,lvl,i+startEigen-1,j+startEigen-1); if (i=j) then if(abs(m-1) > tol0) then printf("(%d,%d)=%20.20g\n",i,j,m); end if; else if(abs(m) > tol1) then printf("(%d,%d)=%20.20g\n",i,j,m); end if; end if; end do; end do; print("All done Checking Orthonormality"); end if; if(CHECKEIGENVALS=1) then fd:=fopen(cat(path,lvl,"lambdalist.txt"), READ); for i from 1 to numEigens do discLaplac(T,lvl,i+startEigen-1,startEigen+numEigens); funcQuotient(T,lvl,startEigen+numEigens,i+startEigen-1,startEigen+numEigens); lambda:=fscanf(fd,"%g\n")[1]; lambda:=-1*lambda; m:=compareFuncList(T,lvl,startEigen+numEigens,[0,lambda]); if (abs(m) > tol2) then printf("max variance of (laplacian(%d)/%d) =%20.20g\n",i,i,m); end if; end do; fclose(fd); print("All done Checking Eigens"); end if; end if: if (FATTENEIGENS=1) then fd:=fopen(cat(inpath,lvl,"lambdalist.txt"), READ); df:=fopen(cat(outpath,phatlvl,"phat",lvl,"loclambdalist.txt"), WRITE); for i from 1 to (starteigen-1) do fscanf(fd,"%g\n"); end do; for i from starteigen to numEigens do lambda:=fscanf(fd,"%g\n")[1]; readFunc(T,12,cat(inpath,lvl,"eigen.",i)); if (lambda=6) then if (phatlvl > lvl) then fixedeps:=[1,op(makeEpsilons(phatlvl - lvl -1))]; LocAlgoWrapper(T,lvl,allverts,12,lambda,fixedeps,alltris); newlambda:=makeLambda(lambda,fixedeps); end if; else LocAlgoWrapper(T,lvl,12,lambda,makeEpsilons(phatlvl - lvl),alltris); newlambda:=makeLambda(lambda,makeEpsilons(phatlvl - lvl)); end if; fprintf(df,"%20.20g\n",newlambda); LocSaveFunc(T,12,allverts,cat(outpath,phatlvl,"phat",lvl,"loceigen.",i)); end do; fclose(df); fclose(fd); print("All done Fattening Eigens"); end if: if (MAKEPSIS=1) then tol:=PSIMAKINGTOLERANCE; vl2:=ourVertices(lvl): vl2:=subsop(1=NULL,2=NULL,3=NULL,vl2): vp:=ourVertices(phatlvl): vl:=[[0,2]]; for i from 1 to nops(vl) do clearFunc(T,phatlvl,13); for j from 1 to nops(vl2) do LocReadFunc(T,12,cat(inpath,phatlvl,"phat",lvl,"loceigen.",j)); print(cat("i= ",i,", and vl= ",vl)); co:=T[vl[i],12]; if (abs(co) > tol) then LocFuncSumWithConstant(T,phatlvl,allverts,co,13,12,13) end if; end do; LocSaveFunc(T,13,allverts,cat(outpath,phatlvl,"phat",lvl,"locpsi.",i)); end do; print("All done Making Psis"); end if: if(CHECKPHATEIGENVALS=1) then df:=fopen(cat(path,phatlvl,"phat",lvl,"lambdaerrs.txt"),WRITE); fd:=fopen(cat(path,phatlvl,"phat",lvl,"lambdalist.txt"), READ); for i from 1 to numEigens do #this shouldn't matter, but this should be phateigenloc, eh? readFunc(T,startEigen,cat(path,phatlvl,"phat",lvl,"eigen.",i)); discLaplac(T,phatlvl,startEigen,startEigen+1); funcQuotient(T,phatlvl,startEigen+1,startEigen,startEigen+2); lambda:=fscanf(fd,"%g\n")[1]; lambda:=-1*lambda; m:=compareFuncList(T,phatlvl,startEigen+2,[0,lambda]); fprintf(df,"Laplacian error for function %d =\t%20.20g\n",i,m); end do; fclose(fd); fclose(df); print("All done Checking Phat Eigens"); end if; print("Have a nice Day");