mphselectball
Select geometric entity using a ball selection.
Syntax
n = mphselectball(model, geomtag, coord, entity)
Description
n = mphselectball(model, geomtag, coord, entity) finds geometry entity numbers that are inside a ball defined by its coordinates and radius.
geomtag is the geometry tag of the geometry where the search should be performed.
coord is a column vector with the coordinates of the sphere.
entity can be one of point, edge, boundary, or domain
mphselectball uses the Ball Selection that is built into COMSOL. This method is similar to mphselectcoords, but the latter function does not offer the same possibilities for the include option.
Example
Select points that are very near the point (0, 0, 0.01) and display the points in a geometry plot.
model = mphopen('model_tutorial_llmatlab');
coord = [0 0 0.01];
n = mphselectball(model,'geom1',coord','point','radius',0.001)
mphviewselection(model,'geom1',n,'point')
See also
mphselectcoords, mphselectbox