explain data layout
This commit is contained in:
parent
0a1bac6787
commit
f044b8c42f
|
@ -395,6 +395,7 @@ pure function IPneighborhood(grid)
|
||||||
e = 0
|
e = 0
|
||||||
do z = 0,grid(3)-1; do y = 0,grid(2)-1; do x = 0,grid(1)-1
|
do z = 0,grid(3)-1; do y = 0,grid(2)-1; do x = 0,grid(1)-1
|
||||||
e = e + 1
|
e = e + 1
|
||||||
|
! element ID
|
||||||
IPneighborhood(1,1,1,e) = z * grid(1) * grid(2) &
|
IPneighborhood(1,1,1,e) = z * grid(1) * grid(2) &
|
||||||
+ y * grid(1) &
|
+ y * grid(1) &
|
||||||
+ modulo(x+1,grid(1)) &
|
+ modulo(x+1,grid(1)) &
|
||||||
|
@ -419,13 +420,17 @@ pure function IPneighborhood(grid)
|
||||||
+ y * grid(1) &
|
+ y * grid(1) &
|
||||||
+ x &
|
+ x &
|
||||||
+ 1
|
+ 1
|
||||||
IPneighborhood(2,1:6,1,e) = 1
|
! IP ID
|
||||||
IPneighborhood(3,1, 1,e) = 2
|
IPneighborhood(2,:,1,e) = 1
|
||||||
IPneighborhood(3,2, 1,e) = 1
|
|
||||||
IPneighborhood(3,3, 1,e) = 4
|
! face ID
|
||||||
IPneighborhood(3,4, 1,e) = 3
|
IPneighborhood(3,1,1,e) = 2
|
||||||
IPneighborhood(3,5, 1,e) = 6
|
IPneighborhood(3,2,1,e) = 1
|
||||||
IPneighborhood(3,6, 1,e) = 5
|
IPneighborhood(3,3,1,e) = 4
|
||||||
|
IPneighborhood(3,4,1,e) = 3
|
||||||
|
IPneighborhood(3,5,1,e) = 6
|
||||||
|
IPneighborhood(3,6,1,e) = 5
|
||||||
|
|
||||||
enddo; enddo; enddo
|
enddo; enddo; enddo
|
||||||
|
|
||||||
end function IPneighborhood
|
end function IPneighborhood
|
||||||
|
|
|
@ -51,7 +51,7 @@ subroutine mesh_init(ip,el)
|
||||||
integer, intent(in) :: el, ip
|
integer, intent(in) :: el, ip
|
||||||
|
|
||||||
real(pReal), dimension(:,:), allocatable :: &
|
real(pReal), dimension(:,:), allocatable :: &
|
||||||
node0_elem, & !< node x,y,z coordinates (initially!)
|
node0_elem, & !< node x,y,z coordinates (initially!)
|
||||||
node0_cell
|
node0_cell
|
||||||
type(tElement) :: elem
|
type(tElement) :: elem
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ subroutine mesh_init(ip,el)
|
||||||
real(pReal), dimension(:,:), allocatable :: &
|
real(pReal), dimension(:,:), allocatable :: &
|
||||||
ip_reshaped
|
ip_reshaped
|
||||||
integer,dimension(:,:,:), allocatable :: &
|
integer,dimension(:,:,:), allocatable :: &
|
||||||
connectivity_cell !< cell connectivity for each element,ip/cell
|
connectivity_cell !< cell connectivity for each element,ip/cell
|
||||||
integer, dimension(:,:), allocatable :: &
|
integer, dimension(:,:), allocatable :: &
|
||||||
connectivity_elem
|
connectivity_elem
|
||||||
real(pReal), dimension(:,:,:,:),allocatable :: &
|
real(pReal), dimension(:,:,:,:),allocatable :: &
|
||||||
|
@ -372,9 +372,9 @@ subroutine inputRead_NelemSets(nElemSets,maxNelemInSet,&
|
||||||
do while (.true.)
|
do while (.true.)
|
||||||
i = i + 1
|
i = i + 1
|
||||||
chunkPos = IO_stringPos(fileContent(l+i))
|
chunkPos = IO_stringPos(fileContent(l+i))
|
||||||
elemInCurrentSet = elemInCurrentSet + chunkPos(1) - 1 ! add line's count when assuming 'c'
|
elemInCurrentSet = elemInCurrentSet + chunkPos(1) - 1 ! add line's count when assuming 'c'
|
||||||
if(IO_lc(IO_stringValue(fileContent(l+i),chunkPos,chunkPos(1))) /= 'c') then ! line finished, read last value
|
if(IO_lc(IO_stringValue(fileContent(l+i),chunkPos,chunkPos(1))) /= 'c') then ! line finished, read last value
|
||||||
elemInCurrentSet = elemInCurrentSet + 1 ! data ended
|
elemInCurrentSet = elemInCurrentSet + 1 ! data ended
|
||||||
exit
|
exit
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
|
@ -1046,7 +1046,7 @@ integer function mesh_FEasCP(what,myID)
|
||||||
lower = 1
|
lower = 1
|
||||||
upper = int(size(lookupMap,2),pInt)
|
upper = int(size(lookupMap,2),pInt)
|
||||||
|
|
||||||
if (lookupMap(1,lower) == myID) then ! check at bounds QUESTION is it valid to extend bounds by 1 and just do binary search w/o init check at bounds?
|
if (lookupMap(1,lower) == myID) then ! check at bounds QUESTION is it valid to extend bounds by 1 and just do binary search w/o init check at bounds?
|
||||||
mesh_FEasCP = lookupMap(2,lower)
|
mesh_FEasCP = lookupMap(2,lower)
|
||||||
return
|
return
|
||||||
elseif (lookupMap(1,upper) == myID) then
|
elseif (lookupMap(1,upper) == myID) then
|
||||||
|
|
Loading…
Reference in New Issue