58 INTEGER :: num_matches
61 INTEGER :: max_iterations
74 IF (numscale_ft .NE. numscale_bk)
THEN
75 WRITE(6,*)
"ERROR: The number of nodes on the front and back surfaces do not equal."
76 WRITE(6,*)
"Please check your mesh and try again."
80 WRITE(6,
'(//A)')
"Beginning search on sister nodes... This could take a while"
82 100 frontnode => first_front_node
83 backnode => first_back_node
85 iteration = iteration + 1
87 DO WHILE(
associated(backnode%next))
88 DO WHILE(
associated(frontnode%next))
100 IF ((backnode%coord(1) .EQ. frontnode%coord(1)) .OR. &
101 ((backnode%coord(1)/frontnode%coord(1) .GT. low_tol/100000) .AND. &
102 (backnode%coord(1)/frontnode%coord(1) .LT. hi_tol/100000)))
THEN
105 IF((backnode%coord(2) .EQ. frontnode%coord(2)) .OR. &
106 ((backnode%coord(2)/frontnode%coord(2) .GT. low_tol/100000) .AND. &
107 (backnode%coord(2)/frontnode%coord(2) .LT. hi_tol/100000)))
THEN
108 backnode%sister => frontnode
109 frontnode%sister => backnode
110 num_matches = num_matches + 1
114 frontnode => frontnode%next
118 backnode => backnode%next
119 frontnode => first_front_node
145 WRITE(6,*)
"Number of verified matches: ", num_matches
146 WRITE(6,*)
"Number of intended matches: ", numscale_np/2
148 IF (iteration .LE. max_iterations)
THEN
149 IF (numscale_np/2 .NE. num_matches)
THEN
150 WRITE(6,*)
"There was a failure in matching up the desired number of nodes."
151 WRITE(6,*)
"Redefining tolerances and starting iteration number ", iteration
152 low_tol = low_tol - step
153 hi_tol = hi_tol + step
155 ELSE IF (numscale_np/2 .EQ. num_matches)
THEN
156 WRITE(6,*)
"Number of matches confirmed. Proceeding to next step."