9 const std::deque<TagAttribute>& input_tag_attributes)
13 std::vector<bool> tag_is_present(input_tag_attributes.size(),
false);
16 for (
size_t i = 0; i < input_tag_attributes.size(); ++i) {
17 if (input_tag_attributes[i].is_tagged(m, s)) {
18 tag_is_present[i] =
true;
24 bool is_intersection =
true;
25 for (
const bool b : tag_is_present) {
26 is_intersection = is_intersection && b;
28 return is_intersection;
34 const std::vector<std::tuple<attribute::MeshAttributeHandle, int64_t>>& input_tags,
35 const std::vector<std::tuple<attribute::MeshAttributeHandle, int64_t>>& output_tags)
37 std::deque<TagAttribute> input_tag_attributes;
38 for (
const auto& [handle, val] : input_tags) {
39 input_tag_attributes.emplace_back(m, handle, handle.primitive_type(), val);
41 std::deque<TagAttribute> output_tag_attributes;
42 for (
const auto& [handle, val] : output_tags) {
43 output_tag_attributes.emplace_back(m, handle, handle.primitive_type(), val);
std::vector< Tuple > get_all(PrimitiveType type) const
Generate a vector of Tuples from global vertex/edge/triangle/tetrahedron index.
int64_t top_cell_dimension() const
bool simplex_is_in_intersection(Mesh &m, const simplex::Simplex &s, const std::deque< TagAttribute > &input_tag_attributes)
Check if a given simplex is in the intersection of a given set of tag attributes.
void compute_intersection(Mesh &m, const std::vector< std::tuple< attribute::MeshAttributeHandle, int64_t >> &input_tags, const std::vector< std::tuple< attribute::MeshAttributeHandle, int64_t >> &output_tags)
const std::vector< Simplex > & simplex_vector() const
Return const reference to the simplex vector.
static Simplex face(const Mesh &m, const Tuple &t)
static Simplex edge(const Mesh &m, const Tuple &t)
static Simplex tetrahedron(const Mesh &m, const Tuple &t)
static Simplex vertex(const Mesh &m, const Tuple &t)
SimplexCollection open_star(const Mesh &mesh, const Simplex &simplex, const bool sort_and_clean)