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
|
||||
integer, intent(in) :: queryPoints
|
||||
integer, intent(in) :: domainPoints
|
||||
real*8, dimension(spatialDim,queryPoints), intent(in), depend(queryPoints,spatialDim) :: querySet
|
||||
real*8, dimension(spatialDim,domainPoints), intent(in), depend(domainPoints,spatialDim) :: domainSet
|
||||
real*8, dimension(spatialDim,queryPoints), intent(in), depend(spatialDim,queryPoints) :: querySet
|
||||
real*8, dimension(spatialDim,domainPoints), intent(in), depend(spatialDim,domainPoints) :: domainSet
|
||||
! output variable
|
||||
integer, dimension(queryPoints), intent(out), depend(queryPoints) :: indices
|
||||
! 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 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)
|
||||
indices(j) = Results(1)%idx
|
||||
enddo
|
||||
|
||||
indices = indices -1_pInt ! let them run from 0 to domainPoints -1
|
||||
|
||||
end subroutine math_nearestNeighborSearch
|
||||
|
||||
|
|
Loading…
Reference in New Issue