|
Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website |
The mesh during setup, spread over the ranks. Each rank starts from its block of the mesh (cells, nodes and boundary faces by global id) and keeps it as the directory that serves those cells and nodes to other ranks: More...
#include <distributed_mesh.h>
Public Types | |
| using | PeriodicMap = std::unordered_map< uint64_t, std::pair< uint64_t, std::array< int8_t, 3 > > > |
| Periodic node -> (key, lattice offset), as in PeriodicNodes but by global id. | |
Public Member Functions | |
| DistributedMesh (MeshBlock block, const std::vector< Mesh::PeriodicPair > &periodic={}) | |
| Match faces across ranks, joining the zones of the periodic pairs (collective). | |
| uint64_t | n_global_cells () const |
| uint64_t | first_cell () const |
| uint32_t | n_block_cells () const |
| const std::vector< uint64_t > & | cell_distribution () const |
| First block cell of every rank, and the total (ParMETIS vtxdist). | |
| const std::vector< uint64_t > & | graph_offsets () const |
| Dual graph of the block cells (cells sharing a face), by global id (CSR); until distribute(). | |
| const std::vector< uint64_t > & | graph_neighbors () const |
| const PeriodicMap & | block_periodic_classes () const |
| Periodic classes of the periodic nodes of the block's cells and boundary faces, and no others. | |
| const MeshBlock & | mesh_block () const |
| This rank's block of the mesh. | |
| std::vector< std::array< double, N_DIM > > | block_cell_centers () const |
| Vertex average of every block cell (collective). | |
| void | distribute (const std::vector< int > &owner) |
| Send every block cell to its owner rank, and drop the dual graph (collective). | |
| std::shared_ptr< Mesh > | build_local_mesh (int halo_layers, Distribution &dist) |
| This rank's mesh: its owned cells in global order, then halo_layers layers of vertex neighbors, each in global order. Faces on the global boundary keep their zones; faces towards cells not on this rank go to PARTITION_ZONE. Fills dist, including the exchange plan (collective; after distribute()). | |
The mesh during setup, spread over the ranks. Each rank starts from its block of the mesh (cells, nodes and boundary faces by global id) and keeps it as the directory that serves those cells and nodes to other ranks:
All memory is O(cells / ranks) per rank, plus the halo.
| using DistributedMesh::PeriodicMap = std::unordered_map<uint64_t, std::pair<uint64_t, std::array<int8_t, 3> >> |
Periodic node -> (key, lattice offset), as in PeriodicNodes but by global id.
|
explicit |
Match faces across ranks, joining the zones of the periodic pairs (collective).
Vertex average of every block cell (collective).
|
inline |
Periodic classes of the periodic nodes of the block's cells and boundary faces, and no others.
| std::shared_ptr< Mesh > DistributedMesh::build_local_mesh | ( | int | halo_layers, |
| Distribution & | dist | ||
| ) |
This rank's mesh: its owned cells in global order, then halo_layers layers of vertex neighbors, each in global order. Faces on the global boundary keep their zones; faces towards cells not on this rank go to PARTITION_ZONE. Fills dist, including the exchange plan (collective; after distribute()).
First block cell of every rank, and the total (ParMETIS vtxdist).
Send every block cell to its owner rank, and drop the dual graph (collective).
|
inline |
Dual graph of the block cells (cells sharing a face), by global id (CSR); until distribute().
|
inline |
|
inline |