Skip to content

Commit

Permalink
Quick fix of the ind2sub issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rafavzqz authored Nov 18, 2024
1 parent 3c0ca98 commit 7266cf4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion geopdes/inst/space/@sp_scalar/sp_scalar.m
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,14 @@
end

bnd_ndof_dir = sp.ndof_dir(ind);
aux_ndof_dir = sp.ndof_dir; aux_ndof_dir(ind2) = 1;
bnd_ndof = prod (bnd_ndof_dir);
[ind_univ{ind}] = ind2sub (bnd_ndof_dir, 1:bnd_ndof);
ind_aux = cell (msh.ndim, 1);
% [ind_univ{ind}] = ind2sub (bnd_ndof_dir, 1:bnd_ndof);
[ind_aux{:}] = ind2sub (aux_ndof_dir, 1:bnd_ndof);
for ii = 1:numel(ind)
ind_univ{ind(ii)} = ind_aux{ind(ii)};
end
if (rem (iside, 2) == 0)
ind_univ{ind2} = sp.ndof_dir(ind2) * ones (1, bnd_ndof);
else
Expand Down

0 comments on commit 7266cf4

Please sign in to comment.