load "msh3" // Parameters int nn = 20; // Mesh quality // Mesh int[int] labs = [1, 2, 2, 1, 1, 2]; // Label numbering mesh3 Th = cube(nn, nn, nn, label=labs); // Remove the ]0.5,1[^3 domain of the cube Th = trunc(Th, (x < 0.5) | (y < 0.5) | (z < 0.5), label=1); // Fespace fespace Vh(Th, P1); Vh u, v; // Macro macro Grad(u) [dx(u), dy(u), dz(u)] // // Define the weak form and solve solve Poisson(u,