I am trying to do some 3D PDE solving, and I keep running into problems with boundary conditions because my meshed boundaries are not what I expected. For example, the following code
<< NDSolve`FEM`
l = 10.;
w = 10.;
h = 5.;
reg = ImplicitRegion[-l/2. <= x <= l/2. && -w/2. <= y <=
w/2. && -h/2. <= z <= h/2., {x, y, z}];
mesh = ToElementMesh[reg, MaxCellMeasure -> {"Area" -> .1}]
gives
ElementMesh[{{-5.00011, 5.00011}, {-5.00011, 5.00011}, {-2.50005, 2.50005}},
{TetrahedronElement["<" 120298 ">"]}]
It's strange, and unexpected to me, that the ElementMesh bounds are not even close to being within machine precision of what I expect them to be: (5, 5, 2.5). This causes problems when I then try to define a boundary condition at, for example, x=l/2. When trying to use NDSolve with such a boundary condition I get the error "No places were found on the boundary where Coordinate was True...." Replacing the boundary specification with the value (copied and pasted) from the element mesh output succeeds.
What is the best way to work around this? I will eventually have more complicated regions, and not being able to specify their boundaries algebraically is going to be a problem. Alternatively, what's the best way to find out what a region's actual boundary is?