Yes, I know where the error is. Of course, I searched the internet. But since I am new to Fortran, I did not understand how I could fix the error. Thank you for your help
The Green function is a function of the wave vector, and because of the effect (Tr) on the Green function, we see the sum operation on all values (k). The Green function is inside the loop of k.
Of course, the question for me is whether the Green function relation is mathematically correct or not? Because as I said, this relationship is the difference between complex data (energy) and real data (ek).
My purpose in introducing the X and Y variables is to separate the real and imaginary parts of the energy component.If you pay attention to the coding, after the two loops, (energy and ek), the relation related to the Green function is given, which consists of the difference between the data...
I do not want the variable of the file 'ENERGY.txt' and the file 'EPSILONK.txt' to be read. In fact, I want to import data from the energy loop and the wave number loop into these two files.
Thank you very much for your help. Yes, I'm still a beginner in Fortran. I read a book about it and watched several hours of instructional videos, but it seems like not enough.
I modified the coding according to the pattern you suggested. I just do not know what variable to enter in front of Read command. I entered W and KX but the program reported the following error:
A do-variable within a DO body shall not appear in a variable definition context. [W]
Thank you for your guidance. Unfortunately, I did not find a reference. This issue (density of states in different types of crystal lattices) is an important topic in solid state physics. But I did not find any coding references for them. So based on my own analysis of the problem, I got some...
But this coding does not seem to be logically correct. Because by running the program, I have only one output value for energy and also for (ek), and the program has no output value for the Green function and density of state. Now I want to know if anyone can guide me in this.thanks a lot
Hi everyone. Using the Green function, I want to obtain the density of states of a one-dimensional (linear) lattice. Depending on the problem conditions, we will have an iterative loop with 4,000 data for the energy component and a iteration loop with 2,000 data for the wave number component. In...
Hi, good morning too. you'r welcome. The program runs without any problems and has no errors. But the final answer is not correct. I have coded an energy loop with 4000 outputs and a loop (kx) with 2000 outputs, but I do not receive this amount of data from the program. I do not know maybe my...
Thank you very much for your guidance. If I change the W loop in your way, what will be the step? Because in this case, the step must be the value of 0.001.
And a warning and an error related to COS
warning #7319: This argument's data type is incompatible with this intrinsic procedure; procedure assumed EXTERNAL. [COS]
error #6404: This name does not have a type, and must have an explicit type. [COS]
corrected coding is as follows:
COMPLEX , PARAMETER ::i=(0,1)
COMPLEX :: Energy
COMPLEX :: Density
COMPLEX :: GreenFunc
DO w=-2,+2,0.001 ! Energy loop
Energy=w+i*eta
WRITE(*,*) Energy
DO kx=-1000,1000...
Hi, thank you for your help. But I also tried this solution:
ek= 2*t0*COS(kx)*a0
But this error appeared
warning #7319: This argument's data type is incompatible with this intrinsic procedure; procedure assumed EXTERNAL. [COS]
error #6404: This name does not have a type, and must have an...
I corrected the bugs you mentioned and the result was as follows.Is not cosine the function introduced in the Fortran default? So why give an error for that?
warning #7319: This argument's data type is incompatible with this intrinsic procedure; procedure assumed EXTERNAL. [COS]
error...