PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
meshPartitioning.h
Go to the documentation of this file.
1/*
2 * -------------------------------------------
3 * Copyright (c) 2021 - 2026 Prashant K. Jha
4 * -------------------------------------------
5 * PeriDEM https://github.com/prashjha/PeriDEM
6 *
7 * Distributed under the Boost Software License, Version 1.0. (See accompanying
8 * file LICENSE)
9 */
10
11#pragma once
12
13#include <string>
14#include <vector>
15
16namespace mesh {
17
18// forward declare Mesh
19class Mesh;
20
30void metisGraphPartition(std::string partitionMethod,
31 const std::vector<std::vector<size_t>> &nodeNeighs,
32 std::vector<size_t> &nodePartition,
33 size_t nPartitions);
34
44void metisGraphPartition(std::string partitionMethod,
45 mesh::Mesh *mesh_p,
46 const std::vector<std::vector<size_t>> &nodeNeighs,
47 size_t nPartitions);
48
49void metisGraphPartition(std::string partitionMethod,
50 std::vector<std::vector<size_t>> &nodeNeighs,
51 size_t nparts,
52 std::vector<size_t> &epart,
53 std::vector<size_t> &npart);
54
55void metisGraphPartition(std::string partitionMethod,
56 mesh::Mesh *mesh_p,
57 size_t nparts);
58
59} // namespace mesh
A class for mesh data.
Definition mesh.h:53
Collection of methods and data related to finite element and mesh.
Definition mesh.cpp:29
void metisGraphPartition(std::string partitionMethod, const std::vector< std::vector< size_t > > &nodeNeighs, std::vector< size_t > &nodePartition, size_t nPartitions)
Partitions the nodes based on node neighborlist supplied. Function first creates a graph with nodes a...