MATLAB Examples


This is a Matlab GUI designed to view the points used in the kernels for interpolation purposes in the meshless formulation (resolution of boundary value problems).




The input argument str_stc_kernel should be 'stc_kernel'.

The input argument stc_kernel is taken from the output of an interpolation function, as interp_AFP.

Example of call

% Creation of a grid on a 2D geometry
g_AFP = obj_AFP_V1_00;
g_AFP.file_geom_definition = 'R_fcts_geom\Files_geom_definition\EABE_v34_p30_ex1';
g_AFP = Analyse_geometry_definition(g_AFP);
g_AFP.Pts_mean_distance_expr = {[] [.2 .2 Inf];
                                'x>5.5 & x<10 & y<6' [.1 .1 Inf]}; % The region 'x>5.5 & x<10 & y<6' will receive a higher density of points.
g_AFP = calc_pts_distr(g_AFP);
% Determination of the interpolation kernels
stc_interp.SolOrder = 2;
stc_interp.Kernel_technique = 'FC_variable';
stc_interp.F_Kronecker_enforcement = true;
stc_interp.LargKernel = 1.17*[1 1 1];
stc_interp.Value_points_outside_domain = 'Extrapolation';
stc_interp.L_check_status_inside = false;
stc_interp.L_output_C_NZphih = false;
stc_interp.L_output_C_NZdNh = false;
stc_interp.L_output_C_dNh = false;
stc_interp.L_output_V_interp = false;
stc_interp.L_output_stc_kernel = true;
stc_interp.F_compact_output_cells = false;
stc_interp.L_derivatives_interp_to_compute = [true false(1,9)];
stc_interp.F_use_pts_mean_distance_in_kernel = true;
stc_interp.V_fct_to_interp = [];
stc_interp.F_waitbar = false;
stc_kernel = interp_AFP(g_AFP,'Pts_coord_geom',stc_interp); % The interpolation functions are computed on a single grid, not for the interpolation from a grid to another one.

% Loading of the Matlab GUI


When the GUI is launched, the GUI window is opened with his controls, and a figure with the geometry and the points distribution is created. This GUI allows the user to move the cursor over the figure of the points distribution to see the points included in the kernel of each star point. The points of the figure are marked:

  • point of the distribution: green dot. These are the points of the distribution;
  • star point: big blue star. This is the point around which the kernel is constructed;
  • points visible: small cyan star. These are the points located in the kernel area and are considered visible from the star point;
  • points not visible: small yellow star. These are the points located in the kernel area but are not considered visible from the star point;
  • points used for interpolation computation: red circles. These are the points involved in the interpolation computation.

Parts of the GUI

Point control

A slider allows the selection of the star point with his index. The current point index is written (here, as 1).

Limits of display

These sliders allows the display of the points to be limited to a reduced range, in order to improve the visibility of the points in a given area. The first column of controls is affected to the x dimension; the second column of controls is affected to the y dimension; the third column of controls is affected to the z dimension (not available for 2D geometries). The top control specifies the minimum coordinate of the points to display; the bottom control specifies the maximum coordinate of the points to display. The text lower indicates what are these values.

Active locator

This toggle button specifies if the cursor movement over the figure of the points distribution affects the star point location. When this figure of points distribution is active (click of the mouse in the figure), the keyboard key l (as in "lock") can be pressed to toggle this "Active locator" button, allowing the user to freeze the display while the cursor moves away from the figure.

See also


Copyright 2013 Mathieu Gendron