# Assertion fail pointed to DOperator.hpp

**URL:** <https://community.freefem.org/t/assertion-fail-pointed-to-doperator-hpp/211>\
**Category:** General Discussion\
**Created:** [January 8, 2020, 11:48am UTC](https://community.freefem.org/t/assertion-fail-pointed-to-doperator-hpp/211 "2020-01-08T11:48:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![distractor](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@distractor](https://community.freefem.org/u/distractor)\
**Post date:** [January 8, 2020, 11:48am UTC](https://community.freefem.org/t/assertion-fail-pointed-to-doperator-hpp/211/1 "2020-01-08T11:48:01Z")

</div>

Hi,

So I tried to compile the following piece of code:

```auto
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

problem Heat(T2,v) = int3d(Th)(T2*v) + int3d(Th)(dt*nu*Grad(T2)'*Grad(v)) - int3d(Th)(T1*v)
                    +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?

---

<div class="post-metadata">

**Author:** ![distractor](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@distractor](https://community.freefem.org/u/distractor)\
**Post date:** [January 8, 2020, 1:57pm UTC](https://community.freefem.org/t/assertion-fail-pointed-to-doperator-hpp/211/2 "2020-01-08T13:57:07Z")

</div>

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