rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
fv_implicit_space.m
Go to the documentation of this file.
1 function [INC, b_I] = fv_implicit_space(model,model_data,U,NU_ind)
2 % function INC =
3 % fv_implicit_space(model, model_data, U, [NU_ind])
4 %
5 % function applying an FV-space-discretization operator starting from old
6 % values U corresponding to the geometry given in grid producing a
7 % new vector of elementwise scalars NU but only on for the
8 % subelements with numbers given in NU_ind. If NU_ind is empty, all
9 % new values NU are determined, i.e. length(NU) = length(U) =
10 % grid.nelements
11 %
12 % By this, the operator evaluation can be performed in a localized
13 % way, i.e. used for empirical interpolation in rb_nonlin_evol_simulation
14 %
15 % usual timestepping can be performed afterwards by (NU = Id - deltat *
16 % INC).
17 %
18 % required fields of model:
19 % verbose : a verbosity level
20 % convective_discretization: if set to 'explicit', this operator discretizes
21 % the convective part of the scheme
22 % diffusive_discretization : if set to 'explicit', this operator discretizes
23 % the diffusive part of the scheme
24 % reaction_discretization : if set to 'explicit', this operator discretizes
25 % the reaction term of the scheme
26 %
27 % optional fields of model_data:
28 % implicit_operator : cached operator
29 % implicit_constant : cached affine shift vector
30 
31 % Martin Drohmann 9.12.2007 based on fv_conv_explicit_space by Bernard
32 % Haasdonk
33 
34 weights.diff_weight = model.fv_impl_diff_weight;
35 weights.conv_weight = model.fv_impl_conv_weight;
36 weights.react_weight = model.fv_impl_react_weight;
37 
38 if isfield(model, 'model_type') ...
39  && isequal(model.model_type, 'implicit_nonaffine_linear')
40  if isfield(model_data, 'implicit_operator') && isfield(model_data, 'implicit_constant')
41  L_I = model_data.implicit_operator;
42  b_I = model_data.implicit_constant;
43  else
44  [L_I, b_I] = model.operators_diff_implicit(model, model_data, NU_ind);
45  end
46  INC = L_I * U;
47 else
48  [INC, b_I] = fv_space_operator(model,model_data,U,NU_ind,weights);
49 end
50 
51 
function r = verbose(level, message, messageId)
This function displays messages depending on a message-id and/or a level. Aditionally you can set/res...
Definition: verbose.m:17
function [ INC , b_I ] = fv_implicit_space(model, model_data, U, NU_ind)
fv_implicit_space(model, model_data, U, [NU_ind])
function INC = fv_conv_explicit_space(U, NU_ind,gridbase grid, params)
fv_conv_explicit_space(U,NU_ind,grid,params) function applying an FV-space-discretization operator st...
function [ INC , fluxes ] = fv_space_operator(model, model_data, U, NU_ind, weights)
fv_space_operator(model,model_data,U,NU_ind,grid,weights)