1 function [p_mu] = spline_select(model)
2 %
function [p_mu] = spline_select(model)
4 % This
function is a wrapper
for spline functions that are used
for geometrical
5 % transformations of the grid.
7 if isequal(model.geometry_spline_type,
'cubic')
9 x_hill = model.geometry_transformation_spline_x;
10 y_hill = model.geometry_transformation_spline_y;
11 if model.hill_height >= 0
12 y_hill(2) = model.hill_height;
15 p_mu = spline(x_hill, y_hill);
17 elseif isequal(model.geometry_spline_type, 'affine')
19 % x_hill = model.geometry_transformation_spline_x;
20 y_hill = model.geometry_transformation_spline_y;
21 if model.hill_height >= 0
22 y_hill(2) = model.hill_height;
25 % p_mu = mkpp(x_hill, [(y_hill(2)-y_hill(1))/(x_hill(2)-x_hill(1)),y_hill(1);
26 % (y_hill(3)-y_hill(2))/(x_hill(3)-x_hill(2)),y_hill(2)]);
27 p_mu = mkpp([0 1], [-y_hill(2) y_hill(2)]);
28 % plot(ppval(p_mu, linspace(0,1)));