-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPARTIAL_SD_TERM.m
61 lines (47 loc) · 1.33 KB
/
PARTIAL_SD_TERM.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
classdef PARTIAL_SD_TERM
properties
type
dat
% RHS g_func, matrix, and vector
g
mat
% LHS g_func, matrix, and vector
LHS_mass_g
LHS_mass_mat
% dV / jacobian / volume_element
dV
% for debugging purposes only
mat_unrotated
LHS_mass_mat_unrotated
end
methods
function pterm = PARTIAL_SD_TERM(type_,g_,LHS_mass_g_,dat_,dV_)
if nargin<1
type_ = 'mass';
end
g = @(x,p,t,dat) x.*0+1;
if exist('g_','var')
if ~isempty(g_)
g = g_;
end
end
LHS_mass_g = @(x,p,t,dat) x.*0+1;
if exist('LHS_mass_g_','var')
if ~isempty(LHS_mass_g_)
LHS_mass_g = LHS_mass_g_;
end
end
if nargin<4
dat_ = [];
end
if nargin<5
dV_ = @(x,p,t,d) x.*0+1;
end
pterm.type = type_;
pterm.g = g;
pterm.LHS_mass_g = LHS_mass_g;
pterm.dat = dat_;
pterm.dV = dV_;
end
end
end