Detailed model for a linear evolution problem with a Finite volume discretization.
This is a detailed model for a problem of the type
\begin{align} \partial_t u(x;t,\mu) - {\cal L}(t,\mu)[u(x,t;\mu)] &= 0 \qquad &\text{in }& \Omega \times [0, T], \\\ u(x;0,\mu) &= u_0(x;\mu) \qquad &\text{in }& \Omega \times \{0\} \end{align}
with suitable boundary conditions and linear operators \({\cal L}(t,\mu) : {\cal W} \to {\cal W}\) parametrized over the time-parameter domain \([0,T] \times {\cal M}\).
The numerical scheme for the numerical solution of this problem is assumed to be of the following type:
\begin{align*} u_h(\cdot;t^0,\mu) &= {\cal M}_h[u_0] \\\ \left(\text{Id} - \Delta t^k {\cal L}_{h, I}(t^{k+1},\mu)\right)[u_h(\cdot;t^{k+1},\mu)] &= \left(\text{Id} + \Delta t^k {\cal L}_{h, E}(t^{k},\mu)\right)[u_h(\cdot;t^{k},\mu)] \end{align*}
with the following ingredients:
\begin{align*} {\cal L}_{h, *}(t,\mu) &= \sum_{q=1}^{q_*} \sigma_*^q(\mu) {\cal L}^q_{h, *}(t) \\\ u_0(x;\mu) &= \sum_{q=1}^{u_0} \sigma_{u_0}^q(\mu) u_0(x) \end{align*}
andDefinition at line 18 of file DetailedModel.m.
Public Member Functions | |
DetailedModel (descr) | |
constructor based on problem description More... | |
function IDetailedModel this = | set_mu (mu) |
sets the active parameter vector \(\mu \in {\cal M}\) More... | |
function mu = | get_mu () |
returns the active parameter vector \(\boldsymbol\mu \in {\cal M}\) More... | |
function
sim_data = | detailed_simulation (ModelData model_data) |
function ModelData model_data = | gen_model_data () |
generates large model data. More... | |
function p = | plot_sim_data (ModelData model_data, sim_data, plot_params) |
Public Member Functions inherited from Greedy.User.FVDetailedModelDefault | |
FVDetailedModelDefault (ModelDescr descr) | |
Constructor for this class. More... | |
function UON = | orthonormalize (ModelData model_data, U) |
orthonormalizes a set of discrete functions \(\{ v_h^l \}_{l=1}^L\) More... | |
function U0 = | init_values_algorithm (ModelData model_data) |
computes the Dof vectors for the initial value function \(u_h^0(\cdot;t\mu) = {\cal P}_h[u_0(\mu)]\) More... | |
function UV = | inner_product (ModelData model_data, U, V) |
computes the inner project between the Dof vectors of two discrete functions More... | |
Public Member Functions inherited from Greedy.User.IDetailedModel | |
IDetailedModel (descr) | |
constructor More... | |
Public Member Functions inherited from IDetailedModel | |
IDetailedModel (descr) | |
constructor More... | |
function
isequal = | eq (IDetailedModel other) |
overloaded equality (== ) operator, by default comparing the descr variables More... | |
function IDetailedModel this = | set_mu (mu) |
sets the active parameter vector \(\mu \in {\cal M}\) More... | |
function mu = | get_mu () |
returns the active parameter vector \(\boldsymbol\mu \in {\cal M}\) More... | |
virtual function
sim_data = | detailed_simulation (model_data) |
executes a detailed simulation for a given parameter More... | |
virtual function p = | plot_sim_data (model_data, sim_data, plot_params) |
plots the simulation data as returned by detailed_simulation() More... | |
Static Public Member Functions | |
static function U = | get_dofs_from_sim_data (sim_data) |
extracts the \(H\) dimensional Dof vector from the sim_data structure More... | |
static function U = | get_dofs_at_time (sim_data, time) |
static function | issue_plot_command (plot_dir, command) |
static function | close_figure_and_vtk_plot (src, event) |
Static Public Member Functions inherited from Greedy.User.FVDetailedModelDefault | |
static function errs = | l2_error_sequence_algorithm (U, Uapprox,ModelData model_data) |
computes the \(L^2(\Omega)\) error for each "snapshot" of a trajectories and returns the sequence of these errors. More... | |
static function errs = | linfty_error_sequence_algorithm (U, Uapprox,ModelData model_data) |
computes the \(L^{\infty}(\Omega)\) error for each "snapshot" of a trajectories and returns the sequence of these errors. More... | |
static function W = | get_inner_product_matrix (ModelData model_data) |
returns the inner product matrix for efficient computation of inner products on \({\cal W}_h\) More... | |
Static Public Member Functions inherited from IModel | |
static function ok = | struct_check (descr, checks) |
executes checks on the fields of a structure object More... | |
Static Public Attributes | |
static const | ddescr_checks |
This constant is used for a consistency check of the model descr with help of Greedy.Remove.IDetailedModelBase.struct_check() More... | |
Static Public Attributes inherited from IDetailedModel | |
static const | base_checks |
this structure holds variable names that need to be defined by the descr structure. More... | |
Static Public Attributes inherited from IModel | |
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() More... | |
Additional Inherited Members | |
Public Attributes inherited from IDetailedModel | |
descr | |
The description structure holding information about the analytical parametrized problem and its discretization. More... | |
decomp_mode | |
mu_names | |
cell array of strings describing the parameters of the model More... | |
mu_ranges | |
cell array of vectors of size two defining the allowed interval range for the parameter components More... | |
verbose | |
an integer defining the verbosity level of information output during basis generation More... | |
debug | |
an integer defining the debugging level controlling error output and extra tests during basis generation More... | |
Public Attributes inherited from IModel | |
num_cpus = 4 | |
The number of CPUs used for parallel sessions. More... | |
decomp_mode | |
Decomposition operation mode. More... | |
mu_names | |
cell array of strings describing the parameters of the model More... | |
mu_ranges | |
cell array of vectors of size two defining the allowed interval range for the parameter components More... | |
verbose | |
an integer defining the verbosity level of information output during basis generation More... | |
debug | |
an integer defining the debugging level controlling error output and extra tests during basis generation More... | |
LinEvolDune.DetailedModel.DetailedModel | ( | descr | ) |
constructor based on problem description
descr | structure describing the problem and the descretization |
Definition at line 79 of file DetailedModel.m.
|
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(). |
Implements IDetailedModel.
Definition at line 138 of file DetailedModel.m.
|
staticvirtual |
extracts the \(H\) dimensional Dof vector from the sim_data
structure
sim_data | matlab struct with simulation data generated e.g. by detailed_simulation() or rb_reconstruction() methods. |
U | \(H\) dimensional Dof vector |
Implements Greedy.User.IDetailedModel.
Definition at line 184 of file DetailedModel.m.
|
virtual |
returns the active parameter vector \(\boldsymbol\mu \in {\cal M}\)
The default implementation returns a vector of the values of the fields of the descr structure with names descr.mu_names
.
mu | The parameter vector \(\boldsymbol\mu\) |
Implements IModel.
Definition at line 117 of file DetailedModel.m.
|
virtual |
sets the active parameter vector \(\mu \in {\cal M}\)
The parameter set here, is used by the detailed_simulation() function.
The default implementation sets all fieldnames descr.mu_names
in the descr struct.
mu | The parameter vector \(\boldsymbol\mu\). |
this | handle to the changed DetailedModel |
Implements IModel.
Definition at line 94 of file DetailedModel.m.
|
static |
This constant is used for a consistency check of the model descr with help of Greedy.Remove.IDetailedModelBase.struct_check()
Default: struct(" \ 'mass_matrix', {{@(x) isequal(class(x), 'function_handle')}} \ ")
Definition at line 63 of file DetailedModel.m.