<commit_before>!----------------------------------------------------------------------------- best with 100 columns

program tests
  call testReadGMSH()
end program

subroutine testReadGMSH()
  use moduleBasicDataStruct
  use moduleSimpleSetLogic
  use moduleFileIO
  use moduleGrid
  use moduleFVMGrad
  use moduleFVMDiffus
  use moduleFVMConvect
  use moduleInterpolation
  type(typeGrid)::grid
  double precision,allocatable::v(:),tempv(:),vv(:,:),u(:,:)
  double precision t
  
  open(12,file='bin/gridGMSH4.msh',status='old')
  call readGMSH(12,grid)
  close(12)
  call grid%updateIntf()
  allocate(v(grid%nBlock))
  allocate(tempv(grid%nBlock))
  allocate(vv(DIMS,grid%nBlock))
  call grid%updateBlockPos()
  do i=1,grid%nBlock
    v(i)=merge(100d0,100d0,grid%BlockPos(1,i)<0.5d0)
  end do
  allocate(u(DIMS,grid%nIntf))
  !do i=1,grid%nIntf
  !  u(:,i)=[1d0,0d0,0d0]
  !end do
  t=0d0
  open(13,file='rst.msh',status='replace')
  call writeGMSH(13,grid)
  call writeGMSH(13,v,grid,BIND_BLOCK,'name1',0,t)
  call grid%updateBlockVol()
  do i=1,10000
    vv=findGrad(v,grid,BIND_BLOCK)
    tempv=v+2d-5*findDiffus(v,grid,vv)/grid%BlockVol(:)
    do j=1,801,100
      tempv(j)=tempv(j)-2d0*v(j)/1d-4*2d-5
    end do
    do j=100,900,100
      tempv(j)=tempv(j)-(v(j)+dot_product(vv(:,j),[1d-2,0d0,0d0]))/1d-2*2d-5
    end do
    v(:)=tempv(:)
    t=t+2d-5
    if(mod(i,100)==0)then
      call writeGMSH(13,v,grid,BIND_BLOCK,'name1',i,t)
      write(*,*),i
    end if
  end do
  close(13)
end subroutine<commit_msg>+ validated convection<commit_after>!----------------------------------------------------------------------------- best with 100 columns

program tests
  call testReadGMSH()
end program

subroutine testReadGMSH()
  use moduleBasicDataStruct
  use moduleSimpleSetLogic
  use moduleFileIO
  use moduleGrid
  use moduleFVMGrad
  use moduleFVMDiffus
  use moduleFVMConvect
  use moduleInterpolation
  type(typeGrid)::grid
  double precision,allocatable::v(:),tempv(:),vv(:,:),u(:,:)
  double precision t
  
  open(12,file='bin/gridGMSH4.msh',status='old')
  call readGMSH(12,grid)
  close(12)
  call grid%updateIntf()
  allocate(v(grid%nBlock))
  allocate(tempv(grid%nBlock))
  allocate(vv(DIMS,grid%nBlock))
  call grid%updateBlockPos()
  do i=1,grid%nBlock
    v(i)=merge(100d0,000d0,grid%BlockPos(1,i)<0.1d0)
  end do
  allocate(u(DIMS,grid%nIntf))
  do i=1,grid%nIntf
    u(:,i)=[1d0,0d0,0d0]
  end do
  t=0d0
  open(13,file='rst.msh',status='replace')
  call writeGMSH(13,grid)
  call writeGMSH(13,v,grid,BIND_BLOCK,'name1',0,t)
  call grid%updateBlockVol()
  do i=1,100
    vv=findGrad(v,grid,BIND_BLOCK)
    tempv=v+5d-3*findConvect(v,u,BIND_INTF,grid,vv,limiter=minmod)/grid%BlockVol(:)
    do j=1,801,100
      tempv(j)=100d0
    end do
    do j=100,900,100
      tempv(j)=tempv(j)
    end do
    v(:)=tempv(:)
    t=t+5d-3
    if(mod(i,1)==0)then
      call writeGMSH(13,v,grid,BIND_BLOCK,'name1',i,t)
    end if
  end do
  close(13)
end subroutine
{'fraction_non_alphanumeric': 0.20053835800807537, 'fraction_numerical': 0.05585464333781965, 'mean_word_length': 3.638065522620905, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '6391814', 'n_tokens_mistral': 1320, 'n_tokens_neox': 1252, 'n_words': 184}