read_nume.f90

### TABLE OF CONTENTS

- 1. UTI/PRE/read_nume

## UTI/PRE/read_nume [ Modules ]

[ Top ] [ Modules ]

NOM

     read_nume(calc)

DESCRIPTION

     Lecture du Bloc NUME du fichier de donnees *.inp
     Reading the NUME block from the *.inp data file

        ENTREES / INPUT
        calc  objet calcul initial / initial calcul object

        SORTIES / OUTPUT
        calc  objet calcul / calcul object

SOURCE

    ! Ce logiciel est regi par la licence [CeCILL-B]
    ! This software is governed by the [CeCILL-B] license
    !=========================== DEBUT DES DECLARATIONS ====================
    !.1-----  Implicit, Use
      use num
      IMPLICIT NONE
    !.2-----  Declaration
      type(calcul), intent(inout)  :: calc !! Objet calcul / Calcul object

      character(4)                 :: para
      integer                      :: isondes
      real(kind=kind(0.d0))        :: x,y,z,arg,t
    !=========================== DEBUT DU CODE EXECUTABLE ==================
      write(*,*)
      write(*,*)achar(27)//'[34m================================================'
      write(*,*)'Reading numerical parameters: block NUME'
      write(*,*)'================================================'//achar(27)//'[0m'
      write(*,*)

      calc%cfl = 0.9d0
      calc%ityp_flux=1
      calc%isauv=1
      calc%iordre_t=1
      calc%iordre_e=1
      calc%imeth_int_temps=1
      calc%ilimiteur=0
      calc%ipas=0
      calc%nb_sondes=0
    499 read(33,'(a4,f20.0)',err=500,end=500)para,arg

      SELECT CASE (para)
          CASE('TINT')
              calc%tmax=arg
              write(*,*)'NUME-Info  Time interval                    :',calc%tmax
          CASE('CCFL')
              calc%cfl=arg
              write(*,*)'NUME-Info  New cfl  value                   :',calc%cfl
       !~   CASE('FLUX')
       !~       calc%ityp_flux=idint(arg)
       !~       write(*,*)'NUME-Info  New kind of numerical flux       :',calc%ityp_flux
          CASE('TDOR')
              calc%iordre_t=idint(arg)
              write(*,*)'NUME-Info  Time discretization order        :',calc%iordre_t
          CASE('SDOR')
              calc%iordre_e=idint(arg)
              write(*,*)'NUME-Info  Space discretization order       :',calc%iordre_e
          CASE('TIME')
              calc%imeth_int_temps=idint(arg)
              write(*,*)'NUME-Info  Time integration method          :',calc%imeth_int_temps
          CASE('LIMI')
              calc%ilimiteur=idint(arg)
              write(*,*)'NUME-Info  kind of limiter                  :',calc%ilimiteur
          CASE('SAVE')
              calc%isauv=idint(arg)
              write(*,*)'NUME-Info  kind of backup                   :',calc%isauv
          CASE('NPRO')
              calc%nb_sondes=int(arg)
              IF (calc%nb_sondes.ne.0) THEN
                  write(*,*)'SOND-Info  number of probe              :',calc%nb_sondes
                  DO isondes=1,calc%nb_sondes
                      read(33,*)x,y,z
                      calc%point_sondes(isondes)%x=x
                      calc%point_sondes(isondes)%y=y
                      calc%point_sondes(isondes)%z=z
                      write( *,1011)isondes,calc%point_sondes(isondes)
    1011 format('SOND-Info  Probe coordinates number',i4,':', 3e13.5)
                  END DO
              END IF

          CASE default
              GOTO 500
      END SELECT
      GOTO 499
    500 continue
      t=calc%tmax
      calc%tmax=calc%tmin
      calc%tmin=-t
    !===========================   FIN DE LA ROUTINE    ====================
    END SUBROUTINE read_nume