Loading...
Searching...
No Matches
utils.h
// Copyright (C) 2025 Garth N. Wells
//
// This file is part of DOLFINx (https://www.fenicsproject.org)
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once
#include "AdjacencyList.h"
#include <dolfinx/common/IndexMap.h>
#include <string>
#include <tuple>
#include <utility>
namespace dolfinx::graph
{
AdjacencyList<std::tuple<int, std::size_t, std::int8_t>,
std::pair<std::int32_t, std::int32_t>>
comm_graph(const common::IndexMap& map, int root = 0);
std::string
comm_to_json(const AdjacencyList<std::tuple<int, std::size_t, std::int8_t>,
std::pair<std::int32_t, std::int32_t>>& g);
} // namespace dolfinx::graph
dolfinx::graph::AdjacencyList
This class provides a static adjacency list data structure.
Definition AdjacencyList.h:38
dolfinx::graph
Graph data structures and algorithms.
Definition AdjacencyList.h:20
dolfinx::graph::comm_graph
AdjacencyList< std::tuple< int, std::size_t, std::int8_t >, std::pair< std::int32_t, std::int32_t > > comm_graph(const common::IndexMap &map, int root=0)
Compute an directed graph that describes the parallel communication patterns.
Definition utils.cpp:19
dolfinx::graph::comm_to_json
std::string comm_to_json(const AdjacencyList< std::tuple< int, std::size_t, std::int8_t >, std::pair< std::int32_t, std::int32_t > > &g)
Build communication graph data as a JSON string.
Definition utils.cpp:104