<commit_before>        subroutine gendat (y,       ac,       x,      iBC,     BC,
     &                     iper,    ilwork,
     &                     shp,     shgl,    shpb,    shglb,
     &                     shpif0,  shpif1,  shgif0,  shgif1,
     &                     ifath,   velbar,   nsons ) 
c
c----------------------------------------------------------------------
c
c This routine inputs the geometry and the boundary conditions.
c
c
c <NAME>, Winter 1991.  (Fortran 90)
c----------------------------------------------------------------------
c
      
        use readarrays          ! used to acess nBC
        use dtnmod
        use pointer_data
        use wallData            ! give access to wnorm, findWallNOrm
        use genshp_m

        include "common.h"
        include "mpif.h"

c
c arrays in the following line are now dimensioned in readnblk
c        dimension nBC(nshg)
c
        dimension y(nshg,ndof),      ac(nshg,ndof),
     &            x(numnp,nsd),      iBC(nshg),
     &            BC(nshg,ndofBC),
     &            nodflx(numflx),    ilwork(nlwork),
     &            iper(nshg)
c
c.... shape function declarations
c     
        real*8, dimension(maxtop,  maxsh,maxqpt), intent(out) :: shp, shpb
        real*8, dimension(maxtopif,maxsh,maxqpt), intent(out) :: shpif0, shpif1
        real*8, dimension(maxtop,  nsd,maxsh,maxqpt), intent(out) :: shgl, shglb
        real*8, dimension(maxtopif,nsd,maxsh,maxqpt), intent(out) :: shgif0, shgif1
c
c  stuff for dynamic model s.w.avg and wall model
c
        dimension ifath(numnp),    velbar(nfath,nflow), nsons(nfath) 

! Hack to get suction right on part boundaries
!       dimension BC3(numnp,5)

c... Duct
        integer iTurbWall(nshg)
        integer nTopNodes
        integer TopSurface(nshg)

c...

c.... start the timer
c
        
CAD        call timer ('PrProces')

c
c  put a barrier here so that all of the files are done reading
c  This SHOULD shield any mpi_profile information from io bottlenecks
c
        call MPI_BARRIER (MPI_COMM_WORLD,ierr)
c
c... updated, truly useful things for Duct.........
         if(isetInitial_Duct.gt.0)then
            call setInitial_Duct(x)    ! in INIprofile.f
         endif

c
c.... ---------------------------->  Nodes  <--------------------------
c
c.... compute length scales
c
        call xyzbound(x)
c
c.... echo the coordinates
c
        if ((necho .lt. 2).and.(myrank.eq.master)) then
          do n = 1, numnp
            if (mod(n,50) .eq. 1) write (iecho,1000) ititle,(i,i=1,nsd)
            write (iecho,1100) n, (x(n,i),i=1,nsd)
          enddo
        endif
c
c.... prepare periodic boundary conditions
c
c HARDCODED PERIODIC BC
c The following loop was commented 
c until the periodic BC is taken care of for DG_interface...
        do i = 1,nshg
c          if (iper(i) .ne. 0) then
c            nshg0 = nshg0 - 1
c          else
            iper(i) = i
c          endif
        enddo
c
c.... ---------------------->  Interior Elements  <--------------------
c
        ibound = 0
c
c.... generate the interior nodal mapping
c
        call genshp ( shp, shgl, nshape, nelblk)
c
c.... --------------------->  Boundary Conditions  <-------------------
c
c.... read and generate the boundary condition codes (iBC array)
c
        call geniBC (iBC)
c
c.... read and generate the essential boundary conditions (BC array)
c
        call genBC  (iBC,   BC,   point2x,
     &               point2ilwork, point2iper)<commit_msg>adding the hard coding for comp2 BCs in gendat.f<commit_after>        subroutine gendat (y,       ac,       x,      iBC,     BC,
     &                     iper,    ilwork,
     &                     shp,     shgl,    shpb,    shglb,
     &                     shpif0,  shpif1,  shgif0,  shgif1,
     &                     ifath,   velbar,   nsons ) 
