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

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

Use pagemrdivide to speed up MeshProlongation

parent d390f1c7
Branches
Tags
No related merge requests found
......@@ -68,8 +68,7 @@ classdef MeshProlongation < Prolongation
for k = find(data.nRefinedElements ~= 0)'
unitTriangle = getBisectedUnitTriangle(class(data.bisection{k}));
newDofLocations = getNewLocationsElementwise(unitTriangle, dofLocations);
newDofWeights = divideElementwise(...
reshape(evalShapeFunctions(fe, newDofLocations), nLocalDofs, nLocalDofs, []), localMatrix);
newDofWeights = divideElementwise(evalShapeFunctions(fe, newDofLocations), localMatrix);
nNewLocs = newDofLocations.nNodes;
elems = getRefinedElementIdx(data, k);
......@@ -130,10 +129,8 @@ function elementwiseLocations = getNewLocationsElementwise(mesh, locations)
end
function C = divideElementwise(A, B)
% TODO: from 2022a on, this can be replaced by pagemrdivide(A, B)
n = size(A,1);
C = B' \ reshape(permute(A, [2,1,3]), n, []);
C = reshape(permute(reshape(C, n, n, []), [2,1,3]), n, []);
C = reshape(pagemrdivide(reshape(A, n, n, []), B), n, []);
end
function idx = getConsecutiveIndices(parents, nIndices)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment