Commit f9ebaf70 authored by gonciarz's avatar gonciarz
Browse files

Precomputation Pre_main updated

parent 2677a77e
......@@ -7,13 +7,11 @@ m=M;
n=K;
p=2; % lp-degree
%% Produce the list of all multi-indices
gamma=zeros(m,1);
Gamma=Gamma_lp(m,n,gamma,gamma,p);
[~,N]=size(Gamma);
%% Choose the Generating Points in standard domain
Points=zeros(m,n+1);
for i =1 : m
......@@ -23,34 +21,26 @@ end
%% Generate the points
PP=Generate_Points_lp(m,N,Points,Gamma);
%% Generate the tree
tree=cell(m+n-2,1);
tree{1}(1).depth=0;
tree=gen_tree_lp(m,Gamma,tree,1,1);
tree=Pro_lp(m,n,p,Gamma,tree,1,1);
% %%unscaled
% tree_name = "./Precomputation/l" +p+ "-case/T_" + m + "," + n + ".mat";
% points_name = "./Precomputation/l" +p+ "-case/PP_" + m + "," + n + ".mat";
% save(tree_name,'tree')
% save(points_name,'PP')
%% scaled case
% tree_name = "./Precomputation/l" +p+ "-case/T_" + m + "," + n + ".mat";
% points_name = "./Precomputation/l" +p+ "-case/PP_" + m + "," + n + ".mat";
%
tree_name = strcat('./Precomputation/l', num2str(p), '-case/T_', num2str(m), ',', num2str(n), '.mat');
points_name = strcat('./Precomputation/l', num2str(p), '-case/PP_', num2str(m), ',', num2str(n), '.mat');
%% Create directory name and create it if not existing
directory = strcat('./Precomputation/l', num2str(p), '-case/');
[status, msg, msgID] = mkdir(directory);
if status ~= 1
error(msg)
end
save(tree_name,'tree')
save(points_name,'PP')
%% Create output file names and save
suffix = strcat(num2str(m), ',', num2str(n), '.mat');
tree_name = strcat(directory, 'T_', suffix);
points_name = strcat(directory, 'PP_', suffix);
save(tree_name, 'tree')
save(points_name, 'PP')
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment