Commit 23a418d7 authored by Pierre Cazenave's avatar Pierre Cazenave

Check for closed nodestrings (which we don't really want) and drop the duplicated nodes.

parent ac164059
......@@ -228,6 +228,12 @@ for nString = 1:sum(allNodes(:) < 0)
abs(allNodes(nodeStrings(nString - 1) + 1: ...
nodeStrings(nString)));
end
% Check for closed nodestrings (which we don't really want).
if read_obc_nodes{nString}(1) == read_obc_nodes{nString}(end)
% Drop the end one.
warning('Closed node string found. Opening it.')
read_obc_nodes{nString} = read_obc_nodes{nString}(1:end - 1);
end
end
if nStrings > 0
......
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