Data structure and methods for refining meshes in parallel.
More...
#include <ParallelRefinement.h>
|
static std::vector< std::int64_t > | adjust_indices (const std::shared_ptr< const common::IndexMap > &index_map, std::int32_t n) |
| Adjust indices to account for extra n values on each process This is a utility to help add new topological vertices on each process into the space of the index map. More...
|
|
Data structure and methods for refining meshes in parallel.
ParallelRefinement encapsulates two main features: a distributed MeshTags defined over the mesh edges, which can be updated across processes, and storage for local mesh data, which can be used to construct the new Mesh
◆ adjust_indices()
std::vector< std::int64_t > ParallelRefinement::adjust_indices |
( |
const std::shared_ptr< const common::IndexMap > & |
index_map, |
|
|
std::int32_t |
n |
|
) |
| |
|
static |
Adjust indices to account for extra n values on each process This is a utility to help add new topological vertices on each process into the space of the index map.
- Parameters
-
index_map | IndexMap of current mesh vertices |
n | Number of new entries to be accommodated on this process |
- Returns
- Global indices as if "n" extra values are appended on each process
◆ build_local()
mesh::Mesh ParallelRefinement::build_local |
( |
const std::vector< std::int64_t > & |
cell_topology | ) |
const |
Build local mesh from internal data when not running in parallel.
- Parameters
-
- Returns
- A Mesh
◆ create_new_vertices()
std::map< std::int32_t, std::int64_t > ParallelRefinement::create_new_vertices |
( |
| ) |
|
Add new vertex for each marked edge, and create new_vertex_coordinates and global_edge->new_vertex map. Communicate new vertices with MPI to all affected processes.
- Returns
- edge_to_new_vertex map
◆ mark() [1/2]
void ParallelRefinement::mark |
( |
const mesh::MeshTags< std::int8_t > & |
refinement_marker | ) |
|
Mark all edges incident on entities indicated by refinement marker.
- Parameters
-
[in] | refinement_marker | Value 1 means "refine", any other value means "do not refine" |
◆ mark() [2/2]
bool ParallelRefinement::mark |
( |
std::int32_t |
edge_index | ) |
|
Mark edge by index.
- Parameters
-
[in] | edge_index | Index of edge to mark |
- Returns
- false if marker was already set, otherwise true
◆ marked_edges()
const std::vector< bool > & ParallelRefinement::marked_edges |
( |
| ) |
const |
Return markers for all edges.
- Returns
- array of markers
◆ partition()
mesh::Mesh ParallelRefinement::partition |
( |
const std::vector< std::int64_t > & |
cell_topology, |
|
|
bool |
redistribute |
|
) |
| const |
Use vertex and topology data to partition new mesh across processes.
- Parameters
-
[in] | cell_topology | Topology of cells, (vertex indices) |
[in] | redistribute | Flag, calls partitioner if true |
- Returns
- New mesh
The documentation for this class was generated from the following files:
- /build/dolfinx-kFTZhX/dolfinx-2019.2.0~git20200420.6043d6d/cpp/dolfinx/refinement/ParallelRefinement.h
- /build/dolfinx-kFTZhX/dolfinx-2019.2.0~git20200420.6043d6d/cpp/dolfinx/refinement/ParallelRefinement.cpp