![]() |
OpenPFC
0.1.4
Phase Field Crystal simulation framework
|
Halo exchange pattern creation from Decomposition. More...
#include <map>#include <openpfc/core/backend_tags.hpp>#include <openpfc/core/decomposition.hpp>#include <openpfc/core/decomposition_neighbors.hpp>#include <openpfc/core/sparse_vector.hpp>#include <openpfc/core/types.hpp>#include <openpfc/core/world.hpp>#include <vector>
Go to the source code of this file.
Typedefs | |
| using | pfc::halo::Int3 = pfc::types::Int3 |
Enumerations | |
| enum class | pfc::halo::Connectivity { Faces , Edges , All } |
| Connectivity pattern for halo exchange. | |
Functions | |
| template<typename BackendTag = backend::CpuTag> | |
| core::SparseVector< BackendTag, size_t > | pfc::halo::create_send_halo (const decomposition::Decomposition &decomp, int rank, const Int3 &direction, int halo_width) |
| template<typename BackendTag = backend::CpuTag> | |
| core::SparseVector< BackendTag, size_t > | pfc::halo::create_recv_halo (const decomposition::Decomposition &decomp, int rank, const Int3 &direction, int halo_width) |
| Create SparseVector representing receive halo region. | |
| template<typename BackendTag = backend::CpuTag> | |
| std::map< Int3, std::pair< core::SparseVector< BackendTag, size_t >, core::SparseVector< BackendTag, size_t > > > | pfc::halo::create_halo_patterns (const decomposition::Decomposition &decomp, int rank, Connectivity connectivity, int halo_width) |
| Create all halo patterns for a rank. | |
Halo exchange pattern creation from Decomposition.
Provides functions to create SparseVector objects representing halo regions for exchange between neighbors in a decomposed domain. Handles:
| std::map< Int3, std::pair< core::SparseVector< BackendTag, size_t >, core::SparseVector< BackendTag, size_t > > > pfc::halo::create_halo_patterns | ( | const decomposition::Decomposition & | decomp, |
| int | rank, | ||
| Connectivity | connectivity, | ||
| int | halo_width | ||
| ) |
Create all halo patterns for a rank.
Creates send and receive SparseVectors for all neighbors based on connectivity pattern. Returns a map from direction to {send_halo, recv_halo}.
| decomp | Decomposition object |
| rank | Current rank |
| connectivity | Connectivity pattern (Faces, Edges, or All) |
| halo_width | Number of halo rows |


| core::SparseVector< BackendTag, size_t > pfc::halo::create_recv_halo | ( | const decomposition::Decomposition & | decomp, |
| int | rank, | ||
| const Int3 & | direction, | ||
| int | halo_width | ||
| ) |
Create SparseVector representing receive halo region.
Extracts indices for the halo region where data should be received from a neighbor. Indices are in local coordinate space (0-based into the local field array, including halo zones).
| decomp | Decomposition object |
| rank | Current rank |
| direction | Direction from neighbor, e.g., {1,0,0} means receiving from +X neighbor |
| halo_width | Number of halo rows/layers |

