Problem with local refinement

Dear all,

I have an embedded prism which I want to locally refine. I use the following journal commands:

reset
brick x 2 y 1 z 1
brick x 8 y 4 z 4
graphics mode transparent
subtract volume 1 from volume 2 keep
delete Volume 2
compress all
webcut body all with plane from surface 1
webcut body all with plane from surface 2
webcut body all with plane from surface 4
webcut body all with plane from surface 6
webcut body all with plane from surface 5
webcut body all with plane from surface 15
imprint all
merge all
volume all size auto factor 5
mesh volume all
group “inner_box” add hex with x_coord >= {-1.0} and with x_coord <= {1.0} and with y_coord >= {-0.5} and with y_coord <= {0.5} and with z_coord >= {-0.5} and with z_coord <= {0.5}
refine hex in inner_box depth 0

But I get the error message:

ERROR: /home/meshes/gravity/hex_refine.jou (19)
Mesh of Surface 106 has connectivity problems.
(Mesh has odd Euler characteristic 3.)
ERROR: /home/meshes/gravity/hex_refine.jou (19)
Inconsistent edge to face count relationship.
ERROR: /home/meshes/gravity/hex_refine.jou (19)
Mesh of Surface 106 is invalid.
ERROR: /home/meshes/gravity/hex_refine.jou (19)
Refinement process resulted in an invalid surface mesh.
ERROR: /home/meshes/gravity/hex_refine.jou (19)
Unable to refine the given list of hexes.
ERROR: /home/meshes/gravity/hex_refine.jou (19)
Unable to complete refinement operation on mesh.

I would be grateful for your suggestion.

Thanks,
HNG