Raw File
movie_nona.m
% Before starting this script, be sure that you have started Matlab in the root path of NS2DDV
%
% Then type the following command
%    run('./EXAMPLES/movie_nona.m')


% 1- Load the architecture of NS2DDV
cd('..');
load_paths();




% 2- Plot an animation based on the results from the files ./RESULTS/EXAMPLES/test_nona/diags_*.h5
inputs = {'./RESULTS/EXAMPLES/test_nona/diags_*.h5'};
% Equivalent definitions
% inputs = {'./RESULTS/EXAMPLES/test_nona/diags_*.h5', 0, 12};
% inputs = {'./RESULTS/EXAMPLES/test_nona/diags_*.h5', 0, 12, 1};


% Choose the data you want to plot (cell-array format)
XDISPLAY_LIST = {'MESH', 'U_VECTOR', 'P', 'P_DX', 'P_DY'};

% Fix isovalues for scalar diagnostics (cell array format)
% MANDATORY: this cell-array must have the same size as XDISPLAY_LIST
% Reminder: for meshes and vector fields, these isovalues are not taken into account, so you can provide
%           whatever you want
% Reminder: prodiving an empty vector for a scalar diagnostic means that you leave the choice of isovalues
%           to the computer
% Reminder: each non-empty cell must be a line vector or an empty vector
LEVELS = {[], [1], [-1., 0., 1., 2., 3.], [], []};

% Here, we impose the isovalues for P to -1, 0, 1, 2, 3. and we choose the 'contour' type of plots

% Choose the visualization method : 'SINGLE_FIGURE' or 'MULTIPLE_FIGURE'
% Reminder: if 'SINGLE_FIGURE' is chosen, you must provide the number of rows and columns.
%           Here, it will be 3 and 2 respectively.
movie_from_file(inputs, XDISPLAY_LIST, LEVELS, 'SINGLE_FIGURE', 'contour', 3, 2);

cd('./EXAMPLES');
back to top