Interface specialization of an IDetailedModel ready to use with Greedy algorithms for (time dependent) Finite volume discretizations.
Definition at line 19 of file FVDetailedModelDefault.m.
Public Member Functions | |
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 ModelData model_data = | gen_model_data () |
generates large model data. 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 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 Greedy.User.IDetailedModel | |
static function U = | get_dofs_from_sim_data (sim_data) |
extracts the \(H\) dimensional Dof vector from the sim_data structure More... | |
static function
snapshot = | get_dofs_at_time (sim_data, time_index) |
Static Public Member Functions inherited from IModel | |
static function ok = | struct_check (descr, checks) |
executes checks on the fields of a structure object 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... | |
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... | |
Greedy.User.FVDetailedModelDefault.FVDetailedModelDefault | ( | ModelDescr | descr | ) |
Constructor for this class.
descr | structure |
Definition at line 34 of file FVDetailedModelDefault.m.
|
staticvirtual |
returns the inner product matrix for efficient computation of inner products on \({\cal W}_h\)
The matrix \(W\) returned can be used to compute an inner product
\[\langle u_h, v_h\rangle_{{\cal W}_h} = U^t W V\]
where \(U, V\) are the Dof vectors of the discrete functions \(u_h, v_h\in {\cal W}_h\).
model_data | Matlab structure storing (possibly) high dimensional data needed by IDetailedModel.detailed_simulation(). |
W | The matrix \(W\) |
Implements Greedy.User.IDetailedModel.
Definition at line 127 of file FVDetailedModelDefault.m.
|
virtual |
computes the Dof vectors for the initial value function \(u_h^0(\cdot;t\mu) = {\cal P}_h[u_0(\mu)]\)
model_data | Matlab structure storing (possibly) high dimensional data needed by IDetailedModel.detailed_simulation(). |
U0 | the Dof vector of the initial value projection |
This calls the function pointer defined in the descr structure field init_values_algorithm
.
Implements Greedy.User.IDetailedModel.
Definition at line 69 of file FVDetailedModelDefault.m.
|
virtual |
computes the inner project between the Dof vectors of two discrete functions
U | Dof vector of first discrete function \(u_h\) |
V | Dof vector of second discrete function \(v_h\) |
model_data | Matlab structure storing (possibly) high dimensional data needed by IDetailedModel.detailed_simulation(). |
UV | Dof vector of innter product \(\langle u_h, v_h \rangle_{{\cal W}_h}\) |
This uses the W
=get_inner_product_matrix() method in order to compute the inner product \(\langle u_h, v_h \rangle = U' W V\)
Implements Greedy.User.IDetailedModel.
Definition at line 83 of file FVDetailedModelDefault.m.
|
staticvirtual |
computes the \(L^2(\Omega)\) error for each "snapshot" of a trajectories and returns the sequence of these errors.
U | first sequence of Dof vectors of discrete functions \(\{u_h^k\}_{k=0}^K\) stored in a H x K+1 matrix |
Uapprox | second sequence of Dof vectors of functions \(\{v_h^k\}_{k=0}^K\) stored in a H x K+1 matrix |
model_data | Matlab structure storing (possibly) high dimensional data needed by IDetailedModel.detailed_simulation(). |
errs | sequence of errors \(\{ \| u_h^k - v_h^k \|_{L^2(\Omega)} \}_{k=0}^{K}\) stored in a K+1 x 1 vector |
This function calls fv_l2_error()
Implements Greedy.User.IDetailedModel.
Reimplemented in TwoPhaseFlow.DetailedModel.
Definition at line 101 of file FVDetailedModelDefault.m.
|
staticvirtual |
computes the \(L^{\infty}(\Omega)\) error for each "snapshot" of a trajectories and returns the sequence of these errors.
U | first sequence of Dof vectors of discrete functions \(\{u_h^k\}_{k=0}^K\) stored in a H x K+1 matrix |
Uapprox | second sequence of Dof vectors of functions \(\{v_h^k\}_{k=0}^K\) stored in a H x K+1 matrix |
model_data | Matlab structure storing (possibly) high dimensional data needed by IDetailedModel.detailed_simulation(). |
errs | sequence of errors \(\{ \| u_h^k - v_h^k \|_{L^{\infty}(\Omega)} \}_{k=0}^{K}\) stored in a K+1 x 1 vector |
This function calls fv_linfty_error();
Implements Greedy.User.IDetailedModel.
Definition at line 114 of file FVDetailedModelDefault.m.
|
virtual |
orthonormalizes a set of discrete functions \(\{ v_h^l \}_{l=1}^L\)
U | The Dof vectors for the set of discrete functions |
model_data | Matlab structure storing (possibly) high dimensional data needed by IDetailedModel.detailed_simulation(). |
UON | The Dof vectors of the orthonormalized set of discrete functions. |
This implements an orthonormalization with help of the QR method.
Implements Greedy.User.IDetailedModel.
Definition at line 53 of file FVDetailedModelDefault.m.