|
Tarjan.hpp File Reference #include <algorithm>#include <cstddef>#include <ranges>#include <span>#include <stdexcept>#include <string>#include <type_traits>#include <utility>#include <vector>
Include dependency graph for Tarjan.hpp:
![]()
This graph shows which files directly or indirectly include this file:
![]() Go to the source code of this file.
Detailed DescriptionTarjan's algorithm for the strongly connected components (SCCs) of a directed graph, see R. E. Tarjan, "Depth-first search and linear graph algorithms", SIAM J. Comput. 1(2), 1972, or https://en.wikipedia.org/wiki/Tarjan's_strongly_connected_components_algorithm This is a new, independent C++ implementation of the same algorithm that existed in the legacy C-code, reorder transport solver in opm-simulators-legacy (authored by Jostein Natvig). The intended use is to order the cells of a reservoir model for transport solves that follow the flow. Build the graph so that every cell has an edge to each of its upwind neighbours. The components are then returned with all upwind components first, so that solving them in the returned order only ever needs values that are already final:
|
||||||||||||||||||||||||