Commit ac65ef76 by Pierre Cazenave

### Minor formatting changes and slightly more robust check for the coordinate type in use

parent fb747330
 ... ... @@ -3,7 +3,7 @@ function [Mobj] = add_obc_nodes_list(Mobj,Nlist,ObcName,ObcType) % Add a set of obc nodes comprising a single obc boundary to Mesh structure % Using a list of nodes % % [Mobj] = add_obc_nodes(Mobj) % [Mobj] = add_obc_nodes_list(Mobj,Nlist,ObcName,ObcType) % % DESCRIPTION: % Select using ginput the set of nodes comprising an obc ... ... @@ -22,43 +22,41 @@ function [Mobj] = add_obc_nodes_list(Mobj,Nlist,ObcName,ObcType) % % Author(s): % Geoff Cowles (University of Massachusetts Dartmouth) % Pierre Cazenave (Plymouth Marine Laboratory) % % Note: % Uses ginput2 which allows zoom/pan before selecting points and displays % clicked points realtime % % Revision history % Revision history: % %============================================================================== %========================================================================== subname = 'add_obc_nodes'; global ftbverbose if(ftbverbose) fprintf('\n') fprintf(['begin : ' subname '\n']) end; end %------------------------------------------------------------------------------ %-------------------------------------------------------------------------- % Get a unique list and make sure they are in the range of node numbers %------------------------------------------------------------------------------ %-------------------------------------------------------------------------- Nlist = unique(Nlist); if(max(Nlist) > Mobj.nVerts); fprintf('your open boundary node number exceed the total number of nodes in the domain\n'); error('stopping...\n') end; end %------------------------------------------------------------------------------ %-------------------------------------------------------------------------- % Plot the mesh %------------------------------------------------------------------------------ %-------------------------------------------------------------------------- if(lower(Mobj.nativeCoords(1:3)) == 'car') if strcmpi(Mobj.nativeCoords(1:3), 'car') x = Mobj.x; y = Mobj.y; else x = Mobj.lon; y = Mobj.lat; end; end figure patch('Vertices',[x,y],'Faces',Mobj.tri,... ... ... @@ -80,5 +78,5 @@ Mobj.obc_type(Mobj.nObs) = ObcType; if(ftbverbose) fprintf(['end : ' subname '\n']) end; end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!