Commit b4b1fdb7 authored by Pierre Cazenave's avatar Pierre Cazenave

Fix trailing whitespaces and general spacing.

parent eb10a6a8
function [Mobj] = add_obc_nodes_list(Mobj,Nlist,ObcName,ObcType,plotFig)
function [Mobj] = add_obc_nodes_list(Mobj,Nlist,ObcName,ObcType,plotFig)
% Add a set of obc nodes comprising a single obc boundary to Mesh structure
% Add a set of obc nodes comprising a single obc boundary to Mesh structure
% Using a list of nodes
%
% [Mobj] = add_obc_nodes_list(Mobj,Nlist,ObcName,ObcType)
......@@ -21,7 +21,7 @@ function [Mobj] = add_obc_nodes_list(Mobj,Nlist,ObcName,ObcType,plotFig)
% EXAMPLE USAGE
% Mobj = add_obc_nodes_list(Mobj,Nlist,'OpenOcean')
%
% Author(s):
% Author(s):
% Geoff Cowles (University of Massachusetts Dartmouth)
% Pierre Cazenave (Plymouth Marine Laboratory)
% Karen Amoudry (National Oceanography Centre, Liverpool)
......@@ -46,7 +46,7 @@ if nargin == 4
end
%--------------------------------------------------------------------------
% Get a unique list and make sure they are in the range of node numbers
% Get a unique list and make sure they are in the range of node numbers
%--------------------------------------------------------------------------
% Make this works in versions of MATLAB older than 2012a (newer versions
% can just use unique(A, 'stable'), but checking versions is a pain).
......@@ -54,12 +54,12 @@ end
Nlist = Nlist(sort(Nidx));
if max(Nlist) > Mobj.nVerts
fprintf('your open boundary node number exceed the total number of nodes in the domain\n');
fprintf('Your open boundary node number exceed the total number of nodes in the domain\n');
error('stopping...')
end
%--------------------------------------------------------------------------
% Plot the mesh
% Plot the mesh
%--------------------------------------------------------------------------
if plotFig == 1
if strcmpi(Mobj.nativeCoords(1:3), 'car')
......@@ -71,19 +71,19 @@ if plotFig == 1
end
figure
patch('Vertices',[x,y],'Faces',Mobj.tri,...
'Cdata',Mobj.h,'edgecolor','k','facecolor','interp');
hold on;
patch('Vertices', [x, y] , 'Faces', Mobj.tri, ...
'Cdata', Mobj.h, 'edgecolor', 'k', 'facecolor', 'interp')
hold on
whos Nlist
plot(x(Nlist),y(Nlist),'ro');
axis('equal','tight')
plot(x(Nlist), y(Nlist), 'ro');
axis('equal', 'tight')
title('open boundary nodes');
end
% add to mesh object
npts = numel(Nlist);
Mobj.nObs = Mobj.nObs + 1;
Mobj.nObcNodes(Mobj.nObs) = npts;
Mobj.nObcNodes(Mobj.nObs) = npts;
Mobj.obc_nodes(Mobj.nObs,1:npts) = Nlist;
Mobj.obc_name{Mobj.nObs} = ObcName;
Mobj.obc_type(Mobj.nObs) = ObcType;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment