Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zsh:1: permission denied for HELP_runTetGen code on macbook #173

Open
vude0001 opened this issue Aug 16, 2023 · 0 comments
Open

zsh:1: permission denied for HELP_runTetGen code on macbook #173

vude0001 opened this issue Aug 16, 2023 · 0 comments

Comments

@vude0001
Copy link

vude0001 commented Aug 16, 2023

Is there anyone who has this issue when trying to compile /run the code on matlab based on help_tengen using macbook

clear; close all; clc;

% Plot settings
fontSize=15;
faceAlpha1=0.3;
faceAlpha2=1;
cMap=gjet(4);
patchColor=cMap(1,:);
markerSize=25;

%% Example 1: Meshing a model with a single region

%%
% Creating geometry
[F,V]=stanford_bunny('g'); %Bunny

C=ones(size(F,1),1); %Face boundary markers (aka face colors)
V_regions=getInnerPoint(F,V); %Define region points
V_holes=[]; %Define hole points
[regionTetVolumes]=tetVolMeanEst(F,V); %Volume estimate for regular tets
stringOpt='-pq1.2AaY'; %Options for tetgen

%%
% Mesh using TetGen

%Create tetgen input structure
inputStruct.stringOpt=stringOpt; %Tetgen options
inputStruct.Faces=F; %Boundary faces
inputStruct.Nodes=V; %Nodes of boundary
inputStruct.faceBoundaryMarker=C;
inputStruct.regionPoints=V_regions; %Interior points for regions
inputStruct.holePoints=V_holes; %Interior points for holes
inputStruct.regionA=regionTetVolumes; %Desired tetrahedral volume for each region

% Mesh model using tetrahedral elements using tetGen
[meshOutput]=runTetGen(inputStruct); %Run tetGen

%%
% Access mesh output structure

E=meshOutput.elements; %The elements
V=meshOutput.nodes; %The vertices or nodes
CE=meshOutput.elementMaterialID; %Element material or region id
Fb=meshOutput.facesBoundary; %The boundary faces
Cb=meshOutput.boundaryMarker; %The boundary markers

%%
% Visualization

hf=cFigure;
subplot(1,2,1); hold on;
title('Input boundaries','FontSize',fontSize);
hp(1)=gpatch(Fb,V,Cb,'k',faceAlpha1);
hp(2)=plotV(V_regions,'r.','MarkerSize',markerSize);
legend(hp,{'Input mesh','Interior point(s)'},'Location','NorthWestOutside');
axisGeom(gca,fontSize); camlight headlight;
colormap(cMap); icolorbar;

hs=subplot(1,2,2); hold on;
title('Tetrahedral mesh','FontSize',fontSize);

% Visualizing using |meshView|
optionStruct.hFig=[hf,hs];
meshView(meshOutput,optionStruct);

axisGeom(gca,fontSize);
gdrawnow;

% end of the code

Output
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--- TETGEN Tetrahedral meshing --- 16-Aug-2023 14:20:02

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--- Writing SMESH file --- 16-Aug-2023 14:20:02
----> Adding node field
----> Adding facet field
----> Adding holes specification
----> Adding region specification
--- Done --- 16-Aug-2023 14:20:02
--- Running TetGen to mesh input boundary--- 16-Aug-2023 14:20:02
zsh:1: permission denied: /Users/vud/Desktop/Codes/GIBBON-master/GIBBON-master/lib_ext/tetGen/mac64/tetgen
--- Done --- 16-Aug-2023 14:20:02

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--- Importing TetGen files --- 16-Aug-2023 14:20:02
Warning: /Users/Desktop/Honour
Codes/GIBBON-master/GIBBON-master/data/temp/temp.1.node import
unsuccesful

In importTETGEN (line 29)
In runTetGen (line 354)
In Tetgenerator (line 37)
--- Done --- 16-Aug-2023 14:20:02
Index exceeds the number of array elements. Index must not exceed 0.

Error in interp1 (line 153)
extrapMask = Xq < X(1) | Xq > X(end);

Error in resampleColormap (line 43)
cMap_i(:,q)=interp1(ind,cMap(:,q),ind_i,'linear');

Error in icolorbar (line 74)
cn=resampleColormap(c,numel(hc.Ticks));

Error in meshView (line 129)
icolorbar;

Error in Tetgenerator (line 65)
meshView(meshOutput,optionStruct);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant