subroutine rb_1d_dim ( iunit, idim, ierror ) ! !******************************************************************************* ! !! RB_1D_DIM reads a binary 1D file for the dimension. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM, the number of nodes in the X direction. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer idim integer ierror integer ios integer iunit ! ierror = 0 read ( iunit, iostat = ios ) idim if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_1D_DIM - Error!' write ( *, * ) ' An end-of-file condition occurred.' return end if return end subroutine rb_1d_dimn ( iunit, idim, nvar, ierror ) ! !******************************************************************************* ! !! RB_1D_DIMN reads a binary 1D file for the dimension and NVAR. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM, the number of nodes in the X direction. ! ! Output, integer NVAR, the number of F variables defined. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer idim integer ierror integer ios integer iunit integer nvar ! ierror = 0 read ( iunit, iostat = ios ) idim, nvar if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_1D_DIMN - Error!' write ( *, * ) ' An end-of-file condition occurred.' return end if return end subroutine rb_1d_f ( iunit, idim, nvar, f, ierror ) ! !******************************************************************************* ! !! RB_1D_F reads a binary 1D file for the F data. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Input, integer IDIM, the number of nodes in the X direction. ! ! Input, integer NVAR, the number of F variables defined. ! ! Output, real F(IDIM,NVAR), the F data. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer idim integer nvar ! real f(idim,nvar) integer i integer ierror integer ios integer iunit integer l ! ierror = 0 read ( iunit, iostat = ios ) (( f(i,l), i = 1, idim ), l = 1, nvar ) if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_1D_F - Error!' write ( *, * ) ' An end-of-file condition occurred.' return end if return end subroutine rb_1d_ffile ( iunit, idim, nvar, f, ierror ) ! !******************************************************************************* ! !! RB_1D_FFILE reads a binary 1D F file. ! ! ! Modified: ! ! 13 November 1998 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM, the number of nodes in the X direction. ! ! Output, integer NVAR, the number of F variables defined. ! ! Output, real F(IDIM,NVAR), the F data. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! 1, an error occurred while reading the dimensions. ! 2, an error occurred while reading the data. ! implicit none ! integer idim integer nvar ! real f(idim,nvar) integer ierror integer iunit ! ierror = 0 call rb_1d_dimn ( iunit, idim, nvar, ierror ) if ( ierror /= 0 ) then ierror = 1 return end if call rb_1d_f ( iunit, idim, nvar, f, ierror ) if ( ierror /= 0 ) then ierror = 2 return end if return end subroutine rb_1d_q ( iunit, idim, q, ierror ) ! !******************************************************************************* ! !! RB_1D_Q reads a binary 1D Q file for the Q data. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Input, integer IDIM, the number of nodes in the X direction. ! ! Output, real Q(IDIM,3), the Q data, density, X momentum, and ! stagnation energy per unit volume. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzer, a read error occurred. ! implicit none ! integer idim ! integer i integer ierror integer ios integer iunit integer l real q(idim,3) ! ierror = 0 read ( iunit, iostat = ios ) (( q(i,l), i = 1, idim ), l = 1, 3 ) if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_1D_Q - Error!' write ( *, * ) ' An end-of-file condition occurred.' return end if return end subroutine rb_1d_qfile ( iunit, idim, alpha, fsmach, re, time, q, ierror ) ! !******************************************************************************* ! !! RB_1D_QFILE reads a binary 1D Q file. ! ! ! Modified: ! ! 13 November 1998 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM, the number of nodes in the X direction. ! ! Output, real ALPHA, the angle of attack, in degrees. ! ! Output, real FSMACH, the free stream Mach number. ! ! Output, real RE, the Reynolds number for the flow. ! ! Output, real TIME, the time associated with the data. ! ! Output, real Q(IDIM,3), the Q data, density, X momentum, and ! stagnation energy per unit volume. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! 1, an error occurred while reading the dimensions. ! 2, an error occurred while reading the parameters. ! 3, an error occurred while reading the data. ! implicit none ! integer idim ! real alpha real fsmach integer ierror integer iunit real q(idim,3) real re real time ! ierror = 0 call rb_1d_dim ( iunit, idim, ierror ) if ( ierror /= 0 ) then ierror = 1 return end if call rb_param ( iunit, fsmach, alpha, re, time, ierror ) if ( ierror /= 0 ) then ierror = 2 return end if call rb_1d_q ( iunit, idim, q, ierror ) if ( ierror /= 0 ) then ierror = 3 return end if return end subroutine rb_1d_x ( iunit, idim, x, ierror ) ! !******************************************************************************* ! !! RB_1D_X reads a binary 1D X file for the X data. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Input, integer IDIM, the number of nodes in the X direction. ! ! Output, real X(IDIM), the X coordinates of the nodes. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer idim ! integer ierror integer ios integer iunit real x(idim) ! ierror = 0 read ( iunit, iostat = ios ) x(1:idim) if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_1D_XY - Error!' write ( *, * ) ' An end-of-file condition occurred.' return end if return end subroutine rb_1d_xfile ( iunit, idim, x, ierror ) ! !******************************************************************************* ! !! RB_1D_XYFILE reads a binary 1D X file. ! ! ! Modified: ! ! 13 November 1998 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM, the number of nodes in the X direction. ! ! Output, real X(IDIM), the X coordinates of the nodes. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! 1, an error occurred while reading the dimensions. ! 2, an error occurred while reading the data. ! implicit none ! integer idim ! integer ierror integer iunit real x(idim) ! ierror = 0 call rb_1d_dim ( iunit, idim, ierror ) if ( ierror /= 0 ) then ierror = 1 return end if call rb_1d_x ( iunit, idim, x, ierror ) if ( ierror /= 0 ) then ierror = 2 return end if return end subroutine rb_2d_dim ( iunit, idim, jdim, ierror ) ! !******************************************************************************* ! !! RB_2D_DIM reads a binary 2D file for the dimensions. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM, JDIM, the number of nodes in the ! X and Y directions. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer idim integer ierror integer ios integer iunit integer jdim ! ierror = 0 read ( iunit, iostat = ios ) idim, jdim if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_2D_DIM - Error!' write ( *, * ) ' An end-of-file condition occurred.' return end if return end subroutine rb_2d_dimn ( iunit, idim, jdim, nvar, ierror ) ! !******************************************************************************* ! !! RB_2D_DIMN reads a binary 2D file for the dimensions and NVAR. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM, JDIM, the number of nodes in the ! X and Y directions. ! ! Output, integer NVAR, the number of F variables defined. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer idim integer ierror integer ios integer iunit integer jdim integer nvar ! ierror = 0 read ( iunit, iostat = ios ) idim, jdim, nvar if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_2D_DIMN - Error!' write ( *, * ) ' An end-of-file condition occurred.' return end if return end subroutine rb_2d_f ( iunit, idim, jdim, nvar, f, ierror ) ! !******************************************************************************* ! !! RB_2D_F reads a binary 2D F file for the F data. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Input, integer IDIM, JDIM, the number of nodes in the ! X and Y directions. ! ! Input, integer NVAR, the number of F variables defined. ! ! Output, real F(IDIM,JDIM,NVAR), the F data. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer idim integer jdim integer nvar ! real f(idim,jdim,nvar) integer i integer ierror integer ios integer iunit integer j integer l ! ierror = 0 read ( iunit, iostat = ios ) ((( f(i,j,l), i = 1, idim ), j = 1, jdim ), & l = 1, nvar ) if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_2D_F - Error!' write ( *, * ) ' An end-of-file condition occurred.' return end if return end subroutine rb_2d_ffile ( iunit, idim, jdim, nvar, f, ierror ) ! !******************************************************************************* ! !! RB_2D_FFILE reads a binary 2D F file. ! ! ! Modified: ! ! 13 November 1998 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM, JDIM, the number of nodes in the ! X and Y directions. ! ! Output, integer NVAR, the number of F variables defined. ! ! Output, real F(IDIM,JDIM,NVAR), the F data. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! 1, an error occurred while reading the dimensions. ! 2, an error occurred while reading the data. ! implicit none ! integer idim integer jdim integer nvar ! real f(idim,jdim,nvar) integer ierror integer iunit ! ierror = 0 call rb_2d_dimn ( iunit, idim, jdim, nvar, ierror ) if ( ierror /= 0 ) then ierror = 1 return end if call rb_2d_f ( iunit, idim, jdim, nvar, f, ierror ) if ( ierror /= 0 ) then ierror = 2 return end if return end subroutine rb_2d_q ( iunit, idim, jdim, q, ierror ) ! !******************************************************************************* ! !! RB_2D_Q reads a binary 2D Q file for the Q data. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Input, integer IDIM, JDIM, the number of nodes in the ! X and Y directions. ! ! Output, real Q(IDIM,JDIM,4), the Q data, density, X and Y momentum, ! and stagnation energy per unit volume. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer idim integer jdim ! integer i integer ierror integer ios integer iunit integer j integer l real q(idim,jdim,4) ! ierror = 0 read ( iunit, iostat = ios ) ((( q(i,j,l), i = 1, idim ), j = 1, jdim ), & l = 1, 4 ) if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_2D_Q - Error!' write ( *, * ) ' An end-of-file condition occurred.' return end if return end subroutine rb_2d_qfile ( iunit, idim, jdim, alpha, fsmach, re, time, q, ierror ) ! !******************************************************************************* ! !! RB_2D_QFILE reads a binary 2D Q file. ! ! ! Modified: ! ! 13 November 1998 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM, JDIM, the number of nodes in the ! X and Y directions. ! ! Output, real ALPHA, the angle of attack, in degrees. ! ! Output, real FSMACH, the free stream Mach number. ! ! Output, real RE, the Reynolds number for the flow. ! ! Output, real TIME, the time associated with the data. ! ! Output, real Q(IDIM,JDIM,4), the Q data, density, X and Y momentum, ! and stagnation energy per unit volume. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! 1, an error occurred while reading the dimensions. ! 2, an error occurred while reading the parameters. ! 3, an error occurred while reading the data. ! implicit none ! integer idim integer jdim ! real alpha real fsmach integer ierror integer iunit real q(idim,jdim,4) real re real time ! ierror = 0 call rb_2d_dim ( iunit, idim, jdim, ierror ) if ( ierror /= 0 ) then ierror = 1 return end if call rb_param ( iunit, fsmach, alpha, re, time, ierror ) if ( ierror /= 0 ) then ierror = 2 return end if call rb_2d_q ( iunit, idim, jdim, q, ierror ) if ( ierror /= 0 ) then ierror = 3 return end if return end subroutine rb_2d_xy ( iunit, idim, jdim, x, y, ierror ) ! !******************************************************************************* ! !! RB_2D_XY reads a binary 2D XY file for the XY data. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Input, integer IDIM, JDIM, the number of nodes in the ! X and Y directions. ! ! Output, real X(IDIM,JDIM), Y(IDIM,JDIM), the X and Y coordinates ! of the nodes. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer idim integer jdim ! integer i integer ierror integer ios integer iunit integer j real x(idim,jdim) real y(idim,jdim) ! ierror = 0 read ( iunit, iostat = ios ) (( x(i,j), i = 1, idim ), j = 1, jdim ), & (( y(i,j), i = 1, idim ), j = 1, jdim ) if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_2D_XY - Error!' write ( *, * ) ' An end-of-file condition occurred.' return end if return end subroutine rb_2d_xyfile ( iunit, idim, jdim, x, y, ierror ) ! !******************************************************************************* ! !! RB_2D_XYFILE reads a binary 2D XY file. ! ! ! Modified: ! ! 13 November 1998 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM, JDIM, the number of nodes in the ! X and Y directions. ! ! Output, real X(IDIM,JDIM), Y(IDIM,JDIM), the X and Y coordinates ! of the nodes. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! 1, an error occurred while reading the dimensions. ! 2, an error occurred while reading the data. ! implicit none ! integer idim integer jdim ! integer ierror integer iunit real x(idim,jdim) real y(idim,jdim) ! ierror = 0 call rb_2d_dim ( iunit, idim, jdim, ierror ) if ( ierror /= 0 ) then ierror = 1 return end if call rb_2d_xy ( iunit, idim, jdim, x, y, ierror ) if ( ierror /= 0 ) then ierror = 2 return end if return end subroutine rb_3d_dim ( iunit, idim, jdim, kdim, ierror ) ! !******************************************************************************* ! !! RB_3D_DIM reads a binary 3D file for the dimensions. ! ! ! Modified: ! ! 29 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM, JDIM, KDIM, the number of nodes in the ! X, Y, and Z directions. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer idim integer ierror integer ios integer iunit integer jdim integer kdim ! ierror = 0 read ( iunit, iostat = ios ) idim, jdim, kdim if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_3D_DIM - Error!' write ( *, * ) ' A read error occurred.' return end if return end subroutine rb_3d_dimn ( iunit, idim, jdim, kdim, nvar, ierror ) ! !******************************************************************************* ! !! RB_3D_DIMN reads a binary 3D file the dimensions and NVAR. ! ! ! Modified: ! ! 13 November 1998 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM, JDIM, KDIM, the number of nodes in the ! X, Y, and Z directions. ! ! Output, integer NVAR, the number of F variables defined. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer idim integer ierror integer ios integer iunit integer jdim integer kdim integer nvar ! ierror = 0 read ( iunit, iostat = ios ) idim, jdim, kdim, nvar if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_3D_DIMN - Error!' write ( *, * ) ' An end-of-file condition occurred.' return end if return end subroutine rb_3d_f ( iunit, idim, jdim, kdim, nvar, f, ierror ) ! !******************************************************************************* ! !! RB_3D_F reads a binary 3D F file for the F data. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Input, integer IDIM, JDIM, KDIM, the number of nodes in the ! X, Y, and Z directions. ! ! Input, integer NVAR, the number of F variables defined. ! ! Output, real F(IDIM,JDIM,KDIM,NVAR), the F data. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! 1, an error occurred while reading the data. ! implicit none ! integer idim integer jdim integer kdim integer nvar ! real f(idim,jdim,kdim,nvar) integer i integer ierror integer ios integer iunit integer j integer k integer l ! ierror = 0 read ( iunit, iostat = ios ) (((( f(i,j,k,l), i = 1, idim ), & j = 1, jdim ), k = 1, kdim ), l = 1, nvar ) if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_3D_F - Error!' write ( *, * ) ' An end-of-file condition occurred.' return end if return end subroutine rb_3d_ffile ( iunit, idim, jdim, kdim, nvar, f, ierror ) ! !******************************************************************************* ! !! RB_3D_FFILE reads a binary 3D F file. ! ! ! Modified: ! ! 13 November 1998 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM, JDIM, KDIM, the number of nodes in the ! X, Y, and Z directions. ! ! Output, integer NVAR, the number of F variables defined. ! ! Output, real F(IDIM,JDIM,KDIM,NVAR), the F data. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! 1, an error occurred while reading the dimensions. ! 2, an error occurred while reading the data. ! implicit none ! integer idim integer jdim integer kdim integer nvar ! real f(idim,jdim,kdim,nvar) integer ierror integer iunit ! ierror = 0 call rb_3d_dimn ( iunit, idim, jdim, kdim, nvar, ierror ) if ( ierror /= 0 ) then ierror = 1 return end if call rb_3d_f ( iunit, idim, jdim, kdim, nvar, f, ierror ) if ( ierror /= 0 ) then ierror = 2 return end if return end subroutine rb_3d_q ( iunit, idim, jdim, kdim, q, ierror ) ! !******************************************************************************* ! !! RB_3D_Q reads a binary 3D Q file for the Q data. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Input, integer IDIM, JDIM, KDIM, the number of nodes in the ! X, Y, and Z directions. ! ! Output, real Q(IDIM,JDIM,KDIM,5), the Q data, density, X, Y and Z ! momentum, and stagnation energy per unit volume. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer idim integer jdim integer kdim ! integer i integer ierror integer ios integer iunit integer j integer k integer l real q(idim,jdim,kdim,5) ! ierror = 0 read ( iunit, iostat = ios ) (((( q(i,j,k,l), i = 1, idim ), & j = 1, jdim ), k = 1, kdim ), l = 1, 5 ) if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_3D_Q - Error!' write ( *, * ) ' An end-of-file condition occurred.' return end if return end subroutine rb_3d_qfile ( iunit, idim, jdim, kdim, alpha, fsmach, re, time, & q, ierror ) ! !******************************************************************************* ! !! RB_3D_QFILE reads a binary 3D Q file. ! ! ! Modified: ! ! 13 November 1998 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM, JDIM, KDIM, the number of nodes in the ! X, Y, and Z directions. ! ! Output, real ALPHA, the angle of attack, in degrees. ! ! Output, real FSMACH, the free stream Mach number. ! ! Output, real RE, the Reynolds number for the flow. ! ! Output, real TIME, the time associated with the data. ! ! Output, real Q(IDIM,JDIM,KDIM,5), the Q data, density, X, Y and Z ! momentum, and stagnation energy per unit volume. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! 1, an error occurred while reading the dimensions. ! 2, an error occurred while reading the parameters. ! 3, an error occurred while reading the data. ! implicit none ! integer idim integer jdim integer kdim ! real alpha real fsmach integer ierror integer iunit real q(idim,jdim,kdim,5) real re real time ! ierror = 0 call rb_3d_dim ( iunit, idim, jdim, kdim, ierror ) if ( ierror /= 0 ) then ierror = 1 return end if call rb_param ( iunit, fsmach, alpha, re, time, ierror ) if ( ierror /= 0 ) then ierror = 2 return end if call rb_3d_q ( iunit, idim, jdim, kdim, q, ierror ) if ( ierror /= 0 ) then ierror = 3 return end if return end subroutine rb_3d_xyz ( iunit, idim, jdim, kdim, x, y, z, ierror ) ! !******************************************************************************* ! !! RB_3D_XYZ reads a binary 3D XYZ file for the XYZ data. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Input, integer IDIM, JDIM, KDIM, the number of nodes in the ! X, Y, and Z directions. ! ! Output, real X(IDIM,JDIM,KDIM), Y(IDIM,JDIM,KDIM), Z(IDIM,JDIM,KDIM), ! the X, Y and Z coordinates of the nodes. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer idim integer jdim integer kdim ! integer i integer ierror integer ios integer iunit integer j integer k real x(idim,jdim,kdim) real y(idim,jdim,kdim) real z(idim,jdim,kdim) ! ierror = 0 read ( iunit, iostat = ios ) & ((( x(i,j,k), i = 1, idim ), j = 1, jdim ), k = 1, kdim ), & ((( y(i,j,k), i = 1, idim ), j = 1, jdim ), k = 1, kdim ), & ((( z(i,j,k), i = 1, idim ), j = 1, jdim ), k = 1, kdim ) if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_3D_XYZ - Error!' write ( *, * ) ' An end-of-file condition occurred.' return end if return end subroutine rb_3d_xyzb ( iunit, idim, jdim, kdim, x, y, z, b, ierror ) ! !******************************************************************************* ! !! RB_3D_XYZB reads a binary 3D XYZB file for the XYZB data. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Input, integer IDIM, JDIM, KDIM, the number of nodes in the ! X, Y, and Z directions. ! ! Output, real X(IDIM,JDIM,KDIM), Y(IDIM,JDIM,KDIM), Z(IDIM,JDIM,KDIM), ! the X, Y and Z coordinates of the nodes. ! ! Output, integer B(IDIM,JDIM,KDIM), the blanking information. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer idim integer jdim integer kdim ! integer b(idim,jdim,kdim) integer i integer ierror integer ios integer iunit integer j integer k real x(idim,jdim,kdim) real y(idim,jdim,kdim) real z(idim,jdim,kdim) ! ierror = 0 read ( iunit, iostat = ios ) & ((( x(i,j,k), i = 1, idim ), j = 1, jdim ), k = 1, kdim ), & ((( y(i,j,k), i = 1, idim ), j = 1, jdim ), k = 1, kdim ), & ((( z(i,j,k), i = 1, idim ), j = 1, jdim ), k = 1, kdim ), & ((( b(i,j,k), i = 1, idim ), j = 1, jdim ), k = 1, kdim ) return if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_3D_XYZB - Error!' write ( *, * ) ' An end-of-file condition occurred.' return end if return end subroutine rb_3d_xyzbfile ( iunit, idim, jdim, kdim, x, y, z, b, ierror ) ! !******************************************************************************* ! !! RB_3D_XYZBFILE reads a binary 3D XYZB file. ! ! ! Modified: ! ! 13 November 1998 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM, JDIM, KDIM, the number of nodes in the ! X, Y, and Z directions. ! ! Output, real X(IDIM,JDIM,KDIM), Y(IDIM,JDIM,KDIM), Z(IDIM,JDIM,KDIM), ! the X, Y and Z coordinates of the nodes. ! ! Output, integer B(IDIM,JDIM,KDIM), the blanking information. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! 1, an error occurred while reading the dimensions. ! 2, an error occurred while reading the data. ! implicit none ! integer idim integer jdim integer kdim ! integer b(idim,jdim,kdim) integer ierror integer iunit real x(idim,jdim,kdim) real y(idim,jdim,kdim) real z(idim,jdim,kdim) ! ierror = 0 call rb_3d_dim ( iunit, idim, jdim, kdim, ierror ) if ( ierror /= 0 ) then ierror = 1 return end if call rb_3d_xyzb ( iunit, idim, jdim, kdim, x, y, z, b, ierror ) if ( ierror /= 0 ) then ierror = 2 return end if return end subroutine rb_3d_xyzfile ( iunit, idim, jdim, kdim, x, y, z, ierror ) ! !******************************************************************************* ! !! RB_3D_XYZFILE reads a binary 3D XYZ file. ! ! ! Modified: ! ! 13 November 1998 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM, JDIM, KDIM, the number of nodes in the ! X, Y, and Z directions. ! ! Output, real X(IDIM,JDIM,KDIM), Y(IDIM,JDIM,KDIM), Z(IDIM,JDIM,KDIM), ! the X, Y and Z coordinates of the nodes. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! 1, an error occurred while reading the dimensions. ! 2, an error occurred while reading the data. ! implicit none ! integer idim integer jdim integer kdim ! integer ierror integer iunit real x(idim,jdim,kdim) real y(idim,jdim,kdim) real z(idim,jdim,kdim) ! ierror = 0 call rb_3d_dim ( iunit, idim, jdim, kdim, ierror ) if ( ierror /= 0 ) then ierror = 1 return end if call rb_3d_xyz ( iunit, idim, jdim, kdim, x, y, z, ierror ) if ( ierror /= 0 ) then ierror = 2 return end if return end subroutine rb_3dm_dim ( iunit, idim, jdim, kdim, maxgrid, ngrid, ierror ) ! !******************************************************************************* ! !! RB_3DM_DIM reads a binary 3D multiple grid file for the dimensions. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM(MAXGRID), JDIM(MAXGRID), KDIM(MAXGRID), the number ! of nodes in the X, Y, and Z directions for each grid. ! ! Input, integer MAXGRID, the maximum value of NGRID. ! ! Input, integer NGRID, the number of grids. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer maxgrid ! integer idim(maxgrid) integer ierror integer igrid integer ios integer iunit integer jdim(maxgrid) integer kdim(maxgrid) integer ngrid ! ierror = 0 read ( iunit, iostat = ios ) ( idim(igrid), jdim(igrid), & kdim(igrid), igrid = 1, ngrid ) if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_3DM_DIM - Error!' write ( *, * ) ' A read error occurred.' return end if return end subroutine rb_3dm_ngrid ( iunit, ngrid, ierror ) ! !******************************************************************************* ! !! RB_3DM_NGRID reads a binary 3D multiple grid file for the number of grids. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer NGRID, the number of grids. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer ierror integer ios integer iunit integer ngrid ! ierror = 0 read ( iunit, iostat = ios ) ngrid if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_3DM_DIM - Error!' write ( *, * ) ' A read error occurred.' return end if return end subroutine rb_3dm_q ( iunit, idim, jdim, kdim, maxi, maxj, maxk, maxgrid, & ngrid, fsmach, alpha, re, time, q, ierror ) ! !******************************************************************************* ! !! RB_3DM_Q reads a binary 3D multiple grid Q file for the parameters and Q data. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Input, integer IDIM(MAXGRID), JDIM(MAXGRID), KDIM(MAXGRID), the number of ! nodes in the X, Y, and Z directions in each grid. ! ! Input, integer MAXI, MAXJ, MAXK, the maximum dimension for the first three ! components of Q. ! ! Input, integer MAXGRID, the maximum value of NGRID. ! ! Input, integer NGRID, the number of grids. ! ! Output, real FSMACH(MAXGRID), ALPHA(MAXGRID), RE(MAXGRID), TIME(MAXGRID), ! the values of the free stream Mach number, the angle of attack, in degrees, ! the Reynolds number for the flow, and the time, for each grid. ! ! Output, real Q(MAXI,MAXJ,MAXK,5,MAXGRID), ! the Q values of the nodes for each grid. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer maxgrid integer maxi integer maxj integer maxk ! real alpha(maxgrid) real fsmach(maxgrid) integer i integer idim(maxgrid) integer ierror integer igrid integer ios integer iunit integer j integer jdim(maxgrid) integer k integer kdim(maxgrid) integer l integer ngrid real q(maxi,maxj,maxk,5,maxgrid) real re(maxgrid) real time(maxgrid) ! ierror = 0 do igrid = 1, ngrid read ( iunit, iostat = ios ) fsmach(igrid), alpha(igrid), re(igrid), & time(igrid) if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_3DM_Q - Fatal error!' write ( *, * ) ' A read error occurred.' return end if read ( iunit, iostat = ios ) (((( q(i,j,k,l,igrid), i = 1, idim(igrid) ), & j = 1, jdim(igrid) ), k = 1, kdim(igrid) ), l = 1, 5 ) if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_3DM_Q - Fatal error!' write ( *, * ) ' A read error occurred.' return end if end do return end subroutine rb_3dm_xyz ( iunit, idim, jdim, kdim, maxi, maxj, maxk, maxgrid, & ngrid, x, y, z, ierror ) ! !******************************************************************************* ! !! RB_3DM_XYZ reads a binary 3D multiple grid XYZ file for the XYZ data. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Input, integer IDIM(MAXGRID), JDIM(MAXGRID), KDIM(MAXGRID), the number of ! nodes in the X, Y, and Z directions in each grid. ! ! Input, integer MAXI, MAXJ, MAXK, the maximum dimension for the first three ! components of X, Y and Z. ! ! Input, integer MAXGRID, the maximum value of NGRID. ! ! Input, integer NGRID, the number of grids. ! ! Output, real X(MAXI,MAXJ,MAXK,MAXGRID), ! Y(MAXI,MAXJ,MAXK,MAXGRID), ! Z(MAXI,MAXJ,MAXK,MAXGRID), the X, Y and Z coordinates of the nodes ! for each grid. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer maxgrid integer maxi integer maxj integer maxk ! integer i integer idim(maxgrid) integer ierror integer igrid integer ios integer iunit integer j integer jdim(maxgrid) integer k integer kdim(maxgrid) integer ngrid real x(maxi,maxj,maxk,maxgrid) real y(maxi,maxj,maxk,maxgrid) real z(maxi,maxj,maxk,maxgrid) ! ierror = 0 do igrid = 1, ngrid read ( iunit, iostat = ios ) ((( x(i,j,k,igrid), i = 1, idim(igrid) ), & j = 1, jdim(igrid) ), k = 1, kdim(igrid) ), & ((( y(i,j,k,igrid), i = 1, idim(igrid) ), & j = 1, jdim(igrid) ), k = 1, kdim(igrid) ), & ((( z(i,j,k,igrid), i = 1, idim(igrid) ), & j = 1, jdim(igrid) ), k = 1, kdim(igrid) ) if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_3DM_XYZ - Fatal error!' write ( *, * ) ' A read error occurred.' return end if end do return end subroutine rb_3dm_xyzb ( iunit, idim, jdim, kdim, maxi, maxj, maxk, maxgrid, & ngrid, x, y, z, b, ierror ) ! !******************************************************************************* ! !! RB_3DM_XYZB reads a binary 3D multiple grid XYZB file for the XYZB data. ! ! ! Modified: ! ! 02 December 1998 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Input, integer IDIM(MAXGRID), JDIM(MAXGRID), KDIM(MAXGRID), the number of ! nodes in the X, Y, and Z directions in each grid. ! ! Input, integer MAXI, MAXJ, MAXK, the maximum dimension for the first three ! components of X, Y and Z. ! ! Input, integer MAXGRID, the maximum value of NGRID. ! ! Input, integer NGRID, the number of grids. ! ! Output, real X(MAXI,MAXJ,MAXK,MAXGRID), ! Y(MAXI,MAXJ,MAXK,MAXGRID), ! Z(MAXI,MAXJ,MAXK,MAXGRID), the X, Y and Z coordinates of the nodes ! for each grid. ! ! Output, integer B(MAXI,MAXJ,MAXK,MAXGRID), the blanking information. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! 1, an error occurred while reading the data. ! implicit none ! integer maxgrid integer maxi integer maxj integer maxk ! integer b(maxi,maxj,maxk,maxgrid) integer i integer idim(maxgrid) integer ierror integer igrid integer ios integer iunit integer j integer jdim(maxgrid) integer k integer kdim(maxgrid) integer ngrid real x(maxi,maxj,maxk,maxgrid) real y(maxi,maxj,maxk,maxgrid) real z(maxi,maxj,maxk,maxgrid) ! ierror = 0 do igrid = 1, ngrid read ( iunit, iostat = ios ) ((( x(i,j,k,igrid), i = 1, idim(igrid) ), & j = 1, jdim(igrid) ), k = 1, kdim(igrid) ), & ((( y(i,j,k,igrid), i = 1, idim(igrid) ), & j = 1, jdim(igrid) ), k = 1, kdim(igrid) ), & ((( z(i,j,k,igrid), i = 1, idim(igrid) ), & j = 1, jdim(igrid) ), k = 1, kdim(igrid) ), & ((( b(i,j,k,igrid), i = 1, idim(igrid) ), & j = 1, jdim(igrid) ), k = 1, kdim(igrid) ) if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_3DM_XYZB - Fatal error!' write ( *, * ) ' A read error occurred.' return end if end do return end subroutine rb_3dm_qfile ( iunit, idim, jdim, kdim, maxi, maxj, maxk, maxgrid, & ngrid, fsmach, alpha, re, time, q, ierror ) ! !******************************************************************************* ! !! RB_3DM_QFILE reads a binary 3D multiple grid Q file. ! ! ! Modified: ! ! 01 December 1998 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM(MAXGRID), JDIM(MAXGRID), KDIM(MAXGRID), the number of ! nodes in the X, Y, and Z directions for each grid. ! ! Input, integer MAXI, MAXJ, MAXK, the maximum dimension for the first three ! components of Q. ! ! Input, integer MAXGRID, the maximum value of NGRID. ! ! Output, integer NGRID, the number of grids. ! ! Output, real FSMACH(MAXGRID), ALPHA(MAXGRID), RE(MAXGRID), TIME(MAXGRID), ! the values of the free stream Mach number, the angle of attack, in degrees, ! the Reynolds number for the flow, and the time, for each grid. ! ! Output, real Q(MAXI,MAXJ,MAXK,5,MAXGRID), ! the Q values of the nodes for each grid. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! 1, an error occurred while reading NGRID. ! 2, NGRID > MAXGRID. ! 3, an error occurred while reading the dimensions. ! 4, some IDIM, JDIM or KDIM is greater than MAXI, MAXJ or MAXK. ! 5, an error occurred while reading the data. ! implicit none ! integer maxgrid integer maxi integer maxj integer maxk ! real alpha(maxgrid) real fsmach(maxgrid) integer i integer idim(maxgrid) integer ierror integer iunit integer jdim(maxgrid) integer kdim(maxgrid) integer ngrid real q(maxi,maxj,maxk,5,maxgrid) real re(maxgrid) real time(maxgrid) ! ierror = 0 call rb_3dm_ngrid ( iunit, ngrid, ierror ) if ( ierror /= 0 ) then ierror = 1 return end if if ( ngrid > maxgrid ) then ierror = 2 return end if call rb_3dm_dim ( iunit, idim, jdim, kdim, maxgrid, ngrid, ierror ) if ( ierror /= 0 ) then ierror = 3 return end if do i = 1, ngrid if ( idim(i) > maxi .or. jdim(i) > maxj .or. kdim(i) > maxk ) then ierror = 4 return end if end do call rb_3dm_q ( iunit, idim, jdim, kdim, maxi, maxj, maxk, & maxgrid, ngrid, fsmach, alpha, re, time, q, ierror ) if ( ierror /= 0 ) then ierror = 5 return end if return end subroutine rb_3dm_xyzfile ( iunit, idim, jdim, kdim, maxi, maxj, maxk, & maxgrid, ngrid, x, y, z, ierror ) ! !******************************************************************************* ! !! RB_3DM_XYZFILE reads a binary 3D multiple grid XYZ file. ! ! ! Modified: ! ! 30 November 1998 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM(MAXGRID), JDIM(MAXGRID), KDIM(MAXGRID), the number of ! nodes in the X, Y, and Z directions for each grid. ! ! Input, integer MAXI, MAXJ, MAXK, the maximum dimension for the first three ! components of X, Y and Z. ! ! Input, integer MAXGRID, the maximum value of NGRID. ! ! Output, integer NGRID, the number of grids. ! ! Output, real X(MAXI,MAXJ,MAXK,MAXGRID), ! Y(MAXI,MAXJ,MAXK,MAXGRID), ! Z(MAXI,MAXJ,MAXK,MAXGRID), the X, Y and Z coordinates of the nodes ! for each grid. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! 1, an error occurred while reading NGRID. ! 2, NGRID > MAXGRID. ! 3, an error occurred while reading the dimensions. ! 4, some IDIM, JDIM or KDIM is greater than MAXI, MAXJ or MAXK. ! 5, an error occurred while reading the data. ! implicit none ! integer maxgrid integer maxi integer maxj integer maxk ! integer i integer idim(maxgrid) integer ierror integer iunit integer jdim(maxgrid) integer kdim(maxgrid) integer ngrid real x(maxi,maxj,maxk,maxgrid) real y(maxi,maxj,maxk,maxgrid) real z(maxi,maxj,maxk,maxgrid) ! ierror = 0 call rb_3dm_ngrid ( iunit, ngrid, ierror ) if ( ierror /= 0 ) then ierror = 1 return end if if ( ngrid > maxgrid ) then ierror = 2 return end if call rb_3dm_dim ( iunit, idim, jdim, kdim, maxgrid, ngrid, ierror ) if ( ierror /= 0 ) then ierror = 3 return end if do i = 1, ngrid if ( idim(i) > maxi .or. jdim(i) > maxj .or. kdim(i) > maxk ) then ierror = 4 return end if end do call rb_3dm_xyz ( iunit, idim, jdim, kdim, maxi, maxj, maxk, & maxgrid, ngrid, x, y, z, ierror ) if ( ierror /= 0 ) then ierror = 5 return end if return end subroutine rb_3dm_xyzbfile ( iunit, idim, jdim, kdim, maxi, maxj, maxk, & maxgrid, ngrid, x, y, z, b, ierror ) ! !******************************************************************************* ! !! RB_3DM_XYZBFILE reads a binary 3D multiple grid XYZB file. ! ! ! Modified: ! ! 02 November 1998 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM(MAXGRID), JDIM(MAXGRID), KDIM(MAXGRID), the number of ! nodes in the X, Y, and Z directions for each grid. ! ! Input, integer MAXI, MAXJ, MAXK, the maximum dimension for the first three ! components of X, Y and Z. ! ! Input, integer MAXGRID, the maximum value of NGRID. ! ! Output, integer NGRID, the number of grids. ! ! Output, real X(MAXI,MAXJ,MAXK,MAXGRID), ! Y(MAXI,MAXJ,MAXK,MAXGRID), ! Z(MAXI,MAXJ,MAXK,MAXGRID), the X, Y and Z coordinates of the nodes ! for each grid. ! ! Output, integer B(MAXI,MAXJ,MAXK,MAXGRID), the blanking information. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! 1, an error occurred while reading NGRID. ! 2, NGRID > MAXGRID. ! 3, an error occurred while reading the dimensions. ! 4, some IDIM, JDIM or KDIM is greater than MAXI, MAXJ or MAXK. ! 5, an error occurred while reading the data. ! implicit none ! integer maxgrid integer maxi integer maxj integer maxk ! integer b(maxi,maxj,maxk,maxgrid) integer i integer idim(maxgrid) integer ierror integer iunit integer jdim(maxgrid) integer kdim(maxgrid) integer ngrid real x(maxi,maxj,maxk,maxgrid) real y(maxi,maxj,maxk,maxgrid) real z(maxi,maxj,maxk,maxgrid) ! ierror = 0 call rb_3dm_ngrid ( iunit, ngrid, ierror ) if ( ierror /= 0 ) then ierror = 1 return end if if ( ngrid > maxgrid ) then ierror = 2 return end if call rb_3dm_dim ( iunit, idim, jdim, kdim, maxgrid, ngrid, ierror ) if ( ierror /= 0 ) then ierror = 3 return end if do i = 1, ngrid if ( idim(i) > maxi .or. jdim(i) > maxj .or. kdim(i) > maxk ) then ierror = 4 return end if end do call rb_3dm_xyzb ( iunit, idim, jdim, kdim, maxi, maxj, maxk, & maxgrid, ngrid, x, y, z, b, ierror ) if ( ierror /= 0 ) then ierror = 5 return end if return end subroutine rb_3dp_f ( iunit, idim, jdim, kdim, nvar, f, ierror ) ! !******************************************************************************* ! !! RB_3DP_F reads a binary 3D plane F file for the F data. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Input, integer IDIM, JDIM, KDIM, the number of nodes in the ! X, Y, and Z directions. ! ! Input, integer NVAR, the number of F variables defined. ! ! Output, real F(IDIM,JDIM,KDIM,NVAR), the F data. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! 1, an error occurred while reading the data. ! implicit none ! integer idim integer jdim integer kdim integer nvar ! real f(idim,jdim,kdim,nvar) integer i integer ierror integer ios integer iunit integer j integer k integer l ! ierror = 0 do k = 1, kdim read ( iunit, iostat = ios ) & ((( f(i,j,k,l), i = 1, idim ), j = 1, jdim ), l = 1, nvar ) if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_3DP_F - Error!' write ( *, * ) ' An end-of-file condition occurred.' return end if end do return end subroutine rb_3dp_ffile ( iunit, idim, jdim, kdim, nvar, f, ierror ) ! !******************************************************************************* ! !! RB_3DP_FFILE reads a binary 3D plane F file. ! ! ! Modified: ! ! 14 November 1998 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM, JDIM, KDIM, the number of nodes in the ! X, Y, and Z directions. ! ! Output, integer NVAR, the number of F variables defined. ! ! Output, real F(IDIM,JDIM,KDIM,NVAR), the F data. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! 1, an error occurred while reading the dimensions. ! 2, an error occurred while reading the data. ! implicit none ! integer idim integer jdim integer kdim integer nvar ! real f(idim,jdim,kdim,nvar) integer ierror integer iunit ! ierror = 0 call rb_3d_dimn ( iunit, idim, jdim, kdim, nvar, ierror ) if ( ierror /= 0 ) then ierror = 1 return end if call rb_3dp_f ( iunit, idim, jdim, kdim, nvar, f, ierror ) if ( ierror /= 0 ) then ierror = 2 return end if return end subroutine rb_3dp_q ( iunit, idim, jdim, kdim, q, ierror ) ! !******************************************************************************* ! !! RB_3DP_Q reads a binary 3D plane Q file for the Q data. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Input, integer IDIM, JDIM, KDIM, the number of nodes in the ! X, Y, and Z directions. ! ! Output, real Q(IDIM,JDIM,KDIM,5), the Q data, density, X, Y and Z ! momentum, and stagnation energy per unit volume. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer idim integer jdim integer kdim ! integer i integer ierror integer ios integer iunit integer j integer k integer l real q(idim,jdim,kdim,5) ! ierror = 0 do k = 1, kdim read ( iunit, iostat = ios ) & ((( q(i,j,k,l), i = 1, idim ), j = 1, jdim ), l = 1, 5 ) if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_3DP_Q - Error!' write ( *, * ) ' An end-of-file condition occurred.' return end if end do return end subroutine rb_3dp_qfile ( iunit, idim, jdim, kdim, alpha, fsmach, re, time, & q, ierror ) ! !******************************************************************************* ! !! RB_3DP_QFILE reads a binary 3D plane Q file. ! ! ! Modified: ! ! 14 November 1998 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM, JDIM, KDIM, the number of nodes in the ! X, Y, and Z directions. ! ! Output, real ALPHA, the angle of attack, in degrees. ! ! Output, real FSMACH, the free stream Mach number. ! ! Output, real RE, the Reynolds number for the flow. ! ! Output, real TIME, the time associated with the data. ! ! Output, real Q(IDIM,JDIM,KDIM,5), the Q data, density, X, Y and Z ! momentum, and stagnation energy per unit volume. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! 1, an error occurred while reading the dimensions. ! 2, an error occurred while reading the parameters. ! 3, an error occurred while reading the data. ! implicit none ! integer idim integer jdim integer kdim ! real alpha real fsmach integer ierror integer iunit real q(idim,jdim,kdim,5) real re real time ! ierror = 0 call rb_3d_dim ( iunit, idim, jdim, kdim, ierror ) if ( ierror /= 0 ) then ierror = 1 return end if call rb_param ( iunit, fsmach, alpha, re, time, ierror ) if ( ierror /= 0 ) then ierror = 2 return end if call rb_3dp_q ( iunit, idim, jdim, kdim, q, ierror ) if ( ierror /= 0 ) then ierror = 3 return end if return end subroutine rb_3dp_xyz ( iunit, idim, jdim, kdim, x, y, z, ierror ) ! !******************************************************************************* ! !! RB_3DP_XYZ reads a binary 3D plane XYZ file for the XYZ data. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Input, integer IDIM, JDIM, KDIM, the number of nodes in the ! X, Y, and Z directions. ! ! Output, real X(IDIM,JDIM,KDIM), Y(IDIM,JDIM,KDIM), Z(IDIM,JDIM,KDIM), ! the X, Y and Z coordinates of the nodes. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer idim integer jdim integer kdim ! integer i integer ierror integer ios integer iunit integer j integer k real x(idim,jdim,kdim) real y(idim,jdim,kdim) real z(idim,jdim,kdim) ! ierror = 0 do k = 1, kdim read ( iunit, iostat = ios ) (( x(i,j,k), i = 1, idim ), j = 1, jdim ), & (( y(i,j,k), i = 1, idim ), j = 1, jdim ), & (( z(i,j,k), i = 1, idim ), j = 1, jdim ) if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_3DP_XYZ - Error!' write ( *, * ) ' An end-of-file condition occurred.' return end if end do return end subroutine rb_3dp_xyzb ( iunit, idim, jdim, kdim, x, y, z, b, ierror ) ! !******************************************************************************* ! !! RB_3DP_XYZB reads a binary 3D plane XYZB file for the XYZB data. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Input, integer IDIM, JDIM, KDIM, the number of nodes in the ! X, Y, and Z directions. ! ! Output, real X(IDIM,JDIM,KDIM), Y(IDIM,JDIM,KDIM), Z(IDIM,JDIM,KDIM), ! the X, Y and Z coordinates of the nodes. ! ! Output, integer B(IDIM,JDIM,KDIM), the blanking information. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! integer idim integer jdim integer kdim ! integer b(idim,jdim,kdim) integer i integer ierror integer ios integer iunit integer j integer k real x(idim,jdim,kdim) real y(idim,jdim,kdim) real z(idim,jdim,kdim) ! ierror = 0 do k = 1, kdim read ( iunit, iostat = ios ) (( x(i,j,k), i = 1, idim ), j = 1, jdim ), & (( y(i,j,k), i = 1, idim ), j = 1, jdim ), & (( z(i,j,k), i = 1, idim ), j = 1, jdim ), & (( b(i,j,k), i = 1, idim ), j = 1, jdim ) if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_3DP_XYZB - Error!' write ( *, * ) ' An end-of-file condition occurred.' end if end do return end subroutine rb_3dp_xyzbfile ( iunit, idim, jdim, kdim, x, y, z, b, ierror ) ! !******************************************************************************* ! !! RB_3DP_XYZBFILE reads a binary 3D plane XYZB file. ! ! ! Modified: ! ! 14 November 1998 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM, JDIM, KDIM, the number of nodes in the ! X, Y, and Z directions. ! ! Output, real X(IDIM,JDIM,KDIM), Y(IDIM,JDIM,KDIM), Z(IDIM,JDIM,KDIM), ! the X, Y and Z coordinates of the nodes. ! ! Output, integer B(IDIM,JDIM,KDIM), the blanking information. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! 1, an error occurred while reading the dimensions. ! 2, an error occurred while reading the data. ! implicit none ! integer idim integer jdim integer kdim ! integer b(idim,jdim,kdim) integer ierror integer iunit real x(idim,jdim,kdim) real y(idim,jdim,kdim) real z(idim,jdim,kdim) ! ierror = 0 call rb_3d_dim ( iunit, idim, jdim, kdim, ierror ) if ( ierror /= 0 ) then ierror = 1 return end if call rb_3dp_xyzb ( iunit, idim, jdim, kdim, x, y, z, b, ierror ) if ( ierror /= 0 ) then ierror = 2 return end if return end subroutine rb_3dp_xyzfile ( iunit, idim, jdim, kdim, x, y, z, ierror ) ! !******************************************************************************* ! !! RB_3DP_XYZFILE reads a binary 3D plane XYZ file. ! ! ! Modified: ! ! 13 November 1998 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, integer IDIM, JDIM, KDIM, the number of nodes in the ! X, Y, and Z directions. ! ! Output, real X(IDIM,JDIM,KDIM), Y(IDIM,JDIM,KDIM), Z(IDIM,JDIM,KDIM), ! the X, Y and Z coordinates of the nodes. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! 1, an error occurred while reading the dimensions. ! 2, an error occurred while reading the data. ! implicit none ! integer idim integer jdim integer kdim ! integer ierror integer iunit real x(idim,jdim,kdim) real y(idim,jdim,kdim) real z(idim,jdim,kdim) ! ierror = 0 call rb_3d_dim ( iunit, idim, jdim, kdim, ierror ) if ( ierror /= 0 ) then ierror = 1 return end if call rb_3dp_xyz ( iunit, idim, jdim, kdim, x, y, z, ierror ) if ( ierror /= 0 ) then ierror = 2 return end if return end subroutine rb_param ( iunit, fsmach, alpha, re, time, ierror ) ! !******************************************************************************* ! !! RB_PARAM reads a binary Q file for the flow parameters. ! ! ! Modified: ! ! 28 June 2000 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Input, integer IUNIT, the FORTRAN unit on which the file has ! been opened. ! ! Output, real FSMACH, the free stream Mach number. ! ! Output, real ALPHA, the angle of attack, in degrees. ! ! Output, real RE, the Reynolds number for the flow. ! ! Output, real TIME, the time associated with the data. ! ! Output, integer IERROR, error flag. ! 0, no error detected. ! nonzero, a read error occurred. ! implicit none ! real alpha real fsmach integer ierror integer ios integer iunit real re real time ! ierror = 0 read ( iunit, iostat = ios ) fsmach, alpha, re, time if ( ios /= 0 ) then ierror = ios write ( *, * ) ' ' write ( *, * ) 'RB_PARAM - Error!' write ( *, * ) ' An end-of-file condition occurred.' return end if return end