c
c----------------------------------------------------------------------
c
c This routine inputs the geometry and the boundary conditions.
c
c
c <NAME>, Winter 1991.  (Fortran 90)
c----------------------------------------------------------------------
c
      
        use readarrays          ! used to acess nBC
        use dtnmod
        use pointer_data
        use wallData            ! give access to wnorm, findWallNOrm
        use genshp_m

        include "common.h"
        include "mpif.h"

c
c arrays in the following line are now dimensioned in readnblk
c        dimension nBC(nshg)
c
        dimension y(nshg,ndof),      ac(nshg,ndof),
     &            x(numnp,nsd),      iBC(nshg),
     &            BC(nshg,ndofBC),
     &            nodflx(numflx),    ilwork(nlwork),
     &            iper(nshg)
c
c.... shape function declarations
c     
        real*8, dimension(maxtop,  maxsh,maxqpt), intent(out) :: shp, shpb
        real*8, dimension(maxtopif,maxsh,maxqpt), intent(out) :: shpif0, shpif1
        real*8, dimension(maxtop,  nsd,maxsh,maxqpt), intent(out) :: shgl, shglb
        real*8, dimension(maxtopif,nsd,maxsh,maxqpt), intent(out) :: shgif0, shgif1
c
c  stuff for dynamic model s.w.avg and wall model
c
        dimension ifath(numnp),    velbar(nfath,nflow), nsons(nfath) 

! Hack to get suction right on part boundaries
!       dimension BC3(numnp,5)

c... Duct
        integer iTurbWall(nshg)
        integer nTopNodes
        integer TopSurface(nshg)

c...

c.... start the timer
c
        
CAD        call timer ('PrProces')

c
c  put a barrier here so that all of the files are done reading
c  This SHOULD shield any mpi_profile information from io bottlenecks
c
        call MPI_BARRIER (MPI_COMM_WORLD,ierr)
c
c... updated, truly useful things for Duct.........
         if(isetInitial_Duct.gt.0)then
            call setInitial_Duct(x)    ! in INIprofile.f
         endif

c
c.... ---------------------------->  Nodes  <--------------------------
c
c.... compute length scales
c
        call xyzbound(x)
c
c.... echo the coordinates
c
        if ((necho .lt. 2).and.(myrank.eq.master)) then
          do n = 1, numnp
            if (mod(n,50) .eq. 1) write (iecho,1000) ititle,(i,i=1,nsd)
            write (iecho,1100) n, (x(n,i),i=1,nsd)
          enddo
        endif
c
c.... prepare periodic boundary conditions
c
c HARDCODED PERIODIC BC
c The following loop was commented 
c until the periodic BC is taken care of for DG_interface...
        do i = 1,nshg
c          if (iper(i) .ne. 0) then
c            nshg0 = nshg0 - 1
c          else
            iper(i) = i
c          endif
        enddo
c
c.... ---------------------->  Interior Elements  <--------------------
c
        ibound = 0
c
c.... generate the interior nodal mapping
c
        call genshp ( shp, shgl, nshape, nelblk)
c
c.... --------------------->  Boundary Conditions  <-------------------
c
c.... read and generate the boundary condition codes (iBC array)
c
        call geniBC (iBC)
c
c.... read and generate the essential boundary conditions (BC array)
c
        call genBC  (iBC,   BC,   point2x,
     &               point2ilwork, point2iper)
c===>hardcoding for solid test1 to hack the comp2 BC on surrounding surfaces<==
        do i = 1,nshg
         if  ( (abs(x(i,2)) .lt. 0.000001)  .or.
     &       (abs(x(i,2)-0.2) .lt. 0.000001) .or.
     &       (abs(x(i,3)) .lt. 0.000001)  .or. 
     &       (abs(x(i,3)-0.2) .lt. 0.000001) ) then
 
                ! iBC(i) = 50
                 iBC(i) = IBSET(iBC(i),4)
                 iBC(i) = IBSET(iBC(i),5)
                 BC(i,4:5) = 0.0
         endif
        enddo
c
c===>end of hardcoding for solid test1<==
{'fraction_non_alphanumeric': 0.16875499866702212, 'fraction_numerical': 0.018528392428685685, 'mean_word_length': 1.4495592556317336, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3481522', 'n_tokens_mistral': 2564, 'n_tokens_neox': 2419, 'n_words': 760}