fnm_cw_parfor()
Description: Calculate a pressure field using the Fast Nearfield Method and multple threads.
Usage
pressure = fnm_cw_parfor(transducer, cg, medium, ndiv, f0, dflag);
Arguments
- transducer A FOCUS transducer array.
- cg A FOCUS coordinate grid.
- medium A FOCUS medium.
- ndiv The number of integral points to use.
- f0 Frequency of the array in Hz.
- dflag Display flag, 1 = display, 0 = suppress.
Output Parameters
- pressure A 3-d array representing the complex pressure at each point
Notes
This function uses the MATLAB Parallel Computing Toolkit to
perform the pressure calculation using multiple threads. The speed increase realized by this function is entirely dependent on the number of processor cores present in the computer executing the code and on the number of transducers in the array. No gain will be observed for small arrays, but large arrays should see significant speed increases if enough CPU cores are present. If the Parallel Computing Toolkit is not installed, the function will fail to run.

