Raw File
plot_single_rtin.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/plot_single_rtin.m')


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




% 2- Plot the results from the file ./RESULTS/EXAMPLES/test_rtin/diags_5.h5
namefile = './RESULTS/EXAMPLES/test_rtin/diags_5.h5';

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

% 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 1 and 4 respectively.
plot_from_file(namefile, XDISPLAY_LIST, LEVELS, 'SINGLE_FIGURE', 'contour', 1, 4);

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