Lagrange
Loading...
Searching...
No Matches
extract_submeshes_by_group.h
1/*
2 * Copyright 2026 Adobe. All rights reserved.
3 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License. You may obtain a copy
5 * of the License at http://www.apache.org/licenses/LICENSE-2.0
6 *
7 * Unless required by applicable law or agreed to in writing, software distributed under
8 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 * OF ANY KIND, either express or implied. See the License for the specific language
10 * governing permissions and limitations under the License.
11 */
12#pragma once
13
14#include <lagrange/SurfaceMesh.h>
15#include <lagrange/extract_submesh.h>
16#include <lagrange/utils/span.h>
17
18#include <vector>
19
20namespace lagrange::internal {
21
42template <typename Scalar, typename Index>
43std::vector<SurfaceMesh<Scalar, Index>> extract_submeshes_by_group(
44 const SurfaceMesh<Scalar, Index>& mesh,
45 size_t num_groups,
46 span<const Index> facet_indices,
47 span<const Index> group_offsets,
48 const SubmeshOptions& options);
49
50} // namespace lagrange::internal
::nonstd::span< T, Extent > span
A bounds-safe view for sequences of objects.
Definition span.h:27
nullptr_t, size_t, ptrdiff_t basic_ostream bad_weak_ptr extent, remove_extent, is_array,...
Definition attribute_string_utils.h:21
std::vector< SurfaceMesh< Scalar, Index > > extract_submeshes_by_group(const SurfaceMesh< Scalar, Index > &mesh, size_t num_groups, span< const Index > facet_indices, span< const Index > group_offsets, const SubmeshOptions &options)
Extract multiple submeshes defined by facet groups in a single linear pass.
Definition extract_submeshes_by_group.cpp:69