• R/O
  • SSH

treelm: 提交

Repository of the treelm library. Now found at https://github.com/apes-suite/treelm


Commit MetaInfo

修訂a605bfb94e422fb9ea3cbe0d0715d04e518a2a9d (tree)
時間2023-05-09 20:49:46
作者Kannan Masilamani <kannan.masilamani@dlr....>
CommiterKannan Masilamani

Log Message

Added a search for neighbor of a requested point in a subTree in
tem_cano_storePntsInSubTree

Change Summary

差異

diff -r a2df5374561d -r a605bfb94e42 source/tem_canonical_module.f90
--- a/source/tem_canonical_module.f90 Tue May 09 12:13:17 2023 +0200
+++ b/source/tem_canonical_module.f90 Tue May 09 13:49:46 2023 +0200
@@ -845,11 +845,11 @@
845845 !> growing array to store tracking points
846846 type(tem_grwPoints_type), intent(inout) :: grwPnts
847847 ! --------------------------------------------------------------------------
848- integer :: nElems, nPoints, maxLevel, elemPos
849- integer :: iCano, iPnt
848+ integer :: nElems, nPoints, maxLevel, elemPos, neighPos, coordOfId(4)
849+ integer :: iCano, iPnt, iQQN
850850 real(kind=rk) :: coord(3), offset_a, offset_b, offset_c
851851 real(kind=rk) :: unit_vec_a(3),unit_vec_b(3), unit_vec_c(3)
852- integer(kind=long_k) :: treeID
852+ integer(kind=long_k) :: treeID, tOffset, neighID
853853 integer(kind=long_k), allocatable :: subTreeID(:)
854854 ! --------------------------------------------------------------------------
855855 maxLevel = inTree%global%maxLevel
@@ -887,7 +887,25 @@
887887 treeID = tem_IdOfCoord( tem_CoordOfReal(inTree, coord(1:3), maxLevel) )
888888 ! get position of the treeID in subTree
889889 elemPos = tem_PosOfId( treeID, subTreeID )
890- if( elempos > 0 ) then
890+
891+ neighPos = 0
892+ if (elemPos <= 0) then
893+ ! Point must be outside fluid domain, its neighbor must be in subTreeID
894+ ! since it was added in tem_cano_initSubTree
895+ coordOfId = tem_CoordOfId( treeID )
896+ tOffset = tem_FirstIdAtLevel( coordOfId(4) )
897+ directionLoop: do iQQN = 1, qQQQ
898+ neighID = tem_IdOfCoord( &
899+ & [ coordOfId(1) + qOffset( iQQN, 1 ), &
900+ & coordOfId(2) + qOffset( iQQN, 2 ), &
901+ & coordOfId(3) + qOffset( iQQN, 3 ), &
902+ & coordOfId(4) ], tOffset)
903+ neighPos = tem_PosOfId( neighID, subTreeID)
904+ if (neighPos > 0) exit directionLoop
905+ end do directionLoop
906+ end if
907+
908+ if( elempos > 0 .or. neighPos > 0 ) then
891909 ! append the physical points to the growing array of points
892910 call append( me = grwpnts, &
893911 & val = coord )
Show on old repository browser