rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
stokes_fd_nl_operator.m
Go to the documentation of this file.
1 function A = stokes_fd_nl_operator(model, model_data)
2 %function A = stokes_fd_nl_operator(model, model_data)
3 % Evaluation of the Frechet-derivative of nonlinear Navier-Stokes problems
4 % for the approximation of the inf-sup constant.
5 
6 A = model.operators(model, model_data);
7 
8 if model.decomp_mode < 2
9 
10  sim_data = detailed_simulation(model, model_data);
11  model.uh = sim_data.uh;
12 
13  A_nl1 = Fem.Assembly.matrix_part(...
14  @Fem.IntegralKernels.stokes_volume_matrix, model, model_data.df_info);
15 
16  A_nl2 = Fem.Assembly.matrix_part(...
17  @Fem.IntegralKernels.stokes_matrix_fd_nl, model, model_data.df_info);
18 
19  % do not care about dirichlet nodes, as they are deleted later
20 
21  if model.decomp_mode == 0
22 
23  A = A + A_nl1 + A_nl2;
24  else
25 
26  for q = 1:length(A)
27  A{q} = A{q} + A_nl1{q} + A_nl2{q};
28  end
29  end
30 
31 end
32 
33 end