Skip to content

Commit

Permalink
fixing python biharmonic interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
mrachh committed Feb 15, 2024
1 parent 52f2456 commit 3b2323b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions python/fmm2dpy/fmm2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -1723,7 +1723,7 @@ def comperr(*,ntest,out,outex,pg=0,pgt=0,nd=1,cauchy=0,bh=0):
r = r + la.norm(hhex)**2
err = err + la.norm(hhex-h)**2
if(pgt > 0):
if(cauchy==0):
if(cauchy==0 and bh == 0):
r = r+la.norm(outex.pottarg[0:ntest])**2
err = err+la.norm(outex.pottarg[0:ntest]-out.pottarg[0:ntest])**2
else:
Expand Down Expand Up @@ -1764,7 +1764,7 @@ def comperr(*,ntest,out,outex,pg=0,pgt=0,nd=1,cauchy=0,bh=0):
if(cauchy==0 and bh==0):
g = out.grad[:,:,0:ntest].reshape(2*nd*ntest,)
gex = outex.grad[:,:,0:ntest].reshape(2*nd*ntest,)
if(cauchy==0 and bh==1):
elif(cauchy==0 and bh==1):
g = out.grad[:,:,0:ntest].reshape(3*nd*ntest,)
gex = outex.grad[:,:,0:ntest].reshape(3*nd*ntest,)
else:
Expand Down Expand Up @@ -1794,7 +1794,7 @@ def comperr(*,ntest,out,outex,pg=0,pgt=0,nd=1,cauchy=0,bh=0):
if(cauchy==0 and bh==0):
g = out.gradtarg[:,:,0:ntest].reshape(2*nd*ntest,)
gex = outex.gradtarg[:,:,0:ntest].reshape(2*nd*ntest,)
if(cauchy==0 and bh==1):
elif(cauchy==0 and bh==1):
g = out.gradtarg[:,:,0:ntest].reshape(3*nd*ntest,)
gex = outex.gradtarg[:,:,0:ntest].reshape(3*nd*ntest,)
else:
Expand Down
16 changes: 8 additions & 8 deletions src/common/cdjseval2d.f
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ subroutine jbessel2d(nterms,z,rscale,fjs,ifder,fjder)
fjs(0) = done
do i = 1, nterms
fjs(i) = zero
enddo
enddo
c
if (ifder.eq.1) then
do i=0,nterms
fjder(i)=zero
enddo
fjder(1)=done/(2*rscale)
endif
if (ifder.eq.1) then
do i=0,nterms
fjder(i)=zero
enddo
fjder(1)=done/(2*rscale)
endif
c
RETURN
endif
Expand Down Expand Up @@ -148,7 +148,7 @@ subroutine jbessel2d(nterms,z,rscale,fjs,ifder,fjder)
fjtemp(ntop)=zero
fjtemp(ntop-1)=done
do i=ntop-1,1,-1
dcoef=2*i
dcoef=2*i
ztmp=dcoef*zinv*fjtemp(i)-fjtemp(i+1)
fjtemp(i-1)=ztmp
c
Expand Down

0 comments on commit 3b2323b

Please sign in to comment.