anchor.diff:     INTEGER(IntKi)           :: iNode !< Node index
      integer(IntKi), dimension(12) :: IDOF !  12 DOF indices in global unconstrained system
      integer(IntKi), dimension(3)  :: IDOF3!  3  DOF indices in global unconstrained system
  +   real(ReKi), dimension(6,6) :: M66  ! Mass matrix of an element node
  +   real(ReKi) :: m, x, y, z, Jxx, Jyy, Jzz, Jxy, Jxz, Jyz
  +   INTEGER    :: jGlob, kGlob
      ErrMsg  = ""
      ErrStat = ErrID_None
      
  
positive.code:       Init%FG( IDOF )    = Init%FG( IDOF )     + FGe(1:12)+ FCe(1:12) ! Note: gravity and pretension cable forces
        Init%K(IDOF, IDOF) = Init%K( IDOF, IDOF) + Ke(1:12,1:12)
        Init%M(IDOF, IDOF) = Init%M( IDOF, IDOF) + Me(1:12,1:12)
     ENDDO ! end loop over elements , i
        
     ! add concentrated mass 
     DO I = 1, Init%NCMass
        iNode = NINT(Init%CMass(I, 1)) ! Note index where concentrated mass is to be added
        ! Safety
        if (Init%Nodes(iNode,iJointType) /= idJointCantilever) then
           ErrMsg2='Concentrated mass is only for cantilever joints. Problematic node: '//trim(Num2LStr(iNode)); ErrStat2=ErrID_Fatal;
           if(Failed()) return
        endif
        DO J = 1, 3
            iGlob = p%NodesDOF(iNode)%List(J) ! ux, uy, uz
            Init%M(iGlob, iGlob) = Init%M(iGlob, iGlob) + Init%CMass(I, 2)
        ENDDO
        DO J = 4, 6
            iGlob = p%NodesDOF(iNode)%List(J) ! theta_x, theta_y, theta_z
            Init%M(iGlob, iGlob) = Init%M(iGlob, iGlob) + Init%CMass(I, J-1)
        ENDDO
     ENDDO ! Loop on concentrated mass
  
     ! Add concentrated mass induced gravity force
     DO I = 1, Init%NCMass
         iNode = NINT(Init%CMass(I, 1)) ! Note index where concentrated mass is to be added
         iGlob = p%NodesDOF(iNode)%List(3) ! uz
         Init%FG(iGlob) = Init%FG(iGlob) - Init%CMass(I, 2)*Init%g 
     ENDDO ! I concentrated mass induced gravity
     
     CALL CleanUp_AssembleKM()
     
  
negative.code: 
     CALL AllocAry( Init%K, p%nDOF, p%nDOF , 'Init%K',  ErrStat2, ErrMsg2); if(Failed()) return; ! system stiffness matrix 
     CALL AllocAry( Init%M, p%nDOF, p%nDOF , 'Init%M',  ErrStat2, ErrMsg2); if(Failed()) return; ! system mass matrix 
     CALL AllocAry( Init%FG,p%nDOF,          'Init%FG', ErrStat2, ErrMsg2); if(Failed()) return; ! system gravity force vector 
     Init%K  = 0.0_ReKi
     Init%M  = 0.0_ReKi
     Init%FG = 0.0_ReKi
  