-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.m
More file actions
38 lines (33 loc) · 844 Bytes
/
main.m
File metadata and controls
38 lines (33 loc) · 844 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
32
33
34
35
36
37
38
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% main script for CMM
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
close all
clear all
clc
addpath(genpath('./src/'),genpath('./params/'))
DEFAULTS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% select case:
PARAMS_two_stream;
%PARAMS_landau_damping;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% simulate
tic()
params.method = "CMM-NuFI";
[params1, data] = Sim(params);
t(1) = toc()
tic()
params.method = "NuFi";
[params2, data] = Sim(params);
t(2) = toc()
fprintf("tcpu CMM-Nufi: %2.2f\n", t(1))
fprintf("tcpu NuFI: %2.2f \n", t(2))
%% some plotting
figure(44)
h = plot_qty_vs_time(params1,"Epot");
%figure(45)
hold on
h = plot_qty_vs_time(params2,"Epot");
h.Color="r"
h.LineStyle="--"
legend(params1.method,params2.method)