check for twin nodes only in direction of the surface normal. this solves a problem with models of single element thickness and periodic fluxes.

This commit is contained in:
Christoph Kords 2011-02-24 09:26:30 +00:00
parent fed53a7e60
commit 8aef9b1c13
1 changed files with 9 additions and 16 deletions

View File

@ -2970,20 +2970,14 @@ checkCandidateIP: do candidateIP = 1,FE_Nips(neighboringType)
!*** if no match found, then also check node twins !*** if no match found, then also check node twins
if(checkTwins) then if(checkTwins) then
periodicityDirection: do dir = 1,3 dir = maxloc(abs(mesh_ipAreaNormal(1:3,neighbor,myIP,myElem)),1) ! check for twins only in direction of the surface normal
do a = 1,NlinkedNodes do a = 1,NlinkedNodes
twin_of_linkedNode = mesh_nodeTwins(dir,linkedNodes(a)) twin_of_linkedNode = mesh_nodeTwins(dir,linkedNodes(a))
if (twin_of_linkedNode == 0_pInt & ! twin of linkedNode does not exist... if (twin_of_linkedNode == 0_pInt & ! twin of linkedNode does not exist...
.or. all(matchingNodes /= twin_of_linkedNode)) then ! ... or it does not match any matchingNode .or. all(matchingNodes /= twin_of_linkedNode)) then ! ... or it does not match any matchingNode
if (dir < 3) then ! no match in this direction...
cycle periodicityDirection ! ... so try in different direction
else ! no matching in any direction...
cycle checkCandidateIP ! ... so check next candidateIP cycle checkCandidateIP ! ... so check next candidateIP
endif endif
endif
enddo enddo
exit periodicityDirection
enddo periodicityDirection
endif endif
!*** we found a match !!! !*** we found a match !!!
@ -2991,7 +2985,6 @@ periodicityDirection: do dir = 1,3
mesh_ipNeighborhood(1,neighbor,myIP,myElem) = matchingElem mesh_ipNeighborhood(1,neighbor,myIP,myElem) = matchingElem
mesh_ipNeighborhood(2,neighbor,myIP,myElem) = candidateIP mesh_ipNeighborhood(2,neighbor,myIP,myElem) = candidateIP
exit checkCandidateIP exit checkCandidateIP
enddo checkCandidateIP enddo checkCandidateIP
endif ! end of valid external matching endif ! end of valid external matching
endif ! end of internal/external matching endif ! end of internal/external matching