# Error in the compilator

**URL:** https://community.freefem.org/t/error-in-the-compilator/2583
**Category:** Feature Request
**Created:** [July 5, 2023, 11:12am UTC](https://community.freefem.org/t/error-in-the-compilator/2583 "2023-07-05T11:12:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Gooyoon](https://avatars.discourse-cdn.com/v4/letter/g/ba9def/32.png) [@Gooyoon](https://community.freefem.org/u/Gooyoon)
#### Post date: [July 5, 2023, 11:12am UTC](https://community.freefem.org/t/error-in-the-compilator/2583/1 "2023-07-05T11:12:37Z")

</div>

Dear all,  
I am very new to the FreeFem++ program. So I need your help.  
I want to continue to do simulations of bending objects.  
However, the following error continues to appear.

– mesh: Nb of Triangles = 1440, Nb of Vertices 972  
– FESpace: Nb of Nodes 10692 Nb of DoF 10692  
– Solve :  
min -0.0471218 max 0.0483716  
min -1.05565e-30 max 1.64479  
min -0.010061 max 0.00684872  
Plot:: Sorry no ps version for this type of plot 5  
– FESpace: Nb of Nodes 10692 Nb of DoF 10692

Hear is the code,

include “cube.idp”  
load “msh3”  
load “tetgen”  
load “medit”  
load “iovtk”

// Parameters  
real L1 = 1;  
real L2 = 11;  
real H1 = 0.035;  
real H2 = 0.285;

real Fx=5;  
real Fy;

real Mu1 = 1.e11;  
real Lambda1 = 1.e11;  
real Mu2 = 1.e4;  
real Lambda2 = 1.e4;

int move = 1;  
int fixed = 2;

// Mesh  
mesh Th0;

border a1(t=0., 1.){x=0; y=H1-(2\*H1)\*t; label=fixed;};  
border a2(t=0., 1.){x=L2+(-L2)\*t; y=H1; label=move;};  
border a3(t=0., 1.){x=L2; y=-H2+(H2+H1)\*t; label=move;};  
border a4(t=0., 1.){x=L1+(L2-L1)\*t; y=-H2; label=move;};  
border a5(t=0., 1.){x=L1; y=-H1+(-H2+H1)\*t; label=move;};  
border a6(t=0., 1.){x=(L1)\*t; y=-H1; label=move;};

border b1(t=0., 1.){x=0; y=-H1+(2\*H1)_t; label=fixed;};  
border b2(t=0., 1.){x=-L2_t; y=H1; label=move;};  
border b3(t=0., 1.){x=-L2; y=H1+(-H2-H1)\*t; label=move;};  
border b4(t=0., 1.){x=-L2+(L2-L1)\*t; y=-H2; label=move;};  
border b5(t=0., 1.){x=-L1; y=-H2+(H2-H1)_t; label=move;};  
border b6(t=0., 1.){x=-L1+L1_t; y=-H1; label=move;};

Th0 = buildmesh (a1(10) + a2(100) + a3(30) + a4(90)+ a5(20) + a6(10)  
+ b2(100) + b3(30) + b4(90)+ b5(20) + b6(10));

// Construction of a box with one hole and two regions  
func zmin = 0.;  
func zmax = 1.;  
int MaxLayer = 10;

mesh3 Th = buildlayers(Th0, MaxLayer, zbound=[zmin, zmax]);

fespace Vh(Th,P1);  
Vh u1,u2,u3;  
Vh v1,v2,v3;  
Vh lambda = (0.8 \< abs(x) && 1.2 \> abs(x) && y \< 1. && y \> -1.) ? Lambda2 : Lambda1;  
Vh mu = (0.8 \< abs(x) && 1.2 \> abs(x) && y \< 1. && y \> -1.) ? Mu2 : Mu1;  
Vh Fxx = (x \< 0) ? -Fx : Fx;

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

problem Lame([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) ) //’)  
)

- int3d(Th) (Fxx\*v1)

- on(fixed,u1=0,u2=0,u3=0)  
;

for (int i; i \< 10; ++i){  
Lame;  
Th=movemesh3(Th,transfo=[x+u1,y+u2,z+u3]);  
plot(Th, wait=0, prev=1);  
u1=u1; u2=u2; u3=u3;  
}

Thank you for reading and for your help.

Best regards,

Gooyoon
