.. _program_listing_file_src_pcms_localization_mesh_localization.h: Program Listing for File mesh_localization.h ============================================ |exhale_lsh| :ref:`Return to documentation for file ` (``src/pcms/localization/mesh_localization.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef PCMS_LOCALIZATION_ADJACENCY_LOCALIZATION_H #define PCMS_LOCALIZATION_ADJACENCY_LOCALIZATION_H #include "pcms/localization/localization_factory.h" #include "pcms/field/evaluator/mls_options.h" #include namespace pcms { // LocalizationFactory implementation using mesh-adjacency BFS search. // // Stores a non-owning reference to the source mesh. The source mesh must // outlive this factory. // // Build(CoordinateView) dispatch: // - source_entity_dim == VERT: uses two-mesh searchNeighbors (adjacency BFS). // - source_entity_dim != VERT: falls back to N^2 BuildPointCloudSupports. // class AdjacencyLocalizationFactory : public LocalizationFactory { public: AdjacencyLocalizationFactory(Omega_h::Mesh& source_mesh, int source_entity_dim, MLSOptions options) : source_mesh_(source_mesh), source_entity_dim_(source_entity_dim), options_(options) { } SupportResults Build( CoordinateView target_coords) const override; SupportResults BuildSameMeshCentroidToVertex() const; private: Omega_h::Mesh& source_mesh_; int source_entity_dim_; MLSOptions options_; }; } // namespace pcms #endif // PCMS_LOCALIZATION_ADJACENCY_LOCALIZATION_H