#*****************************************************************************80 # ## wave_test tests wave. # # Licensing: # # Copyright 2016 James P. Howard, II # # The computer code and data files on this web page are distributed under # https://opensource.org/licenses/BSD-2-Clause, the BSD-2-Clause license. # # Modified: # # 30 March 2020 # # Author: # # John Burkardt # cat ( date ( ), "\n" ) cat ( "\n" ) cat ( "wave_test\n" ) cat ( " ", version$version.string, "\n" ) cat ( " wave solves the 1D wave equation using the finite difference method.\n" ) source ( "/home/burkardt/public_html/r_src/wave/wave.R" ) speed <- 2.0 x0 <- 0.0 xdelta <- 0.05 x <- seq ( x0, 1, xdelta ) m <- length ( x ) u <- sin ( x * pi * 2.0 ) u[11:21] <- 0.0 tdelta <- 0.02 n <- 40 z <- wave ( u, speed, xdelta, tdelta, n ) t ( head ( z, n = 5 ) ) # # Terminate. # cat ( "\n" ) cat ( "wave_test\n" ) cat ( " Normal end of execution.\n" ) cat ( date ( ), "\n" ) quit ( )