*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit 35e4f682 authored by Innerberger, Michael's avatar Innerberger, Michael
Browse files

Fix bug in Evaluable.plot routine

Bug occured if 'SubdivisionFactor' is given and in the subsequent loop
only one element is drawn. Then, the broadcasting sub-routine returned
an array with wrong dimensions.
parent 2ee29238
No related branches found
No related tags found
No related merge requests found
......@@ -59,18 +59,17 @@ else
warning('Custom plot options discarded due to subdivisions.')
end
for s = smin:smax
idx = find(subdivision == s);
if ~isempty(idx)
currentElems = find(subdivision == s);
if ~isempty(currentElems)
% subtriangles on one element
bary = Barycentric2D(partition3(s)/s);
[elements, outerEdges] = getSubtriangles(s);
nSubtriangles = size(elements, 1) * numel(idx);
% compute plot data
coordinates = mesh.elementwiseCoordinates(bary, idx);
coordinates = mesh.elementwiseCoordinates(bary, currentElems);
Xel = splitFirstDimension(coordinates, elements);
Xlin = splitFirstDimension(coordinates, outerEdges);
data = guaranteeSize(eval(obj, bary, idx), mesh.nElements, bary.nNodes);
data = guaranteeSize(eval(obj, bary, currentElems), numel(currentElems), bary.nNodes);
Zel = splitFirstDimension(data, elements);
Zlin = splitFirstDimension(data, outerEdges);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment