Skip to content

Commit

Permalink
MD: replace "save" variable with logical in MD_Point
Browse files Browse the repository at this point in the history
See comments on PR OpenFAST#2214 for details
  • Loading branch information
andrew-platt committed Aug 29, 2024
1 parent 29b60df commit 92f0196
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/moordyn/src/MoorDyn_Point.f90
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,9 @@ SUBROUTINE Point_RemoveLine(Point, lineID, TopOfLine, rEnd, rdEnd)
REAL(DbKi), INTENT(INOUT) :: rdEnd(3)

Integer(IntKi) :: l,m,J
Integer(IntKi) :: found = 0
logical :: found

found = .false.

DO l = 1,Point%nAttached ! look through attached lines

Expand All @@ -409,13 +411,13 @@ SUBROUTINE Point_RemoveLine(Point, lineID, TopOfLine, rEnd, rdEnd)
EXIT
END DO

found = 1
found = .true.

END IF

END DO

IF (found == 0) THEN ! detect if line not found TODO: fix this, its wrong. If pointNnattached is oprginally 2, then it will be 1 after one run of the loop and l will also be 1
IF (found) THEN ! detect if line not found TODO: fix this, its wrong. If pointNnattached is oprginally 2, then it will be 1 after one run of the loop and l will also be 1
CALL WrScr("Error: failed to find line to remove during RemoveLine call to Point "//trim(num2lstr(Point%IdNum))//". Line "//trim(num2lstr(lineID)))
END IF

Expand Down

0 comments on commit 92f0196

Please sign in to comment.