anchor.diff:             ENDDO
          ENDDO
      ENDDO
  -
      DEALLOCATE(temp_GL)
      DEALLOCATE(temp_ratio)
   ! Physical damping flag and 6 damping coefficients
      p%damp_flag  = InputFileData%InpBl%damp_flag
      CALL AllocAry(p%beta,6,'Damping coefficient',ErrStat2,ErrMsg2)
         CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
  +   p%beta(:)  = 0.0D0
      p%beta(:)  = InputFileData%InpBl%beta(:)
   
      IF( ErrStat >= AbortErrLev ) RETURN
  
positive.code:    temp_int = p%node_elem * p%dof_node
     CALL AllocAry(p%uuN0,temp_int,p%elem_total,'uuN0 (initial position) array',ErrStat2,ErrMsg2)
        CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
     ! Temporary GLL point intrinsic coordinates array
     CALL AllocAry(temp_GLL,p%node_elem,'GLL points array',ErrStat2,ErrMsg2)
        CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
     ! Temporary GLL weight function array
     CALL AllocAry(temp_w,p%node_elem,'GLL weight array',ErrStat2,ErrMsg2)
        CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
     CALL BD_GenerateGLL(p%node_elem-1,temp_GLL,temp_w,ErrStat2,ErrMsg2)
        CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
     DEALLOCATE(temp_w)
  
negative.code:    ! temp_L2: physical coordinates of Gauss points and two end points
     CALL AllocAry(temp_L2,3,p%ngp*p%elem_total+2,'temp_L2',ErrStat2,ErrMsg2)
        CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
     temp_L2(:,:) = 0.0D0
     ! Temporary Gauss point intrinsic coordinates array
     CALL AllocAry(temp_GL,p%ngp,'temp_GL',ErrStat2,ErrMsg2)
        CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
     temp_GL(:) = 0.0D0
     ! Temporary Gauss weight function array
     CALL AllocAry(temp_w,p%ngp,'GL weight array',ErrStat2,ErrMsg2)
        CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
     temp_w(:) = 0.0D0
     CALL BD_GaussPointWeight(p%ngp,temp_GL,temp_w,ErrStat2,ErrMsg2)
        CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
     DEALLOCATE(temp_w)
  