# Search results

2. ### Fortran Dimension of arrays (RESHAPE) in Fortran 90

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
3. ### Fortran Dimension of arrays (RESHAPE) in Fortran 90

program testmatek implicit none integer :: Nc=1000 ,k integer,parameter :: N=2 REAL :: kx ,a0=1.0 ,t0=0.25 DOUBLE PRECISION :: pi=4*ATAN(1.) COMPLEX , PARAMETER :: i=(0,1) complex :: ek1 ,ek2 complex :: MATRIX_ek(N,N) open(1,file='matek.txt') MATRIX_ek(N,N)=(0,0) DO k=-Nc,+Nc...
4. ### I Obtain the Density of State using the Green function

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.
5. ### I Obtain the Density of State using the Green function

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).
6. ### I Obtain the Density of State using the Green function

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...
7. ### I Obtain the Density of State using the Green function

Again, thank you for your time to help me out.
8. ### I Obtain the Density of State using the Green function

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.
9. ### I Obtain the Density of State using the Green function

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.
10. ### I Obtain the Density of State using the Green function

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]
11. ### I Obtain the Density of State using the Green function

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...
12. ### I Obtain the Density of State using the Green function

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
13. ### I Obtain the Density of State using the Green function

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...
14. ### Fortran Density of state of a linear lattice

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...
15. ### Fortran Density of state of a linear lattice

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.
16. ### Fortran Density of state of a linear lattice

thank you so much.it's ok:thumbup:
17. ### Fortran Density of state of a linear lattice

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]
18. ### Fortran Density of state of a linear lattice

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...
19. ### Fortran Density of state of a linear lattice

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...
20. ### Fortran Density of state of a linear lattice

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...
21. ### Fortran Density of state of a linear lattice

Hi mark44 ,thank you very much for your help. I will correct the points you mentioned.I will declaration the result again
22. ### Fortran Density of state of a linear lattice

PROGRAM DensityOfState IMPLICIT NONE INTEGER :: omega , t0 , a0 ,kx omega=1 ; t0 =1 ; a0=1 REAL :: kx , eta , w , ek eta=0.0015 REAL,PARAMETER :: pi=3.14 COMPLEX , PARAMETER ::i=(0,1) COMPLEX :: Energy COMPLEX :: Density COMPLEX :: GreenFunc...