Commit 3b760bb0 authored by Markus Mueller-Trapet's avatar Markus Mueller-Trapet

bugfix when merging mesh nodes and regular coordinates

parent 932b136d
......@@ -107,11 +107,15 @@ classdef itaMeshNodes < itaMeta & itaCoordinates
input = merge(varargin{idx});
tmpID = this.ID(:);
this = merge@itaCoordinates(this,input);
if numel(unique([tmpID(:); input.ID(:)])) < numel(tmpID(:))+numel(input.ID(:))
ita_verbose_info('itaMeshNodes.merge:elements have been renumbered due to ID conflicts',0);
this.ID = [tmpID(:); input.ID(:)+max(tmpID)];
if strcmpi(class(input),'itaCoordinates')
this.ID = [tmpID(:); max(tmpID(:)) + (1:input.nPoints).'];
else
this.ID = [tmpID(:); input.ID(:)];
if numel(unique([tmpID(:); input.ID(:)])) < numel(tmpID(:))+numel(input.ID(:))
ita_verbose_info('itaMeshNodes.merge:elements have been renumbered due to ID conflicts',0);
this.ID = [tmpID(:); input.ID(:)+max(tmpID)];
else
this.ID = [tmpID(:); input.ID(:)];
end
end
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!
Please register or to comment