|
|
Help!! Kernel shutting down(pc)
Posted:
Jul 17, 1996 1:37 AM
|
|
I am trying to perform the following program in Win3.1 (I set the kernel into 12Mb)but I can't . ,with error message "kernel shutting down out of memory" I checked the memory using MemoryInUse[], but i have no way to treat this situation. I don't understand the process of Mathematica in handling the memory. I guess the Mathematica seems to reserve previous memory other than C-language.(I don't know well)
How can I complete my program? Does anyone have some ideas ? Thanks in advance.
(* This program have to iterate at least 50 times *) n = 60; phi1 = Table[N[0.01 - Exp[-10*(x^2 + y^2)]],{x,-1,1,1/30},{y,-1,1,1/30}];
sigma = 275.625; gaussdata = Table[N[Exp[-sigma*(x^2+y^2)]], {x,-1,1,2/n},{y,-1,1,2/n}]; Do[ {Do[ If[N[phi1[[i,j]]] >=0, u[i,j]=1, u[i,j]=0], {i,1,n+1},{j,1,n+1}]; u1 = Table[N[u[i,j]],{i,1,n+1},{j,1,n+1}]; Au1 = InverseFourier[Fourier[u1]*Fourier[gaussdata]]; Bu1 = Au1 - gaussdata; AAu1 = InverseFourier[Fourier[Bu1]*Fourier[gaussdata]];
h=1/30.; Do[dx[i,j]= (phi1[[i+1,j]] - phi1[[i-1,j]])/(2*h), {j,1,n+1}, {i,2,n}]; Do[dy[i,j]= (phi1[[i,j+1]] - phi1[[i,j-1]])/(2*h), {i,1,n+1}, {j,2,n}]; Do[dx[1,j]= dx[2,j]; dx[n+1,j]= dx[n,j], {j,1,n+1}]; Do[dy[i,1]= dy[i,2]; dy[i,n+1]= dy[i,n], {i,1,n+1}];
gradphi1 =Table[{dx[i,j],dy[i,j]},{i,1,n+1},{j,1,n+1}]; delphi1 = AAu1 gradphi1 ;
gradphi1 =Table[{dx[i,j],dy[i,j]},{i,1,n+1},{j,1,n+1}]; delphi1 = AAu1 gradphi1 ; phi1 = phi1 + delphi1 ; },{k,1,40}];
--------------------------------------------------------------- Dae-Ki Yoon, Department of Mathmatics, Korea University Anam Dong 5-ga Sungbuk Gu Seoul, KOREA E-mail : dkyoon@semi.korea.ac.kr dkyoon@jaggy.korea.ac.kr ---------------------------------------------------------------
|
|