Due to a shift in policy, from 0900 GMT on Wednesday 14th July 2021, we will be disabling ssh access to the server for external users. External users who wish to continue to access code repositories on the server will need to switch to using https. This can be accomplished in the following way: 1) On the repo on gitlab, use the clone dialogue and select ‘Clone with HTTPS’ to get the address of the repo; 2) From within the checkout of your repo run: $ git remote set-url origin HTTPS_ADDRESS. Here, replace HTTPS_ADDRESS with the address you have just copied from GitLab. Pulls and pushes will now require you to enter a username and password rather than using a ssh key. If you would prefer not to enter a password each time, you might consider caching your login credentials.

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 % Using a list of nodes
% %
% [Mobj] = add_obc_nodes_list(Mobj,Nlist,ObcName,ObcType) % [Mobj] = add_obc_nodes_list(Mobj,Nlist,ObcName,ObcType)
...@@ -21,7 +21,7 @@ function [Mobj] = add_obc_nodes_list(Mobj,Nlist,ObcName,ObcType,plotFig) ...@@ -21,7 +21,7 @@ function [Mobj] = add_obc_nodes_list(Mobj,Nlist,ObcName,ObcType,plotFig)
% EXAMPLE USAGE % EXAMPLE USAGE
% Mobj = add_obc_nodes_list(Mobj,Nlist,'OpenOcean') % Mobj = add_obc_nodes_list(Mobj,Nlist,'OpenOcean')
% %
% Author(s): % Author(s):
% Geoff Cowles (University of Massachusetts Dartmouth) % Geoff Cowles (University of Massachusetts Dartmouth)
% Pierre Cazenave (Plymouth Marine Laboratory) % Pierre Cazenave (Plymouth Marine Laboratory)
% Karen Amoudry (National Oceanography Centre, Liverpool) % Karen Amoudry (National Oceanography Centre, Liverpool)
...@@ -46,7 +46,7 @@ if nargin == 4 ...@@ -46,7 +46,7 @@ if nargin == 4
end 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 % Make this works in versions of MATLAB older than 2012a (newer versions
% can just use unique(A, 'stable'), but checking versions is a pain). % can just use unique(A, 'stable'), but checking versions is a pain).
...@@ -54,12 +54,12 @@ end ...@@ -54,12 +54,12 @@ end
Nlist = Nlist(sort(Nidx)); Nlist = Nlist(sort(Nidx));
if max(Nlist) > Mobj.nVerts 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...') error('stopping...')
end end
%-------------------------------------------------------------------------- %--------------------------------------------------------------------------
% Plot the mesh % Plot the mesh
%-------------------------------------------------------------------------- %--------------------------------------------------------------------------
if plotFig == 1 if plotFig == 1
if strcmpi(Mobj.nativeCoords(1:3), 'car') if strcmpi(Mobj.nativeCoords(1:3), 'car')
...@@ -71,19 +71,19 @@ if plotFig == 1 ...@@ -71,19 +71,19 @@ if plotFig == 1
end end
figure figure
patch('Vertices',[x,y],'Faces',Mobj.tri,... patch('Vertices', [x, y] , 'Faces', Mobj.tri, ...
'Cdata',Mobj.h,'edgecolor','k','facecolor','interp'); 'Cdata', Mobj.h, 'edgecolor', 'k', 'facecolor', 'interp')
hold on; hold on
whos Nlist whos Nlist
plot(x(Nlist),y(Nlist),'ro'); plot(x(Nlist), y(Nlist), 'ro');
axis('equal','tight') axis('equal', 'tight')
title('open boundary nodes'); title('open boundary nodes');
end end
% add to mesh object % add to mesh object
npts = numel(Nlist); npts = numel(Nlist);
Mobj.nObs = Mobj.nObs + 1; 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_nodes(Mobj.nObs,1:npts) = Nlist;
Mobj.obc_name{Mobj.nObs} = ObcName; Mobj.obc_name{Mobj.nObs} = ObcName;
Mobj.obc_type(Mobj.nObs) = ObcType; 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