subnodeparent check is now running only over actual number (not max) of parent nodes...
This commit is contained in:
parent
0d2bc268d4
commit
dbc5a3a3ce
|
@ -837,6 +837,7 @@ FE_ipNeighbor(1:FE_NipNeighbors(8),1:FE_Nips(8),8) = & ! element 117
|
|||
! *** FE_subNodeParent ***
|
||||
! lists the group of nodes for which the center of gravity
|
||||
! corresponds to the location of a each subnode.
|
||||
! fill with 0.
|
||||
! example: face-centered subnode with faceNodes 1,2,3,4 to be used in,
|
||||
! e.g., a 8 IP grid, would be encoded:
|
||||
! 1, 2, 3, 4, 0, 0, 0, 0
|
||||
|
@ -3144,7 +3145,7 @@ end subroutine mesh_build_ipNeighborhood
|
|||
subroutine mesh_build_subNodeCoords
|
||||
|
||||
implicit none
|
||||
integer(pInt) e,t,n,p
|
||||
integer(pInt) e,t,n,p,Nparents
|
||||
|
||||
if (.not. allocated(mesh_subNodeCoord)) then
|
||||
allocate(mesh_subNodeCoord(3,mesh_maxNnodes+mesh_maxNsubNodes,mesh_NcpElems))
|
||||
|
@ -3157,13 +3158,12 @@ subroutine mesh_build_subNodeCoords
|
|||
mesh_subNodeCoord(1:3,n,e) = mesh_node(1:3,mesh_FEasCP('node',mesh_element(4_pInt+n,e))) ! loop over nodes of this element type
|
||||
enddo
|
||||
do n = 1_pInt,FE_NsubNodes(t) ! now for the true subnodes
|
||||
do p = 1_pInt,FE_Nips(t) ! loop through possible parent nodes
|
||||
if (FE_subNodeParent(p,n,t) > 0_pInt) & ! valid parent node
|
||||
Nparents = count(FE_subNodeParent(1_pInt:FE_Nips(t),n,t) > 0_pInt)
|
||||
do p = 1_pInt,Nparents ! loop through present parent nodes
|
||||
mesh_subNodeCoord(1:3,FE_Nnodes(t)+n,e) = mesh_subNodeCoord(1:3,FE_Nnodes(t)+n,e) &
|
||||
+ mesh_node(1:3,mesh_FEasCP('node',mesh_element(4_pInt+FE_subNodeParent(p,n,t),e))) ! add up parents
|
||||
enddo
|
||||
mesh_subNodeCoord(1:3,n+FE_Nnodes(t),e) = mesh_subNodeCoord(1:3,n+FE_Nnodes(t),e) &
|
||||
/real(count(FE_subNodeParent(:,n,t) > 0_pInt),pReal)
|
||||
mesh_subNodeCoord(1:3,n+FE_Nnodes(t),e) = mesh_subNodeCoord(1:3,n+FE_Nnodes(t),e)/real(Nparents,pReal)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
|
@ -3186,9 +3186,7 @@ subroutine mesh_build_ipCoordinates
|
|||
real(pReal), dimension(3,mesh_maxNnodes+mesh_maxNsubNodes) :: gravityNodePos ! coordinates of subnodes determining center of grav
|
||||
real(pReal), dimension(3) :: centerOfGravity
|
||||
|
||||
if (.not. allocated(mesh_ipCenterOfGravity)) then
|
||||
allocate(mesh_ipCenterOfGravity(3,mesh_maxNips,mesh_NcpElems))
|
||||
endif
|
||||
if (.not. allocated(mesh_ipCenterOfGravity)) allocate(mesh_ipCenterOfGravity(3,mesh_maxNips,mesh_NcpElems))
|
||||
|
||||
do e = 1_pInt,mesh_NcpElems ! loop over cpElems
|
||||
t = mesh_element(2,e) ! get elemType
|
||||
|
|
Loading…
Reference in New Issue