anchor.diff:        IF (ALLOCATED(TempMembers)) DEALLOCATE(TempMembers)
      END SUBROUTINE CleanUp_Discrt
   
  +   !> Set properties of node k
  +   SUBROUTINE SetNewNode(k, x, y, z, Init)
  +      TYPE(SD_InitType),      INTENT(INOUT) :: Init
  +      INTEGER,                INTENT(IN)    :: k
  +      REAL(ReKi),             INTENT(IN)    :: x, y, z
  +      Init%Nodes(k, 1)                     = k
  +      Init%Nodes(k, 2)                     = x
  +      Init%Nodes(k, 3)                     = y
  +      Init%Nodes(k, 4)                     = z
  +      Init%Nodes(k, iJointType)            = idJointCantilever ! Note: all added nodes are Cantilever
  +      ! Properties below are for non-cantilever joints
  +      Init%Nodes(k, iJointDir:iJointDir+2) = -99999 
  +      Init%Nodes(k, iJointStiff)           = -99999 
  +      Init%Nodes(k, iJointDamp)            = -99999 
  +   END SUBROUTINE SetNewNode
  +   
  +   !> Set properties of element k
  +   SUBROUTINE SetNewElem(k, n1, n2, etype, p1, p2, p)
  +      INTEGER,                INTENT(IN   )   :: k
  +      INTEGER,                INTENT(IN   )   :: n1
  +      INTEGER,                INTENT(IN   )   :: n2
  +      INTEGER,                INTENT(IN   )   :: eType
  +      INTEGER,                INTENT(IN   )   :: p1
  +      INTEGER,                INTENT(IN   )   :: p2
  +      TYPE(SD_ParameterType), INTENT(INOUT)   :: p
  +      p%Elems(k, 1)        = k
  +      p%Elems(k, 2)        = n1
  +      p%Elems(k, 3)        = n2
  +      p%Elems(k, iMProp  ) = p1
  +      p%Elems(k, iMProp+1) = p2
  +      p%Elems(k, iMType)   = eType
  +   END SUBROUTINE SetNewElem
  +
  +   !> Set material properties of element k,  NOTE: this is only for a beam
  +   SUBROUTINE SetNewProp(k, E, G, rho, d, t, TempProps)
  +      INTEGER   , INTENT(IN)   :: k
  +      REAL(ReKi), INTENT(IN)   :: E, G, rho, d, t
  +      REAL(ReKi), INTENT(INOUT):: TempProps(:, :)
  +      TempProps(k, 1) = k
  +      TempProps(k, 2) = E
  +      TempProps(k, 3) = G
  +      TempProps(k, 4) = rho
  +      TempProps(k, 5) = d
  +      TempProps(k, 6) = t
  +   END SUBROUTINE SetNewProp
  +
   END SUBROUTINE SD_Discrt
  -
  -!------------------------------------------------------------------------------------------------------
  -!> Set properties of node k
  -SUBROUTINE SetNewNode(k, x, y, z, Init)
  -   TYPE(SD_InitType),      INTENT(INOUT) :: Init
  -   INTEGER,                INTENT(IN)    :: k
  -   REAL(ReKi),             INTENT(IN)    :: x, y, z
  -   
  -   Init%Nodes(k, 1)                     = k
  -   Init%Nodes(k, 2)                     = x
  -   Init%Nodes(k, 3)                     = y
  -   Init%Nodes(k, 4)                     = z
  -   Init%Nodes(k, iJointType)            = idJointCantilever ! Note: all added nodes are Cantilever
  -   ! Properties below are for non-cantilever joints
  -   Init%Nodes(k, iJointDir:iJointDir+2) = -99999 
  -   Init%Nodes(k, iJointStiff)           = -99999 
  -   Init%Nodes(k, iJointDamp)            = -99999 
  -
  -END SUBROUTINE SetNewNode
  -
  -!------------------------------------------------------------------------------------------------------
  -!> Set properties of element k
  -SUBROUTINE SetNewElem(k, n1, n2, etype, p1, p2, p)
  -   INTEGER,                INTENT(IN   )   :: k
  -   INTEGER,                INTENT(IN   )   :: n1
  -   INTEGER,                INTENT(IN   )   :: n2
  -   INTEGER,                INTENT(IN   )   :: eType
  -   INTEGER,                INTENT(IN   )   :: p1
  -   INTEGER,                INTENT(IN   )   :: p2
  -   TYPE(SD_ParameterType), INTENT(INOUT)   :: p
  -   
  -   p%Elems(k, 1)        = k
  -   p%Elems(k, 2)        = n1
  -   p%Elems(k, 3)        = n2
  -   p%Elems(k, iMProp  ) = p1
  -   p%Elems(k, iMProp+1) = p2
  -   p%Elems(k, iMType)   = eType
  -
  -END SUBROUTINE SetNewElem
  -
  -!------------------------------------------------------------------------------------------------------
  -!> Set material properties of element k
  -!! NOTE: this is only for a beam
  -SUBROUTINE SetNewProp(k, E, G, rho, d, t, TempProps)
  -   INTEGER   , INTENT(IN)   :: k
  -   REAL(ReKi), INTENT(IN)   :: E, G, rho, d, t
  -   REAL(ReKi), INTENT(INOUT):: TempProps(:, :)
  -   
  -   TempProps(k, 1) = k
  -   TempProps(k, 2) = E
  -   TempProps(k, 3) = G
  -   TempProps(k, 4) = rho
  -   TempProps(k, 5) = d
  -   TempProps(k, 6) = t
  -
  -END SUBROUTINE SetNewProp
   
   !------------------------------------------------------------------------------------------------------
   !> Set Element properties p%ElemProps, different properties are set depening on element type..
  
positive.code:    enddo
     call print_list(NodesList, 'Joint list')
  END FUNCTION NodesList
  
  
  !----------------------------------------------------------------------------
  !>
  ! - Removes the notion of "ID" and use Index instead
  ! - Creates Nodes (use indices instead of ID), similar to Joints array
  
negative.code: 
  
  CONTAINS
  !------------------------------------------------------------------------------------------------------
  ! --- Helper functions
  !------------------------------------------------------------------------------------------------------
  !> Maps nodes to elements 
  !! allocate NodesConnE and NodesConnN                                                                               
  