rbmatlab  1.13.10
 All Classes Namespaces Files Functions Variables Groups Pages
List of all members | Public Member Functions | Static Public Member Functions
Greedy.User.FVDetailedModelDefault Class Reference

Detailed Description

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.

Inheritance diagram for Greedy.User.FVDetailedModelDefault:
Inheritance graph
[legend]
Collaboration diagram for Greedy.User.FVDetailedModelDefault:
Collaboration graph
[legend]

Public Member Functions

 FVDetailedModelDefault (ModelDescr descr)
 Constructor for this class.
 
function UON = orthonormalize (ModelData model_data, U)
 orthonormalizes a set of discrete functions \(\{ v_h^l \}_{l=1}^L\)
 
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)]\)
 
function UV = inner_product (ModelData model_data, U, V)
 computes the inner project between the Dof vectors of two discrete functions
 
- Public Member Functions inherited from Greedy.User.IDetailedModel
 IDetailedModel (descr)
 constructor
 
- Public Member Functions inherited from IDetailedModel
 IDetailedModel (descr)
 constructor
 
function
isequal = 
eq (IDetailedModel other)
 overloaded equality (==) operator, by default comparing the descr variables
 
function IDetailedModel this = set_mu (mu)
 sets the active parameter vector \(\mu \in {\cal M}\)
 
function mu = get_mu ()
 returns the active parameter vector \(\boldsymbol\mu \in {\cal M}\)
 
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 p = plot_sim_data (model_data, sim_data, plot_params)
 plots the simulation data as returned by detailed_simulation()
 

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.
 
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.
 
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\)
 
- 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
 
static function
snapshot = 
get_dofs_at_time (sim_data, time_index)
 

Additional Inherited Members

- Public Attributes inherited from IDetailedModel
 descr
 The description structure holding information about the analytical parametrized problem and its discretization.
 
 decomp_mode
 
 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
 an integer defining the verbosity level of information output during basis generation
 
 debug
 an integer defining the debugging level controlling error output and extra tests during basis generation
 
- Static Public Attributes inherited from IDetailedModel
static const  base_checks
 this structure holds variable names that need to be defined by the descr structure.
 

Constructor & Destructor Documentation

Greedy.User.FVDetailedModelDefault.FVDetailedModelDefault ( ModelDescr  descr)

Constructor for this class.

Parameters
descrstructure

Definition at line 34 of file FVDetailedModelDefault.m.

Member Function Documentation

function W = Greedy.User.FVDetailedModelDefault.get_inner_product_matrix ( ModelData  model_data)
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\).

Parameters
model_dataMatlab structure storing (possibly) high dimensional data needed by IDetailedModel.detailed_simulation().
Return values
WThe matrix \(W\)

Implements Greedy.User.IDetailedModel.

Definition at line 127 of file FVDetailedModelDefault.m.

function U0 = Greedy.User.FVDetailedModelDefault.init_values_algorithm ( ModelData  model_data)
virtual

computes the Dof vectors for the initial value function \(u_h^0(\cdot;t\mu) = {\cal P}_h[u_0(\mu)]\)

Parameters
model_dataMatlab structure storing (possibly) high dimensional data needed by IDetailedModel.detailed_simulation().
Return values
U0the 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.

function UV = Greedy.User.FVDetailedModelDefault.inner_product ( ModelData  model_data,
  U,
  V 
)
virtual

computes the inner project between the Dof vectors of two discrete functions

Parameters
UDof vector of first discrete function \(u_h\)
VDof vector of second discrete function \(v_h\)
model_dataMatlab structure storing (possibly) high dimensional data needed by IDetailedModel.detailed_simulation().
Return values
UVDof 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.

function errs = Greedy.User.FVDetailedModelDefault.l2_error_sequence_algorithm (   U,
  Uapprox,
ModelData  model_data 
)
staticvirtual

computes the \(L^2(\Omega)\) error for each "snapshot" of a trajectories and returns the sequence of these errors.

Parameters
Ufirst sequence of Dof vectors of discrete functions \(\{u_h^k\}_{k=0}^K\) stored in a H x K+1 matrix
Uapproxsecond sequence of Dof vectors of functions \(\{v_h^k\}_{k=0}^K\) stored in a H x K+1 matrix
model_dataMatlab structure storing (possibly) high dimensional data needed by IDetailedModel.detailed_simulation().
Return values
errssequence 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.

function errs = Greedy.User.FVDetailedModelDefault.linfty_error_sequence_algorithm (   U,
  Uapprox,
ModelData  model_data 
)
staticvirtual

computes the \(L^{\infty}(\Omega)\) error for each "snapshot" of a trajectories and returns the sequence of these errors.

Parameters
Ufirst sequence of Dof vectors of discrete functions \(\{u_h^k\}_{k=0}^K\) stored in a H x K+1 matrix
Uapproxsecond sequence of Dof vectors of functions \(\{v_h^k\}_{k=0}^K\) stored in a H x K+1 matrix
model_dataMatlab structure storing (possibly) high dimensional data needed by IDetailedModel.detailed_simulation().
Return values
errssequence 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.

function UON = Greedy.User.FVDetailedModelDefault.orthonormalize ( ModelData  model_data,
  U 
)
virtual

orthonormalizes a set of discrete functions \(\{ v_h^l \}_{l=1}^L\)

Parameters
UThe Dof vectors for the set of discrete functions
model_dataMatlab structure storing (possibly) high dimensional data needed by IDetailedModel.detailed_simulation().
Return values
UONThe 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.


The documentation for this class was generated from the following file: