num::structured_grid_graph¶
Defined in header <structures/graph/structured_grid.hpp>
template <std::size_t D, typename Weight = double, std::integral Index = num::idx>
class structured_grid_graph;
Graph of a structured grid in \(D\) dimensions, stored without allocating. Edge weights are face transmissibilities \(A / h\); axis 0 varies fastest.
Members¶
| member | description |
|---|---|
using weight_type = Weight |
|
using index_type = Index |
|
using coordinate_type = std::array<Index, D> |
|
explicit structured_grid_graph( coordinate_type dimensions, std::array<Weight, D> spacing = unit_spacing(), std::array<grid_boundary, D> boundaries = reflecting_boundaries()) |
|
static constexpr std::array<Weight, D> unit_spacing() |
|
static constexpr std::array<grid_boundary, D> reflecting_boundaries() |
|
Index n_vertices() const noexcept |
|
Index n_edges() const noexcept |
|
bool is_directed() const noexcept |
|
const coordinate_type &dimensions() const noexcept |
|
const std::array<Weight, D> &spacing() const noexcept |
|
const std::array<grid_boundary, D> &boundaries() const noexcept |
|
Weight cell_volume() const noexcept |
|
coordinate_type coordinate(Index vertex) const |
|
Index vertex(const coordinate_type &coordinate) const |
|
Index degree(Index vertex_index) const |
|
Weight weighted_degree(Index vertex_index) const |
|
neighbor_range neighbors(Index vertex_index) const |