program main !*****************************************************************************80 ! !! test_tet_mesh_test() tests test_tet_mesh(). ! ! Licensing: ! ! This code is distributed under the MIT license. ! ! Modified: ! ! 27 October 2005 ! ! Author: ! ! John Burkardt ! implicit none integer, parameter :: rk = kind ( 1.0D+00 ) call timestamp ( ) write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'test_tet_mesh_test():' write ( *, '(a)' ) ' Fortran90 version' write ( *, '(a)' ) ' Test test_tet_mesh().' call test01 ( ) call test02 ( ) ! ! Terminate. ! write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'test_tet_mesh_test():' write ( *, '(a)' ) ' Normal end of execution.' write ( *, '(a)' ) ' ' call timestamp ( ) stop 0 end subroutine test01 ( ) !*****************************************************************************80 ! !! TEST01 tests P00_TEST_NUM, P00_TITLE, and P00_HEADER. ! ! Licensing: ! ! This code is distributed under the MIT license. ! ! Modified: ! ! 27 October 2005 ! ! Author: ! ! John Burkardt ! implicit none integer, parameter :: rk = kind ( 1.0D+00 ) integer test integer test_num character ( len = 80 ) title write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'TEST01' write ( *, '(a)' ) ' P00_TEST_NUM reports the number of problems.' write ( *, '(a)' ) ' P00_TITLE returns a title for each problem.' write ( *, '(a)' ) ' P00_HEADER prints some information about each problem.' call p00_test_num ( test_num ) write ( *, '(a)' ) ' ' write ( *, '(a,i6)' ) ' The number of tests available = ', test_num do test = 1, test_num call p00_title ( test, title ) write ( *, '(a)' ) ' ' write ( *, '(a,i6)' ) ' Test number: ', test write ( *, '(a, a)' ) ' Title: "', trim ( title ) // '"' call p00_header ( test ) end do return end subroutine test02 ( ) !*****************************************************************************80 ! !! TEST02 tests P00_SAMPLE. ! ! Licensing: ! ! This code is distributed under the MIT license. ! ! Modified: ! ! 27 October 2005 ! ! Author: ! ! John Burkardt ! implicit none integer, parameter :: rk = kind ( 1.0D+00 ) integer, parameter :: dim_num = 3 integer n real ( kind = rk ), allocatable, dimension ( :, : ) :: point integer test integer test_num character ( len = 80 ) title write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'TEST02' write ( *, '(a)' ) ' P00_SAMPLE returns sample points from the region.' call p00_test_num ( test_num ) do test = 1, test_num call p00_title ( test, title ) n = 20 write ( *, '(a)' ) ' ' write ( *, '(a,i6)' ) ' Test number = ', test write ( *, '(a, a)' ) ' Title: = "', trim ( title ) // '"' write ( *, '(a,i6)' ) ' Dimension DIM_NUM = ', dim_num write ( *, '(a,i6)' ) ' Number of samples N = ', n write ( *, '(a)' ) ' ' allocate ( point(1:dim_num,1:n) ) call p00_sample ( test, n, point ) call r8mat_transpose_print ( dim_num, n, point, ' The sample points:' ) deallocate ( point ) end do return end subroutine timestamp ( ) !*****************************************************************************80 ! !! TIMESTAMP prints the current YMDHMS date as a time stamp. ! ! Example: ! ! 31 May 2001 9:45:54.872 AM ! ! Licensing: ! ! This code is distributed under the MIT license. ! ! Modified: ! ! 18 May 2013 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! None ! implicit none integer, parameter :: rk = kind ( 1.0D+00 ) character ( len = 8 ) ampm integer d integer h integer m integer mm character ( len = 9 ), parameter, dimension(12) :: month = (/ & 'January ', 'February ', 'March ', 'April ', & 'May ', 'June ', 'July ', 'August ', & 'September', 'October ', 'November ', 'December ' /) integer n integer s integer values(8) integer y call date_and_time ( values = values ) y = values(1) m = values(2) d = values(3) h = values(5) n = values(6) s = values(7) mm = values(8) if ( h < 12 ) then ampm = 'AM' else if ( h == 12 ) then if ( n == 0 .and. s == 0 ) then ampm = 'Noon' else ampm = 'PM' end if else h = h - 12 if ( h < 12 ) then ampm = 'PM' else if ( h == 12 ) then if ( n == 0 .and. s == 0 ) then ampm = 'Midnight' else ampm = 'AM' end if end if end if write ( *, '(i2,1x,a,1x,i4,2x,i2,a1,i2.2,a1,i2.2,a1,i3.3,1x,a)' ) & d, trim ( month(m) ), y, h, ':', n, ':', s, '.', mm, trim ( ampm ) return end