@@ -1511,6 +1511,9 @@ subroutine ADI_C_SetupRotor(iWT_c, TurbineIsHAWT_c, TurbOrigin_C, &
15111511 if (Failed()) return
15121512 endif
15131513
1514+ ! check Mesh points for blade specification
1515+ call CheckMeshPts(iWT); if (Failed()) return
1516+
15141517 call SetupMotionMesh()
15151518
15161519 ! Set error status
@@ -1541,8 +1544,9 @@ end function Failed0
15411544 ! > This subroutine prints out all the variables that are passed in. Use this only
15421545 ! ! for debugging the interface on the Fortran side.
15431546 subroutine ShowPassedData ()
1544- character (1 ) :: TmpFlag
1545- integer :: i,j
1547+ character (1 ) :: TmpFlag
1548+ integer :: i,j
1549+ character (35 ) :: TmpStr
15461550 call WrSCr(" " )
15471551 call WrScr(" -----------------------------------------------------------" )
15481552 call WrScr(" Interface debugging: Variables passed in through interface" )
@@ -1584,10 +1588,28 @@ subroutine ShowPassedData()
15841588 j= 9 * (i-1 )
15851589 call WrMatrix(InitMeshOri_C(j+1 :j+9 ),CU,' (9(ES23.15e2))' )
15861590 enddo
1591+ call WrScr(" Node mapping" )
1592+ call WrScr(" MeshPt Blade" )
1593+ do i= 1 ,int (NumMeshPts_C,IntKi)
1594+ write (TmpStr,' (15X,I5,10X,I5)' ) i,int (MeshPtToBladeNum_C(i),IntKi)
1595+ call WrScr(TmpStr)
1596+ enddo
15871597 endif
15881598 call WrScr(" -----------------------------------------------------------" )
15891599 end subroutine ShowPassedData
15901600
1601+ ! > very basic checks on mesh points
1602+ subroutine CheckMeshPts (iWT )
1603+ integer (IntKi), intent (in ) :: iWT
1604+ do i= 1 ,size (MeshPtToBladeNum_C)
1605+ if ((MeshPtToBladeNum_C(i) < 1_c_int ) .or. (MeshPtToBladeNum_C(i) > int (Sim% WT(iWT)% NumBlades))) then
1606+ ErrStat2= ErrID_Fatal
1607+ ErrMsg2 = ' Mesh Point ' // trim (Num2LStr(i))// ' assigned to invalid blade ' // trim (Num2LStr(MeshPtToBladeNum_C(i)))// ' on rotor ' // trim (Num2LStr(iWT))
1608+ if (Failed()) return
1609+ endif
1610+ enddo
1611+ end subroutine CheckMeshPts
1612+
15911613 subroutine SetupMotionMesh ()
15921614 real (ReKi) :: InitPos(3 )
15931615 real (R8 Ki) :: Orient(3 ,3 )
0 commit comments