forked from project-asgard/DG-SparseGrid
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTERM_ND.m
More file actions
31 lines (24 loc) · 766 Bytes
/
TERM_ND.m
File metadata and controls
31 lines (24 loc) · 766 Bytes
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
classdef TERM_ND
properties
name
terms_1D
end
methods
function t = TERM_ND(num_dims,terms_1D_)
assert(nargin>0);
if nargin<2
for d=1:num_dims
terms_1D_{d} = TERM_1D();
end
end
assert(num_dims==numel(terms_1D_));
% Fill in empty dimensions with identity mass
for d=1:num_dims
if isempty(terms_1D_{d})
terms_1D_{d} = TERM_1D({MASS()});
end
end
t.terms_1D = terms_1D_;
end
end
end