# Assertion fail pointed to DOperator.hpp

Hi,

So I tried to compile the following piece of code:

``````load "msh3"
// include "ffmatlib.idp"
include "utilities.idp"

// mesh
int N = 10;
mesh3 Th = cube(N, N, N);

// The finite element space defined over Th
fespace Vh(Th, P1);
fespace Nh(Th, [P1, P1, P1]);

// FEM variables
Vh T2, u, v, T1 = Tinit + 273.;
Nh [u1,u2,u3], [v1,v2,v3];

// Macros
macro Grad(u) [dx(u), dy(u), dz(u)] //EOM
macro Div(u1,u2,u3) (dx(u1) + dy(u2) + dz(u3)) // EOM
macro Curl(ux, uy, uz) [dy(uz) - dy(uy), dz(ux) - dx(uz), dx(uy) - dy(ux)] // EOM

+int3d(Th, 1, 2, 3, 4, 6)(epsilon*stefConst*(pow(T1, 4) - pow(Tamb + 273., 4))*v)
+on(5, T2 = Ttable + 273.)
;

problem Navier([u1,u2,u3], [v1,v2,v3]) = int3d(Th)((lambda + 2*G) * v * Grad(Div(u1, u2, u3))
// -int3d(Th)((lambda + 2*G) * v * Curl(Curl(u1, u2, u3)))
// +int3d(Th)((lambda + G) * v * Grad(Div(u1, u2, u3)))
// -int3d(Th)(beta * v * grad())
+ on(1,u1=0,u2=0,u3=0)
;

// Solve
for (real t=0.; t<totalTime; t+=dt) {
// Heat
Heat;
T1=T2;
}
``````

But while compiling I get Assertion error pointed to line with “problem Navier …”:
42 : problem Navier([u1,u2,u3], [v1,v2,v3]) = int3d(Th)((lambda + 2*G) * v * Grad(Div(u1, u2, u3)) [dx(Div(u1, u2, u3) (dx(u1) + dy( u2) + dz( u3)) ) current line = 33
Assertion fail : (0)
line :396, in file ./…/femlib/DOperator.hpp
error Assertion fail : (0)
line :396, in file ./…/femlib/DOperator.hpp

Does anybody have an idea what could be the problem?

I was able to find the problem: The weak form is completely wrong so you can simply ignore this topic.