Mercurial > repos > public > sbplib
annotate operator_def/assemble_D2.m @ 829:e0913772dc1c feature/operator_files
Add D2 files
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Mon, 10 Sep 2018 19:25:41 +0200 |
parents | |
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 |