Creates a mask that allows kernel operations to be performed on a subset of the elements. More...
#include <Accessible_mesh.hpp>
Public Member Functions | |
| Masked_mesh (Accessible_mesh &, const Basis &, std::function< bool(Element &)>=[](Element &){return true;}) | |
Public Attributes | |
| Kernel_mesh | kernel_mesh |
| Sequence< Boundary_connection & > & | bound_cons |
Creates a mask that allows kernel operations to be performed on a subset of the elements.
Supply a function that returns true for elements that should be operated on. The masked mesh is described by two objects:
Kernel_mesh which includes all the elements where the mask is true and all the connections and refined faces where the mask is true for at least one of the participating elementsSequence of Boundary_connections which includes all boundary connections for whose element the mask is trueThe members elements(), element_connections(), etc. will not be affected. This feature has some quirks. The first mask you create will include all elements, regardless of what mask function you supply. After that, each mask will be a subset of all previous masks, again regardless of the mask function. Calling reset_masks() invalidates all previous masks and makes it as if you had not yet created any masks (so now your first one will include all elements, etc.). Modifying the mesh invalidates all existing masks but does not perform a reset. After modifying the mesh, you should call reset_masks() before making any new masks.