rbmatlab 0.10.01
|
This is the common interface for all models, detailed and reduced ones.
Public Member Functions | |
virtual function ModelData model_data = | gen_model_data () |
generates large model data. | |
virtual function
sim_data = | detailed_simulation ( model_data) |
executes a detailed simulation for a given parameter | |
virtual function IDetailedModel this = | set_mu ( mu) |
sets the active parameter vector ![]() | |
virtual function mu = | get_mu () |
returns the active parameter vector ![]() | |
function ispr = | isfield ( field) |
compatibility helper: forwards call to isprop function and makes class look like a structure. | |
Static Public Member Functions | |
static function ok = | struct_check ( descr, checks) |
executes checks on the fields of a structure object | |
Public Attributes | |
num_cpus = 4 | |
The number of CPUs used for parallel sessions. | |
decomp_mode = 0 | |
Decomposition operation mode. | |
rb_problem_type | |
A string identifier for the RB problem type. | |
mu_names | |
cell array of strings describing the parameters of the model | |
mu_ranges | |
cell array of vectors of size two defining the allowed interval range for the parameter components | |
verbose = 0 | |
an integer defining the verbosity level of information output during basis generation | |
debug = 0 | |
an integer defining the debugging level controlling error output and extra tests during basis generation | |
dmodel_constructor | |
IDetailedModel object. | |
detailed_data_constructor | |
object, when a reduced basis space needs to be generated. | |
reduced_data_constructor | |
object. | |
rmodel_constructor | |
object. | |
Static Public Attributes | |
static const | time_checks |
This constant can be used for a consistency check of time evolution members in the ModelDescr with help of IModel.struct_check() |
function sim_data = IModel.detailed_simulation | ( | model_data | ) | [pure virtual] |
executes a detailed simulation for a given parameter
This function computes a numerical scheme defined by a ModelDescr for the parameter set via the set_mu() method.
model_data | model data |
sim_data | structure holding the ![]() |
Implemented in IDetailedModel, and IReducedModel.
function ModelData model_data = IModel.gen_model_data | ( | ) | [pure virtual] |
generates large model data.
This function generates e.g. a grid, which is not to be stored in the model, but required for numerics.
model_data | Matlab structure storing high dimensional data needed by detailed_simulation(). |
Implemented in LinEvol.DetailedModel, LinEvolDune.DetailedModel, LinStat.DetailedModel, NonlinEvol.DetailedModel, TwoPhaseFlow.DetailedModel, Test.DetailedModel, IDetailedModel, IReducedModel, and LebesgueTest.DetailedModel.
function mu = IModel.get_mu | ( | ) | [pure virtual] |
returns the active parameter vector
mu | The parameter vector ![]() |
Implemented in LinEvolDune.DetailedModel, LinEvolDune.ReducedModel, IDetailedModel, IReducedModel, ThermalBlock.DetailedModel, LebesgueTest.DetailedModel, and LebesgueTest.ReducedModel.
function ispr = IModel.isfield | ( | field | ) |
function IDetailedModel this = IModel.set_mu | ( | mu | ) | [pure virtual] |
sets the active parameter vector
The parameter set here, is used by the detailed_simulation() function.
mu | The parameter vector ![]() |
this | handle to the changed DetailedModel |
Implemented in LinEvolDune.DetailedModel, LinEvolDune.ReducedModel, IDetailedModel, IReducedModel, ThermalBlock.DetailedModel, LebesgueTest.DetailedModel, and LebesgueTest.ReducedModel.
function ok = IModel.struct_check | ( | descr, | |
checks | |||
) | [static] |
executes checks on the fields of a structure object
This function can be used to check whether the structure descr
fulfills some constraints defined by the second argument checks
def(fn)
: Checks whether a field fn
exists and is set to a non-empty value.type(fn, typecheck)
: Checks whether the field fn
fullfils a typecheck defined by a function isokay = typecheck(X)
Useful choices for typecheck
are e.g. @isscalar, @iscell, @isstruct
values(fn, candidates)
: Checks whether the field fn
is set to one of the values given by the cell array of strings candidates
minmax(fn, range)
: Checks whether the field fn
is set to a value in a given range range
, which is a 2-dimensional vector.own(fn, usr_check, msg)
: Checks whether the field fn
is set to a value that fulfills a user-defined check isokay = usr_check(descr)
. If it fails, a message msg
is printed for explanation.descr | The structure to be checked. |
checks | A structure defining which of the above described checks shall be executed.
|
ok | boolean flag indicating whether all checks passed. |
Hidden
set to true. IModel.debug = 0 |
Decomposition operation mode.
mu_names
.mu_names
.This flag is only needed if the detailed model makes use of affinely parameter dependent functions.
Default: 0
IModel.num_cpus = 4 |
A string identifier for the RB problem type.
Usually this is the package name where all your interface classes are situated, i.e. RbProblemType.DetailedModel
, RbProblemType.ReducedModel
, RbProblemType.DetailedData
and RbProblemType.ReducedData
.
The gen_reduced_model() function automatically sets the pointers of the properties
RbProblemType.DetailedModel
RbProblemType.ReducedModel
RbProblemType.DetailedData
andRbProblemType.ReducedData
unless they are specified explicitly by the description structure.
IModel.time_checks [static] |
struct("'t', {{\@isscalar}}, \ 'tstep', {{\@isscalar}}, \ 'nt', {{\@isscalar}}, \ 'dt', {{\@isscalar, \ 'own', \@(model) model.dt == model.T/model.nt, \ 'model.dt ~= model.T/model.nt'}} \ ")
This constant can be used for a consistency check of time evolution members in the ModelDescr with help of IModel.struct_check()
Default: struct("'t', {{@isscalar}}, \ 'tstep', {{@isscalar}}, \ 'nt', {{@isscalar}}, \ 'dt', {{@isscalar, \ 'own', @(model) model.dt == model.T/model.nt, \ 'model.dt ~= model.T/model.nt'}} \ ")
IModel.verbose = 0 |