Skip to content
Snippets Groups Projects
Commit f8ed2deb authored by Achilles Kappis's avatar Achilles Kappis
Browse files

Allow zero distance between the elements and calclulate the number of...

Allow zero distance between the elements and calclulate the number of tetrahedrals to rotate with nnz
parent ebf9c9e1
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
% Author: Achilles Kappis
% e-mail: axilleaz@protonmail.com
%
% Date: 15/12/2024 (DD/MM/YYYY)
% Date: 13/02/2025 (DD/MM/YYYY)
%
% Copyright: MIT
% --------------------------------------------------
......@@ -216,7 +216,7 @@ function [omniPos, fig8Pos, triPos, boxPos, box2DPos, tetPos, fig8Vec, triVec, b
end
if nargin > 2 && ~isempty(elemDist)
validateattributes(elemDist, "numeric", {'scalar', 'real', 'positive', 'nonnan', 'finite'}, mfilename, "Array inter-element distance", 3);
validateattributes(elemDist, "numeric", {'scalar', 'real', 'nonnegative', 'nonnan', 'finite'}, mfilename, "Array inter-element distance", 3);
else
elemDist = 0.1;
end
......@@ -327,7 +327,7 @@ function [omniPos, fig8Pos, triPos, boxPos, box2DPos, tetPos, fig8Vec, triVec, b
switch lower(gType)
case "ula"
% Rotate the tetrahedrals on the positive side of the y-axis
rotIdx = sum(omniPos(1, :) > 0); % Calculate how many tetrahedrals we have to rotate
rotIdx = nnz(omniPos(1, :) > 0); % Calculate how many tetrahedrals we have to rotate
% Go through the tetrahedrals
for measPosIdx = size(omniPos, 2):-1:1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment