anchor.diff:     close(aerodynForcesFile)
      close(actForcesFile)
   #endif
  -   
  +
  +   END DO
  +
   END SUBROUTINE SetOpFMForces
   !----------------------------------------------------------------------------------------------------------------------------------
   SUBROUTINE OpFM_SetWriteOutput( OpFM )
  
positive.code:          
        END DO !J = 1,p%BldNodes ! Loop through the blade nodes / elements
     END DO !K = 1,p%NumBl
     
     ! tower nodes
     DO J=1,u_AD%TowerMotion%nnodes
        Node = Node + 1
        OpFM%u%pxVel(Node) = u_AD%TowerMotion%TranslationDisp(1,J) + u_AD%TowerMotion%Position(1,J)
        OpFM%u%pyVel(Node) = u_AD%TowerMotion%TranslationDisp(2,J) + u_AD%TowerMotion%Position(2,J)
        OpFM%u%pzVel(Node) = u_AD%TowerMotion%TranslationDisp(3,J) + u_AD%TowerMotion%Position(3,J)
     END DO
     
     
     ! Do the Actuator Force nodes now
     Node = 1   ! displaced hub position 
     OpFM%u%pxForce(Node) = OpFM%u%pxVel(Node)
  
negative.code:    !.......................
  
     ! mesh mapping from line2 mesh to point mesh
     DO K = OpFM%p%NumBl+1,OpFM%p%NMappings
  
  #ifdef DEBUG_OPENFOAM
     DO J = 1,u_AD%TowerMotion%NNodes
        write(aerodynForcesFile,*) u_AD%TowerMotion%TranslationDisp(1,j) + u_AD%TowerMotion%Position(1,j), ', ', u_AD%TowerMotion%TranslationDisp(2,j) + u_AD%TowerMotion%Position(2,j), ', ', u_AD%TowerMotion%TranslationDisp(3,j) + u_AD%TowerMotion%Position(3,j), ', ', OpFM%y%u(1 + OpFM%p%NumBl*u_AD%BladeMotion(k)%NNodes + j), ', ', OpFM%y%v(1 + OpFM%p%NumBl*u_AD%BladeMotion(k)%NNodes + j), ', ', OpFM%y%w(1 + OpFM%p%NumBl*u_AD%BladeMotion(k)%NNodes + j), ', ', y_AD%TowerLoad%Force(1,j), ', ', y_AD%TowerLoad%Force(2,j), ', ', y_AD%TowerLoad%Force(2,j)
     END DO
  