init_velocity seperate n_shell range test and e_spec value test
This commit is contained in:
parent
6f0c1f44fa
commit
383b2c5aa7
1 changed files with 3 additions and 1 deletions
|
|
@ -266,8 +266,10 @@ subroutine init_velocity
|
|||
do i = 1,nx+2
|
||||
|
||||
n_shell = nint(sqrt(real(akx(i)**2 + aky(k)**2 + akz(j)**2, 4)))
|
||||
if (n_shell .gt. 0 .and. n_shell .le. kmax .and. e_spec(n_shell) .gt. zip) then
|
||||
if (n_shell .gt. 0 .and. n_shell .le. kmax ) then
|
||||
if (e_spec(n_shell) .gt. zip) then
|
||||
fields(i,j,k,1:3) = fields(i,j,k,1:3) * sqrt(e_spec1(n_shell)/e_spec(n_shell))
|
||||
endif
|
||||
else
|
||||
fields(i,j,k,1:3) = zip
|
||||
end if
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue