mesh_maxNsharedElems is now correct. Added check for multiple identical nodes in an element, e.g. triangular quad-element and the like.

This commit is contained in:
Philip Eisenlohr 2008-01-10 17:12:33 +00:00
parent fe70a82d6d
commit 1233d01cd5
1 changed files with 17 additions and 9 deletions

View File

@ -373,7 +373,7 @@ candidate: do i=1,minN ! iterate over lonelyNode's shared elements
END SUBROUTINE
!********************************************************************
!!********************************************************************
! get maximum count of nodes, IPs, IP neighbors, and shared elements
! for subsequent array allocations
!
@ -387,13 +387,17 @@ candidate: do i=1,minN ! iterate over lonelyNode's shared elements
implicit none
integer(pInt), dimension (mesh_Nnodes) :: node_count
integer(pInt), dimension (:), allocatable :: node_seen
integer(pInt) unit,i,j,n,t,e
integer(pInt), dimension (133) :: pos
character*300 line
integer(pInt) targetNode
610 FORMAT(A300)
node_count = 0_pInt
allocate(node_seen(maxval(FE_Nnodes)))
rewind(unit)
do
@ -410,9 +414,13 @@ candidate: do i=1,minN ! iterate over lonelyNode's shared elements
mesh_maxNnodes = max(mesh_maxNnodes,FE_Nnodes(t))
mesh_maxNips = max(mesh_maxNips,FE_Nips(t))
mesh_maxNipNeighbors = max(mesh_maxNipNeighbors,FE_NipNeighbors(t))
node_seen = 0_pInt
do j=1,FE_Nnodes(t)
n = mesh_FEasCP('node',IO_IntValue (line,pos,j+2))
if (all(node_seen /= n)) then
node_count(n) = node_count(n)+1
end if
node_seen(j) = n
end do
end if
end do