Search results

  1. MahdiI84

    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
  2. MahdiI84

    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...
  3. MahdiI84

    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.
  4. MahdiI84

    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).
  5. MahdiI84

    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...
  6. MahdiI84

    I Obtain the Density of State using the Green function

    Again, thank you for your time to help me out.
  7. MahdiI84

    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.
  8. MahdiI84

    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.
  9. MahdiI84

    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]
  10. MahdiI84

    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...
  11. MahdiI84

    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
  12. MahdiI84

    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...
  13. MahdiI84

    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...
  14. MahdiI84

    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.
  15. MahdiI84

    Fortran Density of state of a linear lattice

    thank you so much.it's ok:thumbup:
  16. MahdiI84

    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]
  17. MahdiI84

    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...
  18. MahdiI84

    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...
  19. MahdiI84

    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...
  20. MahdiI84

    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
  21. MahdiI84

    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...
Top