Djboyko

0 Reputation

One Badge

8 years, 145 days

MaplePrimes Activity


These are replies submitted by Djboyko

@acer 

I'm not sure my professor wants me to post the research online yet, since we want to publish it. So I'll have to ask for permission first, sorry. 

Until then, I believe the matrix should be floating point. It may actually be integers where maple has evaluated it to floating points. Because I never put anything other than simple integers or integer fractions (1/10) in. So if it fully evaluates when it finds linalg[eigenvalues] then it is just floating points (or integers, i'm not completely sure). 

I'm using with(linalg) and with(LinearAlgebra), declared at the beginning. In the case I posted though, I believe it is linalg. again, i'm not sure what the difference is. I have had some help from my professor in building this and he put in some things i dont fully understand. You think using Eigenvalues would be more efficient and save me from having to simplify it?

The matrix is symmetric. it is an 8x8.  the 0.2 and 0.005 are steps for accuracy to see if the minimum eigenvalue (energy) goes to 0. I plot it using surfdata, (or export it to Origin) to see if it goes to 0. if it does not, than i adjust a numerical Term inside the matrix entires to make it so. I have to do it this way because i can't analyticaly solve for that Term to find the 0 energy because the x,y coordinates are not at the origin. So by trial and error i have to compute this dozens of times, and if i can find a way to make the for-loop run parallel with the other core processors it would save me hours upon hours. But if what I am already doing is bogging it down, I appreciate any efficiency improvements!

@AmusingYeti 

This is the part of the program I need to speed up. DIMMatrix is defined earlier.

 

unassign('kx','ky','kx1','ky1');

fd1 := fopen("DIME-3D-J3-1.dat", WRITE, BINARY);
fd2 := fopen("DIME-3D-J3-2.dat", WRITE, BINARY);
fd3 := fopen("DIME-3D-J3-3.dat", WRITE, BINARY);
fd4 := fopen("DIME-3D-J3-4.dat", WRITE, BINARY);
fd5 := fopen("DIME-3D-J3-5.dat", WRITE, BINARY);
fd6 := fopen("DIME-3D-J3-6.dat", WRITE, BINARY);
fd7 := fopen("DIME-3D-J3-7.dat", WRITE, BINARY);
fd8 := fopen("DIME-3D-J3-8.dat", WRITE, BINARY);
kx:=kx1*Pi;
ky:=ky1*Pi;

for kx1 from -1.0 to 1.0 by 0.005 do
   for ky1 from -1.0 to 1.0 by 0.005 do
      DIME :=eigenvalues(DIMMatrix):
      DIME1:=Re(simplify(DIME[1])):
      DIME2:=Re(simplify(DIME[2])):
      DIME3:=Re(simplify(DIME[3])):
      DIME4:=Re(simplify(DIME[4])):
      DIME5:=Re(simplify(DIME[5])):
      DIME6:=Re(simplify(DIME[6])):
      DIME7:=Re(simplify(DIME[7])):
      DIME8:=Re(simplify(DIME[8])):
      DIME_sort:=sort([DIME1,DIME2,DIME3,DIME4,DIME5,DIME6,DIME7,DIME8]):
      fprintf(fd1, " %f", DIME_sort[1]);
      fprintf(fd2, " %f", DIME_sort[2]);
      fprintf(fd3, " %f", DIME_sort[3]);
      fprintf(fd4, " %f", DIME_sort[4]);
      fprintf(fd5, " %f", DIME_sort[5]);
      fprintf(fd6, " %f", DIME_sort[6]);
      fprintf(fd7, " %f", DIME_sort[7]);
      fprintf(fd8, " %f", DIME_sort[8]);
   od:
   fprintf(fd1, "\n");
   fprintf(fd2, "\n");
   fprintf(fd3, "\n");
   fprintf(fd4, "\n");
   fprintf(fd5, "\n");
   fprintf(fd6, "\n");
   fprintf(fd7, "\n");
   fprintf(fd8, "\n");
od:
fclose(fd1);
fclose(fd2);
fclose(fd3);
fclose(fd4);
fclose(fd5);
fclose(fd6);
fclose(fd7);
fclose(fd8);
 

Page 1 of 1