Hi Brad,
I was trying to move simulations that run smoothly but slowly from the CPU to GPU using the Parallel Computing Toolbox.
I get an error from checkFieldNames.m saying:
Error using checkFieldNames (line 51)
number_elements is not a valid field for the structure sensor
I assume that this check is not performed on CPU version since it runs.
Is there a way to fix or by-pass this?
Thank you,
Margot
-------
LINES:
input_args = {'PMLInside', false,...
'PlotSim', false,...
'PMLSize', [PML_X, PML_Y, PML_Z], ...
'DataCast', 'gpuArray-single'};
Transmits.Left.sensor_data = kspaceFirstOrder3D(kgrid,medium,...
transducer1,...
transducer1_receive,...
input_args{:});
DATA:
kgrid =
kWaveGrid with properties:
Nx: 409
Ny: 193
Nz: 130
dx: 1.5400e-04
dy: 1.5400e-04
dz: 1.5400e-04
kx_vec: [409x1 double]
ky_vec: [193x1 double]
kz_vec: [130x1 double]
k: [409x193x130 double]
kx_max: 2.0350e+04
ky_max: 2.0294e+04
kz_max: 2.0400e+04
k_max: 2.0294e+04
dim: 3
nonuniform: 0
t_array: [1x3000 double]
x: [409x193x130 double]
y: [409x193x130 double]
z: [409x193x130 double]
kx: [409x193x130 double]
ky: [409x193x130 double]
kz: [409x193x130 double]
x_vec: [409x1 double]
y_vec: [193x1 double]
z_vec: [130x1 double]
x_size: 0.0630
z_size: 0.0200
y_size: 0.0297
dt: 3.0000e-08
Nt: 3000
total_grid_points: 10261810
medium =
sound_speed: [409x193x130 double]
density: [409x193x130 double]
alpha_coeff: 0.7500
alpha_power: 1.5000
BonA: 6
transducer1 =
number_elements: 128
element_width: 1
element_length: 84
element_spacing: 0
radius: Inf
position: [1 33 23]
sound_speed: 1540
transmit_apodization: 'Rectangular'
receive_apodization: 'Tukey'
input_signal: [1x162 double]
active_elements: [128x1 double]
focus_distance: 0.0403
elevation_focus_distance: 0.0403
steering_angle: 6.9079
transducer1_receive =
number_elements: 128
element_width: 1
element_length: 84
element_spacing: 0
radius: Inf
position: [1 33 23]
sound_speed: 1540
transmit_apodization: 'Rectangular'
receive_apodization: 'Tukey'
input_signal: [1x162 double]
active_elements: [128x1 double]
focus_distance: 0.0400
elevation_focus_distance: 0.0400
steering_angle: 0