In this paper, we develop a novel search-based wall distance calculation algorithm. The algorithm is highly efficient and satisfies the crucial requirement of exactness in wall distance calculations, taking into account the full geometry of the discretized surface. Unlike conventional search-based algorithms that use element-wise bounding boxes or auxiliary grids, the developed algorithm employs only a set of zero-dimensional reference points representing the elements of the discretized surface. Reference points can be chosen as the centers of faces, the centers of edges, or the vertices. The conservative relation between the approximate distance using one of these references and the exact distance is established, allowing for the efficient extraction of element candidates using only low-level information. The algorithm does not require complex pre-processing of the surface or any information about the query points, ensuring high software modularity. An intuitive load balancing procedure is also proposed to address the load imbalance arising from partitioning-based parallelization. Numerical test demonstrates that the developed algorithm shows three orders of magnitude speed-up compared to exhaustive search and one to two orders of magnitude speed-up compared to other search-based algorithms. It also shows high parallel scalability on partitioned meshes, indicating its feasibility for large-scale problems.
Read full abstract