.php xmlns="http://www.w3.org/1999/.php"> - k-Wave MATLAB Toolbox
k-Wave Toolbox


2D time-domain simulation of wave propagation on a GPU using C++ CUDA code.


See kspaceFirstOrder2D and kspaceFirstOrder3DC.


kspaceFirstOrder2DG provides a blind interface to the C++/CUDA version of kspaceFirstOrder2D (called kspaceFirstOrder-CUDA) in the same way as kspaceFirstOrder3DC. Note, the C++ code does not support all input options, and all display options are ignored (only command line outputs are given). See the k-Wave user manual for more information.

The function works by appending the optional input 'SaveToDisk' to the user inputs and then calling kspaceFirstOrder2D to save the input files to disk. The contents of sensor.record (if set) are parsed as input flags, and the C++ code is run using the kspaceFirstOrder2D. The input and output files are saved to the temporary directory native to the operating system, and are deleted after the function runs.

This function requires the C++ binary/executable of kspaceFirstOrder-CUDA to be downloaded from www.k-wave.org/download.php and placed in the "binaries" directory of the k-Wave toolbox (the 2D and 3D code use the same binary). Alternatively, the name and location of the binary can be specified using the optional input parameters 'BinaryName' and 'BinariesPath'.

See Also

kspaceFirstOrder2D, kspaceFirstOrder2DC, kspaceFirstOrder3DC