!*****************************************************************************************************!
! TITLE: CFVR5111 - Test Defined Sections
! SUBTITLE: Example to test bridge sections
!
! DESCRIPTION: Several bridge sections are defined in this example
! DESCRIPTION:
! DESCRIPTION: The aim of the example is to verify the geometry of the sections.
!
! ELEMENT TYPE: NONE
! MODULES: NLBR
! UNITS: SI
! KEYWORD1: Bridges
!
!
!*************************************************************************************!
  FINISH
  ~CFCLEAR,,1
  ~CFACTIV,NLBR,Y
  NomFile='CFVR5111'
  /TITLE, %NomFile%, Test Defined Sections

! ---------------------------------------------------------------------------------
! Initial data
! ---------------------------------------------------------------------------------
/PREP7

~BRSSLAB,1,RS,1,10 ,5
~BRSMDF,1,NAME,,,Sec1
~BRSSLAB,2,TS,2,20 ,50 ,10 ,3
~BRSMDF,2,NAME,,,Sec2
~BRSSLAB,3,TF,3,100 ,120 ,200 ,20 ,8 ,4
~BRSMDF,3,NAME,,,Sec3
~BRSSLAB,4,PS,4,10 ,15 ,20 ,30 ,10 ,3 ,2 ,2
~BRSMDF,4,NAME,,,Sec4
~BRSSLAB,5,PAL,5,30 ,39 ,48 ,59 ,25 ,10 ,5 ,3
~BRSSLAB,5,PAR,5,10 ,15 ,25 ,38 ,15 ,5 ,5 ,3
~BRSMDF,5,NAME,,,Sec5

!--------------------------------------------------------------------------------------
! DATA CHECK
!--------------------------------------------------------------------------------------
! Data comparison number

  NComp = 146
  NComp_ch = 5

! Matrix dim.
  *DIM,LABEL,CHAR,Ncomp,1
  *DIM,LABEL_CH,CHAR,Ncomp_ch,1
  *DIM,VALUE,,Ncomp,3
  *DIM,VALUE_CH,CHAR,Ncomp_ch,3
  *DIM,TOLER,,Ncomp,2
  *DIM,Nodes,,Ncomp,1
  *DIM,COORDX,,Ncomp,1

! Correct values
  j = 0
  *do,ii,1,5
  j=j+1
  LABEL(j)  = 'TYPE%ii%' $ VALUE( j,1) = ii  $ ~CFGET,value( j,2),BRIDGE,,SECTION,TYPE,,ii
  *enddo
  VALUE(5,1) = 6
  *do,ii,1,5
  j=j+1
  LABEL(j)  = 'MAT%ii%'  $ VALUE( j,1) = ii  $ ~CFGET,value( j,2),BRIDGE,,SECTION,MAT,,ii
  *enddo
  *do,ii,1,5
   LABEL_CH(ii)  = 'NAME%ii%' $ VALUE_CH( ii,1) = 'Sec%ii%'  $ ~CFGET,VALUE_CH( ii,2),BRIDGE,,SECTION,NAME,,ii
  *enddo

  VALUE(11,1) = 10,10,12,14,14
  *do,ii,1,5
  j=j+1
  LABEL(j)  = 'NPOINT%ii%'  $ ~CFGET,value( j,2),BRIDGE,,SECTION,NPOINT,,ii
  *enddo

  VALUE(16,1) = 0,0,0,0,0
  *do,ii,1,5
  j=j+1
  LABEL(j)  = 'NHOLES%ii%'  $ ~CFGET,value( j,2),BRIDGE,,SECTION,NHOLES,,ii
  *enddo
  VALUE(21,1) = 3,3,3,3,3
  *do,ii,1,5
  j=j+1
  LABEL(j)  = 'NDIV%ii%'  $ ~CFGET,value( j,2),BRIDGE,,SECTION,NDIV,,ii
  *enddo
! Points on the first section
!              |   1|   2|   3|   4|   5|   6|   7|   8|   9|  10
  VALUE(26,1) =  0.0,-5.0,-5.0, 0.0,-5.0,-5.0,-5.0, 0.0, 0.0, 0.0
  VALUE(36,1) =  5.0, 5.0,-5.0,-5.0, 2.5, 0.0,-2.5, 2.5, 0.0,-2.5
  *do,ii,1,10
  j=j+1
  LABEL(j)  = 'P1Y%ii%'  $ ~CFGET,value( j,2),BRIDGE,,SECTION,POINT,Y,1,ii
  *enddo
 *do,ii,1,10
  j=j+1
  LABEL(j)  = 'P1Z%ii%'  $ ~CFGET,value( j,2),BRIDGE,,SECTION,POINT,Z,1,ii
  *enddo
