Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b28dbdc
Changed plot_fval to make SG vs FG plots for different slices in 2D d…
lwonnell Feb 13, 2020
0aa9713
Finished save and load files to make for quick plotting of solutions.…
lwonnell Feb 13, 2020
99fd01a
Merge branch 'reference' into SG_FG_Complete2D
lwonnell Feb 21, 2020
9e545a7
Modifying plot_fval to get best plots
lwonnell Feb 21, 2020
f227f68
Testing adaptivity for Neumann BC's
lwonnell Feb 26, 2020
5b9386c
Changed right p boundary in fokkerplanck2_complete to 7 and saw the b…
lwonnell Feb 26, 2020
dcb308f
Testing which terms in fokkerplanck2_complete contribute to FG soluti…
lwonnell Feb 27, 2020
e7ef22f
Tested complete 2D without E2 term for SG and FG. With adaptivity, SG…
lwonnell Feb 27, 2020
2b6f9d1
Testing fokkerplanck2_complete with only termE2 present.
lwonnell Mar 2, 2020
9dac4fa
Changes to plot_fval that are only for SG v FG complete2D simulations
lwonnell Mar 17, 2020
744f1f4
Including all saved files from plot_fval.m
lwonnell Mar 17, 2020
f0b1dc1
Fig file containing all plots for 2D complete simulation, SG and FG
Mar 17, 2020
1e762fe
GMRES option added to time_advance and figures including deg = 4, lev…
Mar 21, 2020
71267c0
Added data up to deg=6 for lev=5 for 2D complete
Mar 23, 2020
18f2d19
Deg=6 results using direct solve
Mar 23, 2020
afa3dcd
Deg=7 data and figures for 2D complete simulation
Mar 24, 2020
b8c9fc2
Deg 6 data added to 2D complete data
Mar 24, 2020
3f14eb4
Lev 3 data for 2D Complete
Mar 25, 2020
6811175
Updated Lev 3 data for 2D Complete. Data saved in plot_fval instead.
Mar 25, 2020
1c8501d
2D Complete Data at lev=3 for p_max = 7
Mar 25, 2020
86943c2
Lev 4 data for 2dComplete with p_max at 7
Mar 25, 2020
b52c1f8
Lev 5 files for 2D complete with p_max = 7
Mar 25, 2020
eb78ec3
Deg 7 now finished for lev = 5, 2dComplete
Mar 25, 2020
ba41975
Lev = 3 dt = 0.05 results for 2D Complete
Mar 25, 2020
7768b7d
Unadapted SG data for dt=0.1, and 8 steps, lev = 3-5
Mar 26, 2020
a496b4d
Unadapted SG data for dt = 0.1, 8 steps, and lev = 3-5. Rerun to get …
Mar 27, 2020
2a33074
Adapted SG results for lev = 3-5, threshold of 1e-4
Mar 30, 2020
862fdae
Adapted runs modified to produce output files specifying degree only
Mar 30, 2020
db84b33
Testing 2D Complete problem for different values of delta, Z, and E
Apr 2, 2020
701506d
Adaptivity data collected
Apr 9, 2020
bfa91c3
Inserted code from lin_test into fokkerplanck2_complete.m to input in…
lwonnell Apr 27, 2020
131874f
Tested fokkerplanck2_complete.m with correct form of initial conditio…
lwonnell Apr 28, 2020
a954db8
Testing fokkerplanck2_complete.m to make sure it produces same matric…
lwonnell Apr 29, 2020
e6e176f
Merge branch 'SG_FG_Complete2D' of https://github.com/project-asgard/…
lwonnell Apr 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added PDE/f1d_FG_upper_1,5_ref.mat
Binary file not shown.
Binary file added PDE/f1d_SG_upper_1,5s_ref2.mat
Binary file not shown.
Binary file added PDE/f1d_SG_upper_1,5s_unadapted.mat
Binary file not shown.
36 changes: 27 additions & 9 deletions PDE/fokkerplanck2_complete.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

%%
% Select 6.1, 6.2, 6.3, etc where it goes as 6.test
test = '6p1b';
test = 'full';

%%
% Define a few relevant functions
Expand All @@ -56,7 +56,7 @@
E = 0.0025;
tau = 10^5;
case '6p1b'
delta = 0.042;
delta = 3;
Z = 1;
E = 0.25;
tau = 10^5;
Expand All @@ -65,6 +65,11 @@
Z = 1;
E = 0.0025;
tau = 10^5;
case 'full'
delta = 0.3;
Z = 5;
E = 0.4;
tau = 10^5;
end
gamma = @(p)sqrt(1+(delta*p).^2);
vx = @(p)1/vT*(p./gamma(p));
Expand Down Expand Up @@ -107,6 +112,8 @@
ret = ret + h(l) * P;

end
case 'full'
ret = x.*0 + 1;
end
end

Expand All @@ -129,12 +136,23 @@
ret = 2/(sqrt(pi)*a^3) * exp(-x.^2/a^2);
case '6p1c'
ret = 2/(3*sqrt(pi)) * exp(-x.^2);

case 'full'
N = 1000;
h = 20/N;
Q = 0;
Fun = @(p)exp(-2/delta^2*sqrt(1+delta^2*p.^2));
for i = 1:N
x0 = (i-1)*h;
x1 = i*h;
[xi,w] = lgwt(20,x0,x1);
Q = Q+sum(w.*Fun(xi).*xi.^2);
end
ret = exp(-2/delta^2*sqrt(1+delta^2*x.^2))/(2*Q);
end
end


function ret = soln_z(x,t)
function ret = soln_z(x,~)
ret = x.*0+1;
end
function ret = soln_p(x,t)
Expand All @@ -143,8 +161,8 @@

%% Setup the dimensions

dim_p.domainMin = 0.1;
dim_p.domainMax = +10;
dim_p.domainMin = 0;
dim_p.domainMax = +20;
dim_p.init_cond_fn = @(x,p,t) f0_p(x);

dim_z.domainMin = -1;
Expand Down Expand Up @@ -236,7 +254,7 @@
termE1_z = TERM_1D({pterm1});

pterm1 = MASS(g2);
pterm2 = GRAD(num_dims,g3,1,'N','D');% Lin's Setting
pterm2 = GRAD(num_dims,g3,1,'N','N');% Lin's Setting
termE1_p = TERM_1D({pterm1,pterm2});

termE1 = TERM_ND(num_dims,{termE1_p,termE1_z});
Expand Down Expand Up @@ -270,7 +288,7 @@
g3 = @(x,p,t,dat) 1-x.^2;

pterm1 = MASS(g1);% This is not needed - by Lin
pterm2 = GRAD(num_dims,g2,1,'N','D');% Lin's Setting
pterm2 = GRAD(num_dims,g2,1,'N','N');% Lin's Setting

termR1_p = TERM_1D({pterm1,pterm2});

Expand Down Expand Up @@ -300,7 +318,7 @@
%%
% Add terms to the pde object

pde.terms = {termC1,termC2,termC3,termE1,termE2,termR1,termR2};
pde.terms = {termC1, termC2, termC3, termE1, termE2, termR1, termR2};

%% Construct some parameters and add to pde object.
% These might be used within the various functions below.
Expand Down
Loading