Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
fvcom-toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
FVCOM
fvcom-toolbox
Commits
ac65ef76
Commit
ac65ef76
authored
Nov 15, 2012
by
Pierre Cazenave
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor formatting changes and slightly more robust check for the coordinate type in use
parent
fb747330
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
15 deletions
+13
-15
fvcom_prepro/add_obc_nodes_list.m
fvcom_prepro/add_obc_nodes_list.m
+13
-15
No files found.
fvcom_prepro/add_obc_nodes_list.m
View file @
ac65ef76
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment