annotate operator_def/assemble_boundary_op.m @ 823:5c8b1a3bd0e6 feature/operator_files

rename boundart_stencil and and boundary_block to boundary_stencils
author Ylva Rydin <ylva.rydin@telia.com>
date Mon, 10 Sep 2018 17:28:15 +0200
parents 4808c4bd844e
children ed8d34894589
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
822
4808c4bd844e Add assemble_boundary_op
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
1 function [op_l, op_r] = assemble_boundary_op(op,m)
4808c4bd844e Add assemble_boundary_op
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
2 l = length(op);
4808c4bd844e Add assemble_boundary_op
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
3
4808c4bd844e Add assemble_boundary_op
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
4 op_l = sparse(m,1);
4808c4bd844e Add assemble_boundary_op
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
5 op_l(1:l) = op;
4808c4bd844e Add assemble_boundary_op
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
6
4808c4bd844e Add assemble_boundary_op
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
7 op_r = sparse(m,1);
4808c4bd844e Add assemble_boundary_op
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
8 op_r(m-l+l:m) = flipr(op);
4808c4bd844e Add assemble_boundary_op
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
9 end