rbmatlab 0.10.01
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes

Detailed Description

This is the common interface for all models, detailed and reduced ones.

Definition at line 1 of file IModel.m.

Inheritance diagram for IModel:
Inheritance graph
[legend]

List of all members.

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 $\mu \in {\cal M}$
virtual function mu get_mu ()
 returns the active parameter vector $\boldsymbol\mu \in {\cal M}$
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()

Member Function Documentation

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.

Parameters:
model_datamodel data
Return values:
sim_datastructure holding the $H$-dimensional simulation data.

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.

Return values:
model_dataMatlab 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 $\boldsymbol\mu \in {\cal M}$

Return values:
muThe parameter vector $\boldsymbol\mu$

Implemented in LinEvolDune.DetailedModel, LinEvolDune.ReducedModel, IDetailedModel, IReducedModel, ThermalBlock.DetailedModel, LebesgueTest.DetailedModel, and LebesgueTest.ReducedModel.

function ispr = IModel.isfield (   field)

compatibility helper: forwards call to isprop function and makes class look like a structure.

Parameters:
fieldfield
Return values:
isprispr

Definition at line 223 of file IModel.m.

function IDetailedModel this = IModel.set_mu (   mu) [pure virtual]

sets the active parameter vector $\mu \in {\cal M}$

The parameter set here, is used by the detailed_simulation() function.

Parameters:
muThe parameter vector $\boldsymbol\mu$.
Return values:
thishandle 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

The following checks can be executed
  • 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.
Parameters:
descrThe structure to be checked.
checksA structure defining which of the above described checks shall be executed.
  • All fieldnames fn of this structure are used for definition checks def(fn).
  • The field values must be set to a cell array whose first element is set to a function pointer typecheck used for a mandatory check type(fn, typecheck).
  • The following fields of the cell array are strings defining a check followed by an optional and fixed number of arguments for this check. Possible command strings are:
    • values followed by one argument candidates executing the check values(fn, candidates).
    • minmax followed by one argument range executing the check minmax(fn, range).
    • own followed by two arguments usr_check and msg executing the check own(fn, usr_check, msg).
Return values:
okboolean flag indicating whether all checks passed.
Note:
This method has the MATLAB method attribute Hidden set to true.
matlab documentation of method attributes.

Definition at line 238 of file IModel.m.


Member Data Documentation

an integer defining the debugging level controlling error output and extra tests during basis generation


Default: 0

Definition at line 124 of file IModel.m.

Decomposition operation mode.

A scalar flag indicating the operation mode of functions
  • 0 (complete) : no affine parameter dependence or decomposition is performed.
  • 1 (components) : for each output argument a cell array of output matrices is returned representing the $q$-th component independent of the parameters given in mu_names.
  • 2 (coefficients) : returns a vector where each coordinate represents the $q$-the coefficient $\boldsymbol\sigma_{\cdot}^{q}(\boldsymbol\mu)$ dependent on the parameters given in mu_names.

This flag is only needed if the detailed model makes use of affinely parameter dependent functions.


Default: 0

Definition at line 49 of file IModel.m.

The number of CPUs used for parallel sessions.

Todo:
: This flag should move to the FakeMPI sigleton control structure.


Default: 4

Definition at line 37 of file IModel.m.

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

unless they are specified explicitly by the description structure.

Definition at line 74 of file IModel.m.

Initial value:
 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'}} \ ")

Definition at line 14 of file IModel.m.

an integer defining the verbosity level of information output during basis generation


Default: 0

Definition at line 114 of file IModel.m.


The documentation for this class was generated from the following file:
All Classes Namespaces Files Functions Variables