DOLFINx 0.12.0.0
DOLFINx C++
Loading...
Searching...
No Matches
sfc.h
Go to the documentation of this file.
1// Copyright (C) 2026 Garth N. Wells
2//
3// This file is part of DOLFINx (https://www.fenicsproject.org)
4//
5// SPDX-License-Identifier: LGPL-3.0-or-later
6
7#pragma once
8
9#include "AdjacencyList.h"
10#include "partition.h"
11#include <cstdint>
12#include <mpi.h>
13#include <optional>
14#include <span>
15#include <vector>
16
19
20namespace dolfinx::graph
21{
45std::vector<int> partition_sfc_morton(
46 MPI_Comm comm, int nparts, std::span<const double> x, int gdim,
47 std::optional<std::span<const std::int32_t>> weights = std::nullopt);
48
71std::vector<int> partition_sfc_hilbert(
72 MPI_Comm comm, int nparts, std::span<const double> x, int gdim,
73 std::optional<std::span<const std::int32_t>> weights = std::nullopt);
74
86std::vector<std::int32_t> reorder_sfc_morton(std::span<const double> x,
87 int gdim);
88
99std::vector<std::int32_t> reorder_sfc_hilbert(std::span<const double> x,
100 int gdim);
101} // namespace dolfinx::graph
Graph data structures and algorithms.
Definition AdjacencyList.h:23
std::vector< int > partition_sfc_hilbert(MPI_Comm comm, int nparts, std::span< const double > x, int gdim, std::optional< std::span< const std::int32_t > > weights=std::nullopt)
Partition points into nparts groups using a Hilbert space-filling curve.
Definition sfc.cpp:689
std::vector< int > partition_sfc_morton(MPI_Comm comm, int nparts, std::span< const double > x, int gdim, std::optional< std::span< const std::int32_t > > weights=std::nullopt)
Partition points into nparts groups using a Morton ('Z-order') space-filling curve.
Definition sfc.cpp:681
std::vector< std::int32_t > reorder_sfc_hilbert(std::span< const double > x, int gdim)
Reorder locally supplied points using a Hilbert space-filling curve.
Definition sfc.cpp:704
std::vector< std::int32_t > reorder_sfc_morton(std::span< const double > x, int gdim)
Reorder locally supplied points using a Morton ('Z-order') space-filling curve.
Definition sfc.cpp:697