a class used to compute reduced several reduced simulations over a huge parameter sample extracting useful information
The class generates one or two dimensional cell arrays of these data fields storing information for a variation of some attributes of the reduced model, which can be freely chosen by specification of plot_fields .
Definition at line 19 of file Assessment.m.
Public Member Functions | |
Assessment (matfile,IReducedModel rmodel, mu_set_size, seed) | |
constructor More... | |
function output = | compute () |
stochastic estimation of error between reduced and detailed simulation over a test sample of \(\mu\) vectors More... | |
function | init_random_sampling (mu_set_size, seed) |
generates the initial random sample set M_test More... | |
function other = | copy () |
deep copy of this object More... | |
function | equal_distribution_samples (min, max, sample_size) |
adapts the samples attribute such that they are equally distributed in a given range. More... | |
function | update_rmodel (plot_field, new_value) |
updates the reduced model, i.e. applies the changes defined by the plot_fields attribute More... | |
Static Public Member Functions | |
static function [ rb_sim_data , tictoc ] = | rb_simulation_tictoc (varargin) |
a wrapper around the IReducedModel.rb_simulation() measuring the execution time More... | |
Public Attributes | |
plot_fields = {"[]"} | |
is a vector of field names with at most 2 elements over which the error landscape is computed or a cell with empty entries. More... | |
samples = {"(0.1:0.1:1)"} | |
is a cell array of scalar row vectors. The scalar values are plot_field values for which the error is computed and tested. More... | |
ParameterSampling.Interface | M_test |
an parameter sampling object More... | |
plot_field_descr = {""} | |
is a cell array of description texts for the plot fields. If this field is not set it is set to plot_fields . More... | |
run_name | |
character string specifying this test run. The string should be unique for every parameter combination. More... | |
compute_estimates = false | |
boolean value determining whether error estimates shall be computed More... | |
compute_errors = false | |
boolean value determining whether the "true" error \(\|u_h(\mu) - u_{\text{red}}(\mu)\|_{{\cal W}_h}\) shall be computed More... | |
compute_conditions = false | |
boolean value determining whether the condition numbers of the system matrices shall be computed More... | |
follow_refinement_steps = false | |
boolean value indicating whether the refinement steps of the reduced basis generation by Greedy.TrainingSetAdaptation shall be taken into account More... | |
M_by_N_ratio = 1 | |
if M and N are couple this value specifies the constant for the coupling. More... | |
::IReducedModel | rmodel |
the underlying reduced model | |
::CacheableObject | cache_object |
an object storing the reduced model and the detailed data | |
rsamples | |
the "real" collection of vectors used for the plot_fields variation More... | |
Greedy.DataTree.Detailed.INode | detailed_data |
the underlying detailed data More... | |
Postprocess.StochasticAssessment.Assessment.Assessment | ( | matfile, | |
IReducedModel | rmodel, | ||
mu_set_size, | |||
seed | |||
) |
constructor
matfile | name of result file where a IReducedModel object and a Greedy.DataTree.Detailed.INode object must be stored. |
rmodel | object specifying how the reduced simulations can be computed. |
mu_set_size | Optional argument determining the number of random parameters in the validation sample. (Default = 10) |
seed | a random seed used for initialization of ParameterSampling.Random object for the M_test parameter sample set. (Default = 654321) |
descr.name —
descr.name Definition at line 226 of file Assessment.m.
function output = Postprocess.StochasticAssessment.Assessment.compute | ( | ) |
stochastic estimation of error between reduced and detailed simulation over a test sample of \(\mu\) vectors
This function stochastically estimates the error between reduced and detailed simulations for given \(\mu\)-vectors and various reduced and collateral basis sizes. The results are visualized in a surface plot for problems with CRB.
If required by the users, averaged time measurements for the reduced and the detailed simulations are computed, too.
output | an Output object |
rd_conds —
rd conds Definition at line 279 of file Assessment.m.
function other = Postprocess.StochasticAssessment.Assessment.copy | ( | ) |
deep copy of this object
other | copied Assessment object |
Definition at line 441 of file Assessment.m.
function Postprocess.StochasticAssessment.Assessment.equal_distribution_samples | ( | min, | |
max, | |||
sample_size | |||
) |
adapts the samples attribute such that they are equally distributed in a given range.
min | is a vector of minimum values of plot_fields variables. |
max | is a vector for maximum values of plot_fields variables. |
sample_size | specifies the number of sample values between min and max for which the error is computed and plotted. The default value is max-min . |
Definition at line 452 of file Assessment.m.
function Postprocess.StochasticAssessment.Assessment.init_random_sampling | ( | mu_set_size, | |
seed | |||
) |
generates the initial random sample set M_test
mu_set_size | number of parameters in the sample Default: 100 |
seed | a random seed for initialization of the random generator (Default = random value initialized with clock) |
Definition at line 423 of file Assessment.m.
|
static |
a wrapper around the IReducedModel.rb_simulation() measuring the execution time
varargin | varargin |
rb_sim_data | the reduced simulation data |
tictoc | execution time |
Definition at line 512 of file Assessment.m.
function Postprocess.StochasticAssessment.Assessment.update_rmodel | ( | plot_field, | |
new_value | |||
) |
updates the reduced model, i.e. applies the changes defined by the plot_fields attribute
plot_field | an entry in plot_fields, if it is empty, a coupling of N and M is assured. |
new_value | the new value it should be set to. |
Definition at line 483 of file Assessment.m.
Postprocess.StochasticAssessment.Assessment.compute_conditions = false |
boolean value determining whether the condition numbers of the system matrices shall be computed
Default: false
Definition at line 117 of file Assessment.m.
Postprocess.StochasticAssessment.Assessment.compute_errors = false |
boolean value determining whether the "true" error \(\|u_h(\mu) - u_{\text{red}}(\mu)\|_{{\cal W}_h}\) shall be computed
Default: false
Definition at line 107 of file Assessment.m.
Postprocess.StochasticAssessment.Assessment.compute_estimates = false |
boolean value determining whether error estimates shall be computed
Default: false
Definition at line 98 of file Assessment.m.
Postprocess.StochasticAssessment.Assessment.detailed_data |
the underlying detailed data
Dependent
set to true. Definition at line 188 of file Assessment.m.
Postprocess.StochasticAssessment.Assessment.follow_refinement_steps = false |
boolean value indicating whether the refinement steps of the reduced basis generation by Greedy.TrainingSetAdaptation shall be taken into account
This option is only useful if
Default: false
Definition at line 127 of file Assessment.m.
Postprocess.StochasticAssessment.Assessment.M_by_N_ratio = 1 |
if M and N are couple this value specifies the constant for the coupling.
A value of zero means \(M_{\max} / N_{\max}\)
Default: 1
Definition at line 144 of file Assessment.m.
Postprocess.StochasticAssessment.Assessment.M_test |
an parameter sampling object
Default: is a random sampling with 10 elements and seed 654321;
Definition at line 64 of file Assessment.m.
Postprocess.StochasticAssessment.Assessment.plot_field_descr = {""} |
is a cell array of description texts for the plot fields. If this field is not set it is set to plot_fields
.
Default: {""}
Definition at line 76 of file Assessment.m.
Postprocess.StochasticAssessment.Assessment.plot_fields = {"[]"} |
is a vector of field names with at most 2 elements over which the error landscape is computed or a cell with empty entries.
A reasonable choice would be '{ 'N', 'M' }'. The error landscape is plotted over a variation of these fields specified by samples. In case of an empty cell entry, N
and M
are coupled by the fixed ratio M_by_N_ratio and samples should be a vector of coupling constant between 0 and 1.
Default: = {[]}
Definition at line 36 of file Assessment.m.
Postprocess.StochasticAssessment.Assessment.rsamples |
the "real" collection of vectors used for the plot_fields variation
Dependent
set to true. Definition at line 175 of file Assessment.m.
Postprocess.StochasticAssessment.Assessment.run_name |
character string specifying this test run. The string should be unique for every parameter combination.
Default: rmodel.name + _stoachastic_assessment
;
Definition at line 87 of file Assessment.m.
Postprocess.StochasticAssessment.Assessment.samples = {"(0.1:0.1:1)"} |
is a cell array of scalar row vectors. The scalar values are plot_field
values for which the error is computed and tested.
Default: = {[0.1:0.1:1]}
Definition at line 53 of file Assessment.m.