function pbeDefinition = seededGrowthTwoBoundary

%% Name and information
pbeDefinition.info = ['seeded growth (one initial population), ' ...
    'growing to one boundaray, switching direction, ' ...
    'growing to second boundary.'];
pbeDefinition.source = 'generic';

%% Crystal setup
% crystal
pbeDefinition.cdef = obtainCrystal('generic_potash_alum', 1);

% decomposition data
pbeDefinition.dec = obtainDec(pbeDefinition.cdef.A, 'mapping', ...
    pbeDefinition.cdef.groupMappingMatrix, 'verbose', 0);
pbeDefinition.dec = addMeasureDataDec(pbeDefinition.dec, 'volume');

%% Initial distribution
rng(1);
pbeDefinition.seeding.time = 0; % seconds
std = 0.3*[3 3]'*1e-6;   % m
disD = obtainDistributionDiscrete('normal', ...
    'nSample', 100, ...
    'mean', [10 10]'*1e-6, ...  %m
    'cov', diag(std.^2));
pbeDefinition.seeding.positionMatrix = disD.positionMatrix;       % m
pbeDefinition.seeding.numberVector = disD.probabilityVector*1e10; % #

%% growth and properties
% shortcut
dec = pbeDefinition.dec;

% growth rate
pbeDefinition.growthRate = @(H, P, y, t)(...
    (t<2000)*bsxfun(@plus, H - H, [0.08;0.01]*1e-7) + ...
    (t>=2000)*bsxfun(@plus, H - H, [0.01;0.08]*1e-7));   % m/s

% properties
pbeDefinition.pivotProperty = {'volume'};
pbeDefinition.bulkProperty = @(P, N, x, t)(P*N');

% time span for solution
pbeDefinition.timeSpan = 0:30:(120*60);          %s

% options
pbeDefinition.optionStruct.distanceLimit = 3e-7; %m