|
| | NeighborListBuilder ()=default |
| | Construct an empty builder.
|
| template<typename NewExecutionSpace> |
| auto | exec_space (const NewExecutionSpace &exec_space) const |
| | Return a new builder with the execution space supplied.
|
| template<NeighborListInputType NewTargetInput> |
| auto | target_input (const NewTargetInput &target_input) const |
| | Return a new builder with the target input supplied.
|
| template<NeighborListInputType NewSourceInput> |
| auto | source_input (const NewSourceInput &source_input) const |
| | Return a new builder with the source input supplied.
|
| template<ExcluderType NextExcluder> |
| auto | broad_phase (const NextExcluder &next_excluder) const |
| | Return a new builder type with an appended broad-phase excluder.
|
| template<ExcluderType NextExcluder> |
| auto | narrow_phase (const NextExcluder &next_excluder) const |
| | Return a new builder type with an appended narrow-phase excluder.
|
| auto | sort_neighbors (bool sort) const |
| | Return a new builder with the neighbor-sort flag set.
|
| const execution_space & | exec_space () const noexcept |
| | Get the execution space used by the eventual build.
|
| const target_input_type & | target_input () const noexcept |
| | Get the selected target input.
|
| const source_input_type & | source_input () const noexcept |
| | Get the selected source input.
|
| const stk::mesh::Selector & | target_selector () const noexcept |
| | Get the selector defining the target chunk.
|
| const stk::mesh::Selector & | source_selector () const noexcept |
| | Get the selector defining the source chunk.
|
| const broad_excluder_type & | broad_excluder () const noexcept |
| | Get the broad-phase excluder stored by the builder.
|
| const narrow_excluder_type & | narrow_excluder () const noexcept |
| | Get the narrow-phase excluder stored by the builder.
|
| bool | sort_neighbors () const noexcept |
| | Whether neighbor rows will be sorted by source ordinal after construction.
|
| broad_excluder_type | setup_broad_excluder (const stk::mesh::BulkData &bulk_data) const |
| | Return a prepared copy of the broad-phase excluder.
|
| narrow_excluder_type | setup_narrow_excluder (const stk::mesh::BulkData &bulk_data) const |
| | Return a prepared copy of the narrow-phase excluder.
|
template<typename ListType, typename ExecutionSpace = impl::UnsetNeighborListBuilderField, typename TargetInput = impl::UnsetNeighborListBuilderField, typename SourceInput = impl::UnsetNeighborListBuilderField, ExcluderType BroadExcluder = NoExcluder, ExcluderType NarrowExcluder = NoExcluder>
class mundy::search::NeighborListBuilder< ListType, ExecutionSpace, TargetInput, SourceInput, BroadExcluder, NarrowExcluder >
A builder starts empty. Calls to exec_space(...), target_input(...), and source_input(...) return new builder types carrying the supplied field. Calls to .broad_phase(...) and .narrow_phase(...) may be made at any point and append excluders to the broad or narrow filter chain, respectively, without changing the selected inputs. build(bulk_data) delegates to NeighborListBuildTraits<ListType>::build.
- Build arguments
- Every concrete list type publishes a NeighborListBuildTraits<ListType>::args_type struct for its backend-specific parameters (e.g., buffer_size for ArborX types). At a call site, pass the args inline using designated aggregate initialization — the type is deduced from the function parameter and need not be spelled out:
builder.build(bulk_data, {.buffer_size = 16});
When the args type must be named explicitly (pre-declaring, storing, forwarding), use the build_args_type alias exposed directly on the builder:
MyBuilder::build_args_type args{};
args.buffer_size = 16;
friend class NeighborListBuilder
Definition NeighborListBuilder.hpp:354
List types that require no extra parameters (e.g., STKSearchNeighborList) have an empty args_type; omit the second argument entirely and call build(bulk_data).
- Example — ArborX 1D list with broad and narrow phase excluders
.
build(bulk_data, {.buffer_size = 16});
const source_input_type & source_input() const noexcept
Get the selected source input.
Definition NeighborListBuilder.hpp:255
neighbor_list_type build(const stk::mesh::BulkData &bulk_data, const build_args_type &args={}) const
Build the concrete neighbor list.
Definition NeighborListBuilder.hpp:314
auto narrow_phase(const NextExcluder &next_excluder) const
Return a new builder type with an appended narrow-phase excluder.
Definition NeighborListBuilder.hpp:213
const target_input_type & target_input() const noexcept
Get the selected target input.
Definition NeighborListBuilder.hpp:248
const execution_space & exec_space() const noexcept
Get the execution space used by the eventual build.
Definition NeighborListBuilder.hpp:241
NeighborListBuilder< ListType > make_neighbor_list_builder()
Create an empty fluent builder for a concrete neighbor-list type.
Definition NeighborListBuilder.hpp:407
Exclude degenerate (self) interactions.
Definition Excluder.hpp:211
- Example — STK search list (no build args)
.build(bulk_data);
auto source_input(const NewSourceInput &source_input) const
Return a new builder with the source input supplied.
Definition NeighborListBuilder.hpp:187
auto exec_space(const NewExecutionSpace &exec_space) const
Return a new builder with the execution space supplied.
Definition NeighborListBuilder.hpp:169
auto target_input(const NewTargetInput &target_input) const
Return a new builder with the target input supplied.
Definition NeighborListBuilder.hpp:178
- Example — managed list with rebuilder (manage() at any position)
const auto& nl = managed.update(bulk_data, targets, sources);
auto manage(Rebuilder rebuilder) const
Wrap this builder in a ManagedNeighborList driven by a stateful rebuilder policy.
Definition NeighborListBuilder.hpp:345
Rebuilder that triggers when any box corner moves beyond a displacement threshold.
Definition NeighborListRebuilder.hpp:454
Rebuilder that triggers when the target or source entity sequence changes.
Definition NeighborListRebuilder.hpp:314
template<typename ListType, typename ExecutionSpace = impl::UnsetNeighborListBuilderField, typename TargetInput = impl::UnsetNeighborListBuilderField, typename SourceInput = impl::UnsetNeighborListBuilderField, ExcluderType BroadExcluder = NoExcluder, ExcluderType NarrowExcluder = NoExcluder>
template<typename ListType, typename ExecutionSpace = impl::UnsetNeighborListBuilderField, typename TargetInput = impl::UnsetNeighborListBuilderField, typename SourceInput = impl::UnsetNeighborListBuilderField, ExcluderType BroadExcluder = NoExcluder, ExcluderType NarrowExcluder = NoExcluder>
template<typename NewExecutionSpace>
| auto mundy::search::NeighborListBuilder< ListType, ExecutionSpace, TargetInput, SourceInput, BroadExcluder, NarrowExcluder >::exec_space |
( |
const NewExecutionSpace & | exec_space | ) |
const |
|
inline |
- Parameters
-
| exec_space | [in] Execution space used by the eventual build. |
template<typename ListType, typename ExecutionSpace = impl::UnsetNeighborListBuilderField, typename TargetInput = impl::UnsetNeighborListBuilderField, typename SourceInput = impl::UnsetNeighborListBuilderField, ExcluderType BroadExcluder = NoExcluder, ExcluderType NarrowExcluder = NoExcluder>
template<NeighborListInputType NewTargetInput>
| auto mundy::search::NeighborListBuilder< ListType, ExecutionSpace, TargetInput, SourceInput, BroadExcluder, NarrowExcluder >::target_input |
( |
const NewTargetInput & | target_input | ) |
const |
|
inline |
- Parameters
-
| target_input | [in] Selected target input. |
template<typename ListType, typename ExecutionSpace = impl::UnsetNeighborListBuilderField, typename TargetInput = impl::UnsetNeighborListBuilderField, typename SourceInput = impl::UnsetNeighborListBuilderField, ExcluderType BroadExcluder = NoExcluder, ExcluderType NarrowExcluder = NoExcluder>
template<NeighborListInputType NewSourceInput>
| auto mundy::search::NeighborListBuilder< ListType, ExecutionSpace, TargetInput, SourceInput, BroadExcluder, NarrowExcluder >::source_input |
( |
const NewSourceInput & | source_input | ) |
const |
|
inline |
- Parameters
-
| source_input | [in] Selected source input. |
template<typename ListType, typename ExecutionSpace = impl::UnsetNeighborListBuilderField, typename TargetInput = impl::UnsetNeighborListBuilderField, typename SourceInput = impl::UnsetNeighborListBuilderField, ExcluderType BroadExcluder = NoExcluder, ExcluderType NarrowExcluder = NoExcluder>
template<ExcluderType NextExcluder>
| auto mundy::search::NeighborListBuilder< ListType, ExecutionSpace, TargetInput, SourceInput, BroadExcluder, NarrowExcluder >::broad_phase |
( |
const NextExcluder & | next_excluder | ) |
const |
|
inline |
Broad-phase excluders are applied during the broad phase to reject candidate pairs early.
- Parameters
-
| next_excluder | [in] Excluder to append to the broad-phase chain. |
template<typename ListType, typename ExecutionSpace = impl::UnsetNeighborListBuilderField, typename TargetInput = impl::UnsetNeighborListBuilderField, typename SourceInput = impl::UnsetNeighborListBuilderField, ExcluderType BroadExcluder = NoExcluder, ExcluderType NarrowExcluder = NoExcluder>
template<ExcluderType NextExcluder>
| auto mundy::search::NeighborListBuilder< ListType, ExecutionSpace, TargetInput, SourceInput, BroadExcluder, NarrowExcluder >::narrow_phase |
( |
const NextExcluder & | next_excluder | ) |
const |
|
inline |
Narrow-phase excluders are applied after the broad phase for fine-grained pair filtering.
- Parameters
-
| next_excluder | [in] Excluder to append to the narrow-phase chain. |
template<typename ListType, typename ExecutionSpace = impl::UnsetNeighborListBuilderField, typename TargetInput = impl::UnsetNeighborListBuilderField, typename SourceInput = impl::UnsetNeighborListBuilderField, ExcluderType BroadExcluder = NoExcluder, ExcluderType NarrowExcluder = NoExcluder>
When true, each target's neighbor row is sorted by ascending source ordinal after construction. Sorting improves spatial locality when kernels access per-source data (positions, radii, …) for multiple targets that share neighbors. Periodic list variants keep the associated image-shift data consistent with the sorted order.
Default is false (the order produced by the search is preserved).
- Parameters
-
| sort | [in] Whether to sort neighbor rows by source ordinal after construction. |
template<typename ListType, typename ExecutionSpace = impl::UnsetNeighborListBuilderField, typename TargetInput = impl::UnsetNeighborListBuilderField, typename SourceInput = impl::UnsetNeighborListBuilderField, ExcluderType BroadExcluder = NoExcluder, ExcluderType NarrowExcluder = NoExcluder>
Delegates to NeighborListBuildTraits<neighbor_list_type>::build(*this, bulk_data, args). Specialize NeighborListBuildTraits<ListType> to define build behavior and type-specific parameters for a new concrete neighbor-list type.
- Parameters
-
| bulk_data | [in] STK bulk data used for excluder setup. |
| args | [in] Build-specific parameters; defaults to default-constructed args_type. |
template<typename ListType, typename ExecutionSpace = impl::UnsetNeighborListBuilderField, typename TargetInput = impl::UnsetNeighborListBuilderField, typename SourceInput = impl::UnsetNeighborListBuilderField, ExcluderType BroadExcluder = NoExcluder, ExcluderType NarrowExcluder = NoExcluder>
template<RebuilderType Rebuilder>
Captures the current builder state (execution space, broad and narrow excluders, sort flag) into a ManagedNeighborList. The remaining fluent methods — exec_space, broad_phase, narrow_phase, and sort_neighbors — remain available on the returned object, so this call may appear at any position in the chain:
.broad_phase(ExcludeSelfInteraction{});
const auto& nl = managed.update(bulk, targets, sources);
- Parameters
-
template<typename ListType, typename ExecutionSpace = impl::UnsetNeighborListBuilderField, typename TargetInput = impl::UnsetNeighborListBuilderField, typename SourceInput = impl::UnsetNeighborListBuilderField, ExcluderType BroadExcluder = NoExcluder, ExcluderType NarrowExcluder = NoExcluder>
template<typename, typename, typename, typename, ExcluderType, ExcluderType>
| friend class NeighborListBuilder |
|
friend |