13 const std::string& attribute_name,
15 const std::vector<wmtk::attribute::MeshAttributeHandle>& passed_attributes)
18 auto is_boundary_accessor = mesh.
create_accessor(is_boundary_handle.as<
char>());
20 for (
const auto& t : mesh.
get_all(ptype)) {
21 is_boundary_accessor.scalar_attribute(t) = mesh.
is_boundary(ptype, t) ? value : 0;
24 return from_tag(is_boundary_handle, value, passed_attributes);
attribute::MeshAttributeHandle register_attribute(const std::string &name, PrimitiveType type, int64_t size, bool replace=false, T default_value=T(0))
bool is_boundary(const simplex::Simplex &tuple) const
check if a simplex lies on a boundary or not
std::vector< Tuple > get_all(PrimitiveType type) const
Generate a vector of Tuples from global vertex/edge/triangle/tetrahedron index.
attribute::Accessor< T, Mesh, D > create_accessor(const attribute::MeshAttributeHandle &handle)
std::shared_ptr< Mesh > from_tag(const wmtk::attribute::MeshAttributeHandle &handle, const wmtk::attribute::MeshAttributeHandle::ValueVariant &tag_value, const std::vector< wmtk::attribute::MeshAttributeHandle > &passed_attributes)
std::shared_ptr< Mesh > from_boundary(Mesh &mesh, const PrimitiveType ptype, const std::string &attribute_name, char value, const std::vector< wmtk::attribute::MeshAttributeHandle > &passed_attributes)