%**************************************************************************
%This function writes the parameter information to the data file.
%
%Input:
%dat_file, data file for results
%param, structure containing program parameters
%   output_file_dir %Directory for output files
%   num_block_xdiv  %Number of divisions in x for charge calculation
%   num_block_ydiv  %Number of divisions in y for charge calculation
%   num_block_zdiv  %Number of divisions in z for charge calculation
%   br              %Permanent magnet remnant field (T)
%   block_x_width   %Magnet block width in x direction (m)
%   block_y_width   %Magnet block width in y direction (m)
%   block_z_width   %Magnet block width in z direction (m)
%
%Zachary Wolf, 4/11/08

function [] = pm_block_sim_dat_param(dat_file, param)

%Write the parameter information to the data file
fid = fopen(dat_file, 'a');
fprintf(fid, '\r\n');
fprintf(fid, 'Simulation Parameters:\r\n');
fprintf(fid, 'Output file directory = %s\r\n', param.output_file_dir);
fprintf(fid, 'Number of block divisions in x = %i\r\n', param.num_block_xdiv);
fprintf(fid, 'Number of block divisions in y = %i\r\n', param.num_block_ydiv);
fprintf(fid, 'Number of block divisions in z = %i\r\n', param.num_block_zdiv);
fprintf(fid, 'Remnant field in blocks = %f T\r\n', param.br);
fprintf(fid, 'Width of blocks in x = %f m\r\n', param.block_x_width);
fprintf(fid, 'Width of blocks in y = %f m\r\n', param.block_y_width);
fprintf(fid, 'Width of blocks in z = %f m\r\n', param.block_z_width);
fclose(fid);

%Done
