fnm_cw()
Description: This function is the C++ MEX file that performs continuous-wave calculations using the Fast Nearfield Method.
Usage
pressure = fnm_cw(transducer, cg, medium, ndiv, f0);
pressure = fnm_cw(transducer, cg, medium, ndiv, f0, dflag);
pressure = fnm_cw(transducer, cg, medium, ndiv, f0, dflag, nthreads);
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.
- nthreads The number of threads to use in the calculation.
Output Parameters
- pressure A 3-d array representing the complex pressure at each point in space.
Notes
Threading in FOCUS is implemented at the transducer level, meaning that single transducers will not benefit from this feature.
Specifying a number of threads larger than the number of CPU cores available will not result in a significant additional speed increase and may in fact result in slower speeds due to additional inter-thread communication overhead.