Mercurial > repos > public > sbplib
comparison +multiblock/Laplace.m @ 832:5573913a0949 feature/burgers1d
Merged with default, and updated +scheme/Burgers1D accordingly
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Tue, 11 Sep 2018 15:58:35 +0200 |
parents | 23ad69a347dd |
children |
comparison
equal
deleted
inserted
replaced
831:d0934d1143b7 | 832:5573913a0949 |
---|---|
1 classdef Laplace < scheme.Scheme | |
2 properties | |
3 grid | |
4 order | |
5 mbDiffOp | |
6 | |
7 D | |
8 H | |
9 J | |
10 end | |
11 methods | |
12 function obj = Laplace(g, order, a, b, opGen) | |
13 default_arg('order', 4); | |
14 default_arg('a', 1); | |
15 default_arg('b', 1); | |
16 default_arg('opGen', @sbp.D4Variable); | |
17 | |
18 obj.grid = g; | |
19 obj.order = order; | |
20 obj.mbDiffOp = multiblock.DiffOp(@scheme.LaplaceCurvilinear, obj.grid, order, {a,b,opGen}); | |
21 | |
22 obj.D = obj.mbDiffOp.D; | |
23 obj.J = obj.jacobian(); | |
24 obj.H = obj.mbDiffOp.H; | |
25 end | |
26 | |
27 function s = size(obj) | |
28 s = size(obj.mbDiffOp); | |
29 end | |
30 | |
31 function J = jacobian(obj) | |
32 N = obj.grid.nBlocks; | |
33 J = cell(N,N); | |
34 | |
35 for i = 1:N | |
36 J{i,i} = obj.mbDiffOp.diffOps{i}.J; | |
37 end | |
38 J = blockmatrix.toMatrix(J); | |
39 end | |
40 | |
41 function op = getBoundaryOperator(obj, opName, boundary) | |
42 op = getBoundaryOperator(obj.mbDiffOp, opName, boundary); | |
43 end | |
44 | |
45 function op = getBoundaryQuadrature(obj, boundary) | |
46 op = getBoundaryQuadrature(obj.mbDiffOp, boundary); | |
47 end | |
48 | |
49 function [closure, penalty] = boundary_condition(obj,boundary,type) % TODO: Change name to boundaryCondition | |
50 [closure, penalty] = boundary_condition(obj.mbDiffOp, boundary, type); | |
51 end | |
52 function [closure, penalty] = interface(obj,boundary,neighbour_scheme,neighbour_boundary) | |
53 error('Not implemented') | |
54 end | |
55 end | |
56 end |