Skip to content

Commit

Permalink
Removes logangfx usage in bbb.geometry.m
Browse files Browse the repository at this point in the history
As it seems to have been causing issues with defining com.sx: not a big deal since geometry only needs to be calculated once
  • Loading branch information
holm10 committed Jan 15, 2025
1 parent fd7fef7 commit 8d6b23f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bbb/geometry.m
Original file line number Diff line number Diff line change
Expand Up @@ -906,10 +906,10 @@ ccc gxfn(ix,0) = gxfn(ix,1)
dx(ix,iy) = max(dx(ix,iy), dxmin)
cc for nonorthogonal mesh, dy gets reduced by cosine(average_angle)
if ((islimon .ne. 0) .and. (ix .eq. ix_lim+1)) then
dy(ix,iy) = dy(ix,iy)*cosangfx(ix,iy)
dy(ix,iy) = dy(ix,iy)*cos(angfx(ix,iy))
elseif (nxpt==2 .and. ix==ixlb(nxpt)) then # full double null
c Effectively, use angfx(ix-1,iy)=angfx(ix,iy) at left boundaries
dy(ix,iy) = dy(ix,iy)*cosangfx(ix,iy)
dy(ix,iy) = dy(ix,iy)*cos(angfx(ix,iy))
else
dy(ix,iy) = dy(ix,iy)*cos( 0.5*
. (angfx(ix,iy) + angfx(ixm1(ix,iy),iy)) )
Expand Down Expand Up @@ -944,12 +944,12 @@ ccc gxfn(ix,0) = gxfn(ix,1)
* -- 1/gyc is length*cos(angfx) between vertex (ix,iy) and (ix,iy-1)
dyc = sqrt((rm(ix+nj,iy,4)-rm(ix+nj,iy,2))**2
. + (zm(ix+nj,iy,4)-zm(ix+nj,iy,2))**2) *
. cosangfx(ix,iy)
. cos(angfx(ix,iy))
gyc(ix,iy) = 1/dyc
dz = 2 * pi * 0.5*(rm(ix+nj,iy,4)+rm(ix+nj,iy,2))
if (mhdgeo == -1) dz = 1.
sx(ix,iy) = dyc * dz
sxnp(ix,iy) = sx(ix,iy)/(cosangfx(ix,iy))
sxnp(ix,iy) = sx(ix,iy)/(cos(angfx(ix,iy)))
ctdr .. Special case - xgbx is used as reduction factor - not related to G.B.
ccc if (ix.eq.ixpt1(1) .and. iy.le.iysptrx1(1)) then
ccc sx(ix,iy) = xgbx*sx(ix,iy)
Expand Down Expand Up @@ -1173,7 +1173,7 @@ ccc sx(ix,iy) = xgbx*sx(ix,iy)
gradb2(ix,iy) = 0.5*( 1/b(ix+nj,iy,4)**2 +
. 1/b(ix+nj,iy,2)**2 )*
. (b(ix+nj,iy,4)-b(ix+nj,iy,2))*gyc(ix,iy)*
. cosangfx(ix,iy) # cos corrects gyc
. cos(angfx(ix,iy)) # cos corrects gyc
ccc if (iy .ge. ny-1) then
ccc curvrby(ix,iy) = 0.
ccc gradby(ix,iy) = 0.
Expand Down

0 comments on commit 8d6b23f

Please sign in to comment.