DOLFINx
0.12.0.0
DOLFINx C++
Toggle main menu visibility
Loading...
Searching...
No Matches
dolfinx
refinement
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
13
namespace
dolfinx::refinement
14
{
15
28
template
<
typename
T>
29
mesh::Mesh<T>
30
uniform_refine
(
const
mesh::Mesh<T>
& mesh,
31
const
graph::partition_fn
& partitioner =
graph::partition_graph
,
32
mesh::GhostMode
ghost_mode = mesh::GhostMode::none);
33
34
}
// namespace dolfinx::refinement
types.h
Small, foundational mesh types (enums, etc.) with minimal dependencies.
dolfinx::graph::partition_fn
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
dolfinx::graph::partition_graph
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:137
dolfinx::mesh::GhostMode
GhostMode
Enum for different partitioning ghost modes.
Definition
types.h:19
dolfinx::mesh::Mesh
Mesh(MPI_Comm, std::shared_ptr< Topology >, V) -> Mesh< typename std::remove_cvref_t< typename V::value_type > >
Template type deduction.
dolfinx::refinement
Mesh refinement algorithms.
Definition
dolfinx_refinement.h:8
dolfinx::refinement::uniform_refine
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:24
Generated by
1.18.0