%**************************************************************************
%This function gets the program parameters.
%
%Output:
%param, structure containing the program parameters
%
%Zachary Wolf, 4/11/08

function [param] = pm_block_sim_get_param()

%Get the program parameters
pm_block_sim_param;
param.output_file_dir = OUTPUT_FILE_DIR;
param.num_block_xdiv = NUM_BLOCK_XDIV;
param.num_block_ydiv = NUM_BLOCK_YDIV;
param.num_block_zdiv = NUM_BLOCK_ZDIV;
param.br = BR;
param.block_x_width = BLOCK_X_WIDTH;
param.block_y_width = BLOCK_Y_WIDTH;
param.block_z_width = BLOCK_Z_WIDTH;

%Store the matrix of points where the field is to be calculated
param.x_field_pts = X_FIELD_PTS;
param.y_field_pts = Y_FIELD_PTS;
param.z_field_pts = Z_FIELD_PTS;

%Vectorize the points where the field is to be calculated
param.field_pts_x = zeros(1, length(X_FIELD_PTS) * length(Y_FIELD_PTS) * length(Z_FIELD_PTS));
param.field_pts_y = zeros(1, length(X_FIELD_PTS) * length(Y_FIELD_PTS) * length(Z_FIELD_PTS));
param.field_pts_z = zeros(1, length(X_FIELD_PTS) * length(Y_FIELD_PTS) * length(Z_FIELD_PTS));
index = 0;
for ii = 1 : length(X_FIELD_PTS)
    for jj = 1 : length(Y_FIELD_PTS)
        for kk = 1 : length(Z_FIELD_PTS)
            index = index + 1;
            param.field_pts_x(index) = X_FIELD_PTS(ii);
            param.field_pts_y(index) = Y_FIELD_PTS(jj);
            param.field_pts_z(index) = Z_FIELD_PTS(kk);
        end
    end
end

%Done
