Commit 93991346 authored by Ricardo Torres's avatar Ricardo Torres 💬

added fix to match how FVCOM exports elements for nesting file outputs. In our...

added fix to match how FVCOM exports elements for nesting file outputs. In our previous approach we could have fewer elements
parent 84447a81
......@@ -226,6 +226,17 @@ for obc_idx = 1:Mobj.nObs
cumulative_elem_idx = cumulative_elem_idx + 1;
end
end
% Check if all possible elements have been correctly identified
% colapse all nodes into an array and extract all elements connected to
% those nodes
% find the elements that are attached to 3 nodes in the nesting region
%
candidate= find(all(ismember(Mobj.tri,[Nested.read_obc_nodes{end}]),2));
% test if it is different from existing elements
[truecandidate]=setdiff(candidate,[Nested.read_obc_elems{:}]);
% add to existing list. Catenate will ignore an empty results from
% setdiff
Nested.read_obc_elems{end} = cat(2,Nested.read_obc_elems{end},truecandidate);
if ftbverbose
fprintf('\n')
end
......
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