function cont = get_settings(cont, dim)
%GET_SETTINGS   Defines default class settings.
%
% Merge default class settings with cont argument.
%
% This file is part of the atlas_kd toolbox, copyright (C) Michael
% Henderson, Frank Schilder, Harry Dankowicz, Erika Fotsch, of the package
% COCO (http://sourceforge.net/projects/cocotools).

defaults.h     = 0.1;  % Initial step size
defaults.h_max = 1;    % Maximum step size
defaults.h_min = 0.001; % Minimum step size
defaults.h_fac_min = 0.5; % Minimum step size adaptation factor
defaults.h_fac_max = 2.0; % Maximum step size adaptation factor
defaults.ga    = 0.95; % Adaptation security factor
defaults.MaxRes = 0.1; % Maximal residuum for prediction step
defaults.PtMX  = 50;   % Maximum number of continuation steps
defaults.theta = 0.5;  % Theta method
defaults.almax = 35;   % Critical angle between successive tangent vectors
defaults.Rmarg = 1.05; % Scale for cube

cont           = coco_merge(defaults, cont);
cont.almax     = cont.almax*pi/180;
cont.cube      = create_cube(dim, cont.Rmarg*cont.h); % Initial dim-dimensional cube
cont.s0        = cell2mat(cont.cube.v)/(cont.Rmarg*cont.h*sqrt(dim)); % Vertex directions
cont.bv0       = 1:cont.cube.n; % Indices of available vertices

end
