DOLFINx 0.12.0.0
DOLFINx C++
Loading...
Searching...
No Matches
uniform.h
1// Copyright (C) 2025-2026 Chris Richardson and 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 <dolfinx/graph/partition.h>
10#include <dolfinx/mesh/Mesh.h>
11#include <dolfinx/mesh/types.h>
12
13namespace dolfinx::refinement
14{
15
28template <typename T>
29mesh::Mesh<T>
30uniform_refine(const mesh::Mesh<T>& mesh,
32 mesh::GhostMode ghost_mode = mesh::GhostMode::none);
33
34} // namespace dolfinx::refinement
Small, foundational mesh types (enums, etc.) with minimal dependencies.
AdjacencyList< std::int32_t > partition_graph(MPI_Comm comm, int nparts, const AdjacencyList< std::int64_t > &local_graph, std::optional< std::span< const std::int32_t > > node_weights, std::optional< std::span< const std::int32_t > > edge_weights, bool ghosting)
Partition graph across processes using the default graph partitioner.
Definition partition.cpp:136
std::function< graph::AdjacencyList< std::int32_t >( MPI_Comm, int, const AdjacencyList< std::int64_t > &, std::optional< std::span< const std::int32_t > >, std::optional< std::span< const std::int32_t > >, bool)> partition_fn
Signature of functions for computing the parallel partitioning of a distributed graph,...
Definition partition.h:38
GhostMode
Enum for different partitioning ghost modes.
Definition types.h:19
Mesh refinement algorithms.
Definition dolfinx_refinement.h:8
mesh::Mesh< T > uniform_refine(const mesh::Mesh< T > &mesh, const graph::partition_fn &partitioner=graph::partition_graph, mesh::GhostMode ghost_mode=mesh::GhostMode::none)
Uniform refinement of a 2D or 3D mesh, containing any supported cell types. Hexahedral,...
Definition uniform.cpp:20