! Points on the second section
!              |     1|     2|     3|     4|     5|     6|     7|     8|     9|    10
  VALUE(46,1) =    0.0,  -3.0, -10.0, -10.0,  -3.0,   0.0, -10.0,   0.0,   0.0,   0.0
  VALUE(56,1) =   25.0,  25.0,  10.0, -10.0, -25.0, -25.0,   0.0,  10.0,   0.0, -10.0
  *do,ii,1,10
  j=j+1
  LABEL(j)  = 'P2Y%ii%'  $ ~CFGET,value( j,2),BRIDGE,,SECTION,POINT,Y,2,ii
  *enddo
 *do,ii,1,10
  j=j+1
  LABEL(j)  = 'P2Z%ii%'  $ ~CFGET,value( j,2),BRIDGE,,SECTION,POINT,Z,2,ii
  *enddo
! Points on the third section
!              |     1|     2|     3|     4|     5|     6|     7|     8|     9|    10|   11|    12|
  VALUE(66,1) =    0.0,  -4.0, -12.0, -20.0, -20.0, -12.0,  -4.0,   0.0, -20.0,   0.0,  0.0,   0.0
  VALUE(78,1) =  100.0, 100.0,  60.0,  50.0, -50.0, -60.0,-100.0,-100.0,   0.0,  60.0,  0.0, -60.0
  *do,ii,1,12
  j=j+1
  LABEL(j)  = 'P3Y%ii%'  $ ~CFGET,value( j,2),BRIDGE,,SECTION,POINT,Y,3,ii
  *enddo
 *do,ii,1,12
  j=j+1
  LABEL(j)  = 'P3Z%ii%'  $ ~CFGET,value( j,2),BRIDGE,,SECTION,POINT,Z,3,ii
  *enddo
! Points on the fourth section
!              |     1|     2|     3|     4|     5|     6|     7|     8|     9|    10|   11|    12|    13|    14|
  VALUE(90,1) =    0.0,  -2.0,  -5.0,  -7.0, -10.0, -10.0,  -7.0,  -5.0,  -2.0,   0.0,-10.0,   0.0,   0.0,    0.0
  VALUE(104,1) =  15.0,  15.0,  10.0,   7.5,   5.0,  -5.0,  -7.5, -10.0, -15.0, -15.0,  0.0,   7.5,   0.0,   -7.5
  *do,ii,1,14
  j=j+1
  LABEL(j)  = 'P4Y%ii%'  $ ~CFGET,value( j,2),BRIDGE,,SECTION,POINT,Y,4,ii
  *enddo
 *do,ii,1,14
  j=j+1
  LABEL(j)  = 'P4Z%ii%'  $ ~CFGET,value( j,2),BRIDGE,,SECTION,POINT,Z,4,ii
  *enddo

! Points on the fifth section
!              |     1|     2|     3|     4|     5|     6|     7|     8|     9|    10|   11|    12|    13|    14|
  VALUE(118,1) =  0.0 , -3.0 ,-10.0 ,-15.0 ,-25.0 ,-15.0 ,-10.0 , -5.0 , -3.0 ,  0.0 , 0.0 ,  0.0 ,  0.0 , -17.5
  VALUE(132,1) = 59.0 , 59.0 , 48.0 , 39.0 , 30.0 ,-10.0 ,-15.0 ,-25.0 ,-38.0 ,-38.0 ,39.0 ,  0.0 ,-15.0 ,   0.0
  *do,ii,1,14
  j=j+1
  LABEL(j)  = 'P5Y%ii%'  $ ~CFGET,value( j,2),BRIDGE,,SECTION,POINT,Y,5,ii
  *enddo
 *do,ii,1,14
  j=j+1
  LABEL(j)  = 'P5Z%ii%'  $ ~CFGET,value( j,2),BRIDGE,,SECTION,POINT,Z,5,ii
  *enddo

 *DO,II,1,NComp
   TOLER(II,1)  = 1E-3
   TOLER(II,2)  = 1E-3
 *ENDDO

!--------------------------------------------------------------------------------------
! Results comparison
!--------------------------------------------------------------------------------------
  COMPARA.MAC
