Loading...
Searching...
No Matches
dolfin::DistributedMeshTools Class Reference

`#include <DistributedMeshTools.h>`

## Static Public Member Functions

static void | number_entities (const Mesh &mesh, std::size_t d)
| Create global entity indices for entities of dimension d.
static std::size_t | number_entities (const Mesh &mesh, const std::map< unsigned int, std::pair< unsigned int, unsigned int > > &slave_entities, std::vector< std::int64_t > &global_entity_indices, std::map< std::int32_t, std::set< unsigned int > > &shared_entities, std::size_t d)
static void | init_facet_cell_connections (Mesh &mesh)
static std::map< std::size_t, std::set< std::pair< std::size_t, std::size_t > > > | locate_off_process_entities (const std::vector< std::size_t > &entity_indices, std::size_t dim, const Mesh &mesh)
static std::unordered_map< unsigned int, std::vector< std::pair< unsigned int, unsigned int > > > | compute_shared_entities (const Mesh &mesh, std::size_t d)
static std::vector< double > | reorder_vertices_by_global_indices (const Mesh &mesh)
static void | reorder_values_by_global_indices (const Mesh &mesh, std::vector< double > &data, const std::size_t width)
static void | reorder_values_by_global_indices (MPI_Comm mpi_comm, std::vector< double > &values, const std::size_t width, const std::vector< std::int64_t > &global_indices)

## Detailed Description

This class provides various functionality for working with distributed meshes.

## Member Function Documentation

## compute_shared_entities()

std::unordered_map< unsigned int, std::vector< std::pair< unsigned int, unsigned int > > > DistributedMeshTools::compute_shared_entities | ( | const Mesh & | mesh,
|  | std::size_t | d )

static

Compute map from local index of shared entity to list of sharing process and local index, i.e. (local index, [(sharing process p, local index on p)])

## init_facet_cell_connections()

void DistributedMeshTools::init_facet_cell_connections | ( | Mesh & | mesh | ) |

static

Compute number of cells connected to each facet (globally). Facets on internal boundaries will be connected to two cells (with the cells residing on neighboring processes)

## locate_off_process_entities()

std::map< std::size_t, std::set< std::pair< std::size_t, std::size_t > > > DistributedMeshTools::locate_off_process_entities | ( | const std::vector< std::size_t > & | entity_indices,
|  | std::size_t | dim,
|  | const Mesh & | mesh )

static

Find processes that own or share mesh entities (using entity global indices). Returns (global_dof, set(process_num, local_index)). Exclusively local entities will not appear in the map. Works only for vertices and cells

## number_entities()

std::size_t DistributedMeshTools::number_entities | ( | const Mesh & | mesh,
|  | const std::map< unsigned int, std::pair< unsigned int, unsigned int > > & | slave_entities,
|  | std::vector< std::int64_t > & | global_entity_indices,
|  | std::map< std::int32_t, std::set< unsigned int > > & | shared_entities,
|  | std::size_t | d )

static

Create global entity indices for entities of dimension d for given global vertex indices.

## reorder_values_by_global_indices() [1/2]

void DistributedMeshTools::reorder_values_by_global_indices | ( | const Mesh & | mesh,
|  | std::vector< double > & | data,
|  | const std::size_t | width )

static

Reorder the values (of given width) in data to be in global vertex index order on the Mesh, redistributing evenly across processes

## reorder_values_by_global_indices() [2/2]

void DistributedMeshTools::reorder_values_by_global_indices | ( | MPI_Comm | mpi_comm,
|  | std::vector< double > & | values,
|  | const std::size_t | width,
|  | const std::vector< std::int64_t > & | global_indices )

static

Reorder the values of given width, according to explicit global indices, distributing evenly across processes

## reorder_vertices_by_global_indices()

std::vector< double > DistributedMeshTools::reorder_vertices_by_global_indices | ( | const Mesh & | mesh | ) |

static

Reorders the vertices in a distributed mesh according to their global index, and redistributes them evenly across processes returning the coordinates as a local vector

The documentation for this class was generated from the following files:

- /build/dolfin-lFBzDh/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/mesh/DistributedMeshTools.h
- /build/dolfin-lFBzDh/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/mesh/DistributedMeshTools.cpp