include "cube.idp"
load "medit"
int[int, int] LL = [[2,2], [1,1], [1,1]];
real[int, int] BB = [[0,1], [0,1], [0,1]];
int[int] CC = [4, 4, 4];
load "splitmesh4"
mesh3 Th3=Cube(CC, BB, LL);
mesh3 Th4=splitmesh4(Th3);
assert(Th4.nt == Th3.nt * 4);
cout << Th4.nt << " == 4 x " << Th3.nt << endl;
assert(Th4.nbe == Th3.nbe);
cout << Th4.nbe << " == " << Th3.nbe << endl;
plot(Th3, cmm="Th3", wait=1);
plot(Th4, cmm="Th4", wait=1);
fespace Vh(Th4, P1);
Vh xyz = x + y + z;
medit("splitmesh4",Th4,xyz);
