# Global node numbering on a face of the cube

Dear all,

I have used ‘cube.idp’ and extracted the global mass and stiffness matrices using the code given below. Now I need the global numbering of nodes on one of the faces of the cube. Can anyone help me out how to get the numbering of all the nodes on a particular face of the cube?

Code:

include “cube.idp”

real l = 1; // length

real w = 1; // breadth

real h = 1; // height

real I = whh*h/12; // area moment of inertia

int[int] Nxyz=[2,2,2];

real [int,int] Bxyz=[[0.,l],[0.,w],[0.,h]];

int [int,int] Lxyz=[[1,2],[3,4],[5,6]];

mesh3 Th=Cube(Nxyz,Bxyz,Lxyz);

real E = 210.0e9;

real nu =0.3;

real rho = 7850;

real mu = E/(2*(1+nu));

real lambda = Enu/((1+nu)(1-2*nu));

// Fespace

fespace Vh(Th,[P1,P1,P1]);

Vh [u1,u2,u3], [v1,v2,v3];

real sqrt2=sqrt(2.);

macro epsilon(u1,u2,u3) [dx(u1),dy(u2),dz(u3),(dz(u2)+dy(u3))/sqrt2,(dz(u1)+dx(u3))/sqrt2,(dy(u1)+dx(u2))/sqrt2] // EOM

macro div(u1,u2,u3) ( dx(u1)+dy(u2)+dz(u3) ) // EOM

varf a([u1,u2,u3],[v1,v2,v3])=

``````int3d(Th)(

lambda*div(u1,u2,u3)*div(v1,v2,v3)

+2.*mu*( epsilon(u1,u2,u3)'*epsilon(v1,v2,v3) )

)
``````
• on(1,u1=0,u2=0,u3=0)

;

varf b([u1,u2,u3],[v1,v2,v3])=

``````int3d(Th)(rho*(u1*v1 + u2*v2 + u3*v3));
``````

matrix A= a(Vh,Vh,solver=“SPARSESOLVER”); //stiffness matrix

matrix B= b(Vh,Vh,solver=CG,eps=1e-20); // mass matrix

Thanking you,
Prathamesh