I’m trying to build a mesh using a vector of nodes
real[int,int] nodes = [[0,0],
[0.5,0],
[1,0],
[0,0.5],
[0.5,0.5],
[1,0.5],
[0,1],
[0.5,1],
[1,1]];
border bdry(t=0,nodes.n-1){ P.x=nodes(0,t); P.y=nodes(1,t); label=1; };
plot(bdry(nodes.n-1),dim=2,wait=1,cmm="boundary");
mesh Th = buildmesh(bdry(nodes.n-1),fixeborder=true);
plot(Th,wait=1,cmm="mesh");
But I get the following error:
Out of bound 0 <=0 < 9 2 < 2 array type = P3KNMIdE
current line = 11
What am I doing wrong?