changed indices counting (fortran to python style, easier division to get rid of periodic copies)
corrected f2py pyf file
This commit is contained in:
parent
8ee78c6562
commit
d11aa15a67
|
@ -167,12 +167,12 @@ python module core ! in
|
||||||
real*8, dimension(3), intent(in) :: geomdim
|
real*8, dimension(3), intent(in) :: geomdim
|
||||||
integer, intent(in) :: queryPoints
|
integer, intent(in) :: queryPoints
|
||||||
integer, intent(in) :: domainPoints
|
integer, intent(in) :: domainPoints
|
||||||
real*8, dimension(spatialDim,queryPoints), intent(in), depend(queryPoints,spatialDim) :: querySet
|
real*8, dimension(spatialDim,queryPoints), intent(in), depend(spatialDim,queryPoints) :: querySet
|
||||||
real*8, dimension(spatialDim,domainPoints), intent(in), depend(domainPoints,spatialDim) :: domainSet
|
real*8, dimension(spatialDim,domainPoints), intent(in), depend(spatialDim,domainPoints) :: domainSet
|
||||||
! output variable
|
! output variable
|
||||||
integer, dimension(queryPoints), intent(out), depend(queryPoints) :: indices
|
integer, dimension(queryPoints), intent(out), depend(queryPoints) :: indices
|
||||||
! depending on input
|
! depending on input
|
||||||
real*8, dimension(3,(3**spatialDim)*domainPoints), depend(domainPoints,spatialDim) :: domainSetLarge
|
real*8, dimension(spatialDim,(3**spatialDim)*domainPoints), depend(spatialDim,domainPoints) :: domainSetLarge
|
||||||
end subroutine math_nearestNeighborSearch
|
end subroutine math_nearestNeighborSearch
|
||||||
end module math
|
end module math
|
||||||
|
|
||||||
|
|
|
@ -3870,7 +3870,7 @@ subroutine math_nearestNeighborSearch(spatialDim, Favg, geomdim, queryPoints, do
|
||||||
call kdtree2_n_nearest(tp=tree, qv=querySet(1:spatialDim,j),nn=1_pInt, results = Results)
|
call kdtree2_n_nearest(tp=tree, qv=querySet(1:spatialDim,j),nn=1_pInt, results = Results)
|
||||||
indices(j) = Results(1)%idx
|
indices(j) = Results(1)%idx
|
||||||
enddo
|
enddo
|
||||||
|
indices = indices -1_pInt ! let them run from 0 to domainPoints -1
|
||||||
|
|
||||||
end subroutine math_nearestNeighborSearch
|
end subroutine math_nearestNeighborSearch
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue