Skip to content

Commit

Permalink
Move eqpg into same loop
Browse files Browse the repository at this point in the history
  • Loading branch information
holm10 committed Nov 8, 2024
1 parent cc6110c commit 94563cb
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions bbb/oderhs.m
Original file line number Diff line number Diff line change
Expand Up @@ -7786,24 +7786,6 @@ call fd2tra (nx,ny,floxge(0:nx+1,0:ny+1,igsp),
endif #if-test on isnonog



* ---------------------------------------------------------------------
* compute the molecular thermal equipartition with hydrogen ions and atoms
* ---------------------------------------------------------------------
if (nisp >= 2) then # uses ni(,,2), so must have atoms
do igsp = 1, ngsp
do iy = j1, j6
do ix = i1, i6
eqpg(ix,iy,igsp) = cftgeqp*(
. ng(ix,iy,igsp)*ni(ix,iy,1)*keligig(igsp)
. + cftiexclg*ng(ix,iy,igsp)*ni(ix,iy,2)*keligig(igsp))
enddo
enddo
enddo
endif

write(*,*) j1, j2
write(*,*) j6, j5
* ---------------------------------------------------------------------
* compute the energy residuals.
* ---------------------------------------------------------------------
Expand All @@ -7816,6 +7798,12 @@ call fd2tra (nx,ny,floxge(0:nx+1,0:ny+1,igsp),
do iy = j2, j5
iy1 = max(0,iy-1)
do ix = i2, i5

if (nisp >= 2) then # uses ni(,,2), so must have atoms
eqpg(ix,iy,igsp) = cftgeqp*(
. ng(ix,iy,igsp)*ni(ix,iy,1)*keligig(igsp)
. + cftiexclg*ng(ix,iy,igsp)*ni(ix,iy,2)*keligig(igsp))

ix1 = ixm1(ix,iy)
reseg(ix,iy,igsp)= -( fegx(ix,iy,igsp)-fegx(ix1,iy, igsp)+
. fegy(ix,iy,igsp)-fegy(ix, iy1,igsp) )
Expand Down

0 comments on commit 94563cb

Please sign in to comment.