annotate operator_def/assemble_D2.m @ 830:e15a667ffde2
feature/operator_files
Add quadrature stencils and operator assembly. Add tests
author |
Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
date |
Mon, 10 Sep 2018 19:27:27 +0200 |
parents |
e0913772dc1c |
children |
|
rev |
line source |
829
|
1 function [D2,e_l,e_r,d1_l,d1_r] = assemble_D2(stencil,h,m)
|
|
2 stencil_variables = read_stencil(stencil);
|
|
3 D2 = assemble_op(stencil_variables.inner_stencil,stencil_variables.boundary_stencils,m,1)/h^2;
|
|
4 [e_l, e_r] = assemble_boundary_op(stencil_variables.e,m);
|
|
5 [d1_l, d1_r] = assemble_boundary_op(stencil_variables.d1,m);
|
|
6 d1_l = d1_l/h;
|
|
7 d1_r = -d1_r/h;
|
|
8 end |