hexed 0.3.0
 
Loading...
Searching...
No Matches
hexed::Accessible_mesh::Masked_mesh Class Reference

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
 

Detailed Description

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:

  • a 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 elements
  • a Sequence of Boundary_connections which includes all boundary connections for whose element the mask is true

The 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.

Todo
Make this more intuitive and less error-prone.

The documentation for this class was generated from the following files: