%**************************************************************************
%pm_block_sim_block_init
%This file initializes the simulation program.
%
%Input:
%param, parameter structure
%
%Output:
%block, structure containing permanent magnet block information
%
%Zachary Wolf, 4/11/08

function [block] = pm_block_sim_block_init(param)

%Global
global mu_0;

%Parameters
br = param.br;
block_x_width = param.block_x_width;
block_y_width = param.block_y_width;
block_z_width = param.block_z_width;

%Initialization
num_block = 0;

%Block
num_block = num_block + 1;
block.mx(num_block) = 0;  %(T/Tm/A = A/m)
block.my(num_block) = 0;
block.mz(num_block) = br / mu_0;
block.x_center(num_block) = 0;
block.y_center(num_block) = 0;
block.z_center(num_block) = 0;
%block.z_center(num_block) = - block_z_width / 2;
block.x_width(num_block) = block_x_width;
block.y_width(num_block) = block_y_width;
block.z_width(num_block) = block_z_width;

%Add the number of blocks to the structure
block.num_block = num_block;

%Done
