forked from project-asgard/DG-SparseGrid
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexact_solution_vector.m
More file actions
28 lines (18 loc) · 791 Bytes
/
exact_solution_vector.m
File metadata and controls
28 lines (18 loc) · 791 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
function fval = exact_solution_vector(pde,opts,hash_table,t)
% Returns the wavelet transformed exact solution
if opts.many_solution_capable
fval = md_eval_function(opts, pde.deg, pde.dimensions, ...
pde.params, pde.solutions, hash_table, t);
else
nDims = numel(pde.dimensions);
%%
% Loop over the number of dimensions (+time) to construct the analytic solution.
for d=1:nDims
fList{d} = forward_wavelet_transform(pde.deg,pde.dimensions{d}.lev,...
pde.dimensions{d}.domainMin,pde.dimensions{d}.domainMax,...
pde.analytic_solutions_1D{d},pde.params,t);
end
ft = pde.analytic_solutions_1D{nDims+1}(t);
fval = combine_dimensions_D(pde.deg,fList,ft,hash_table,opts.use_oldhash);
end
end