Mercurial > repos > public > sbplib
comparison +scheme/Beam.m @ 239:ba56e0d621f2 feature/beams
Beam: Added ability to pick alphaII and alphaIII to control tau and sigma.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 28 Jul 2016 12:50:43 +0200 |
parents | 8592358a3935 |
children | 46256fffa329 |
comparison
equal
deleted
inserted
replaced
238:5f75d7094983 | 239:ba56e0d621f2 |
---|---|
17 delt | 17 delt |
18 interface_tuning | 18 interface_tuning |
19 end | 19 end |
20 | 20 |
21 methods | 21 methods |
22 function obj = Beam(grid, order, alpha, opsGen, interface_tuning) | 22 function obj = Beam(grid, order, alpha, opsGen, interface_tuning, alphaII, alphaIII) |
23 default_arg('alpha', -1); | 23 default_arg('alpha', -1); |
24 default_arg('interface_tuning', 1.1); | 24 default_arg('interface_tuning', 1.1); |
25 default_arg('alphaII', []) | |
26 default_arg('alphaIII', []) | |
25 | 27 |
26 % default_arg('opsGen', @sbp.Higher); | 28 % default_arg('opsGen', @sbp.Higher); |
27 default_arg('opsGen', @sbp.HigherCompatibleVariable); % Supposed to be better | 29 default_arg('opsGen', @sbp.HigherCompatibleVariable); % Supposed to be better |
28 | 30 |
29 if ~isa(grid, 'grid.Cartesian') || grid.D() ~= 1 | 31 if ~isa(grid, 'grid.Cartesian') || grid.D() ~= 1 |
53 obj.d3_l = sparse(ops.boundary.S3_1); | 55 obj.d3_l = sparse(ops.boundary.S3_1); |
54 obj.d3_r = sparse(ops.boundary.S3_m); | 56 obj.d3_r = sparse(ops.boundary.S3_m); |
55 | 57 |
56 obj.D = alpha*D4; | 58 obj.D = alpha*D4; |
57 | 59 |
58 obj.gamm = h*ops.borrowing.N.S2/2; | 60 if isempty(alphaII) && isempty(alphaIII) |
59 obj.delt = h^3*ops.borrowing.N.S3/2; | 61 alphaII = ops.borrowing.N.S2/2; |
62 alphaIII = ops.borrowing.N.S3/2; | |
63 end | |
64 | |
65 obj.gamm = h*alphaII; | |
66 obj.delt = h^3*alphaIII; | |
60 obj.interface_tuning = interface_tuning; | 67 obj.interface_tuning = interface_tuning; |
61 end | 68 end |
62 | 69 |
63 | 70 |
64 % Closure functions return the opertors applied to the own doamin to close the boundary | 71 % Closure functions return the opertors applied to the own doamin to close the boundary |