1 function SCM_data = SCM(model,params,
operator,innerproduct_matrix)
2 %
function SCM_data = SCM(model,params,
operator,innerproduct_matrix)
4 % Offline programm of the successive constraint method (scm) for stability
8 % model : standard model
9 % params: parameters for the scm algorithm (see below)
10 % operator: (function handle or model_data) returning the system matrix
11 % function handle could be (operator =@ (model) model.operators(model,operator);
12 % the funtion operator should depend on model.decomp_mode
13 % innerproduct_matrix: if operator==model_data, the innerpoduct_matrix is optional
16 % For simple cases, the call SCM_data=SCM(model,params,model_data) is also
19 % Returns SCM_data, which is necessary for scm online computations
20 % via SCMonline (not SCM_online).
28 % params.type = 'coercive' : Decides which algorithm is used and
29 % = 'infsup' which constant should be computed
31 % params.Ma =
int : number of parameters with an already
32 % computed constant near to mu
33 % params.Mp =
int : number of parameters without computed
35 % params.NumberOfParameters =
int : size of the test set used in the SCM
37 % params.eps =
double : error boundary of the
Greedy procedure
39 % params.max_iterations =
int : maximal number of
Greedy iterations
41 % params.dirichlet_gids : Indices to remove the dirichlet boundary
44 % params.parallel = 0 non parallel version
45 % = 1 parallel (pool stays active after
47 % = 2 parallel (closing pool afterwards)
51 % David Kreplin 05.01.2015
54 % Allows the call SCM_data=SCM(model,params,model_data);
55 if ~isa(operator, 'function_handle')
58 innerproduct_matrix = model.get_inner_product_matrix(operator);
60 operator =@ (model) model.operators(model,operator);
63 if ~isfield(params, 'type')
64 params.type = 'infsup';
65 warning('No scm type defined! Setting type = "infsup". For coercive constants type="coercive" will be faster!');
69 if ~isfield(params, 'dirichlet_gids')
70 params.dirichlet_gids = [];
74 if strcmp(params.type,'coercive');
79 if strcmp(params.type,'infsup');
83 disp('-- SCM: finished!');
function SCM_data = scm_coercive_greedy(model, params, operator, innerproduct_matrix)
model=scm_greedy(model, model_data)
function scm_infsup_demo()
scm_infsup_demo()
Customizable implementation of an abstract greedy algorithm.
function scm_coercive_demo()
scm_coercive_demo()
function SCM_data = scm_infsup_greedy(model, params, operator, innerproduct_matrix)
model=scm_greedy(model, model_data)