%% script: load output data
%
% THIS IS NO USER SCRIPT/FUNCTION.

%% Try to load existent data
% but only if the user does not enforce recalculation.
flagExit = 0;
if ~flagEnforce
try
    % we look in the database for stored results. The database is located
    %  in ./data and contains .mat files that were named according to the
    %   caseName.
    outData = obtainData(outCaseName, ...
        'databaseRoot', databaseRoot, ...
        'database', ['.' filesep 'data'], ...
        'type', 'mat', ...
        outputDatabase{:});
    returnData = {outData};
    % if the above succeeds, the caseName was found
    flagExit = 1;
catch
    % here is actually nothing to do, we simply proceed with normal
    %   calculations
end
end