Different results with different nodes and elements using geometryFromMesh PDE toolbox
4 views (last 30 days)
Show older comments
Hello everyone, I used the command gemometryFromMesh to create a geometry within model (with known nodes and elements). I used this code
X_length = 80;
Y_length = 50;
Z_length = 20;
Nx = 15;
Ny = 20;
Nz = 10;
x = linspace(0,X_length,Nx);
y = linspace(0,Y_length,Ny);
z = linspace(0,Z_length,Nz);
w = 1;
for kx = 1:Nx
for ky = 1:Ny
for kz = 1:Nz
X(w) = x(kx);
Y(w) = y(ky);
Z(w) = z(kz);
w = w + 1;
end
end
end
TRI = delaunay(X,Y,Z);
nodes = [X ; Y ; Z];
elements = TRI';
model = createpde(3);
geometryFromMesh(model,nodes,elements)
figure
h = pdegplot(model,'FaceLabels','on');
h(1).FaceAlpha = 0.5;
Problem is that the facelabel will be different with different values of node and element. Here I used two different values of Nx: 15 and 20 (different values of Nx lead to different values of node and element), I obtained two results with different facelabels (the first one is Nx = 15). Can anyone help me to solve this problem: how can I obtain the same facelabel with different values of node and element? Thank you in advance!
0 Comments
Answers (1)
Alan Weiss
on 5 Dec 2016
Sorry, I know of no way to determine the face labels other than examining them in the created geometry. I do not believe that there is any control that you can exercise to keep the labels the same.
Alan Weiss
MATLAB mathematical toolbox documentation
0 Comments
See Also
Categories
Find more on Geometry and Mesh in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!