Opm::detail::ReorderedSystem< Coefficients, Vectors > Class Template Reference

The system of solveReordered() and the work arrays for solving it. More...

#include <UpwindTransportSolver.hpp>

Public Member Functions

 ReorderedSystem (const Coefficients &coefficients, const Vectors &rhs, Vectors &x, const UpwindTransportSettings &settings, const std::string &name)
 Set up the system. More...
 
UpwindTransportStatistics solve ()
 Solve the components in the order of Opm::tarjan(). More...
 

Detailed Description

template<class Coefficients, class Vectors>
class Opm::detail::ReorderedSystem< Coefficients, Vectors >

The system of solveReordered() and the work arrays for solving it.

Template Parameters
CoefficientsSource of the coefficients, with the interface of MatrixCoefficients.
VectorsContainer of block vectors, e.g. std::vector<Dune::BlockVector<...>>, with x[q][c][a] component a of cell c for right-hand side q.

Constructor & Destructor Documentation

◆ ReorderedSystem()

template<class Coefficients , class Vectors >
Opm::detail::ReorderedSystem< Coefficients, Vectors >::ReorderedSystem ( const Coefficients &  coefficients,
const Vectors &  rhs,
Vectors &  x,
const UpwindTransportSettings &  settings,
const std::string &  name 
)
inline

Set up the system.

Parameters
coefficientsThe matrix.
rhsOne vector per right-hand side.
xThe solution, in the layout of rhs. The initial guess for loops solved by Gauss-Seidel.
settingsDirect-solve limit, tolerances and iteration limit.
nameName of the calling function, for error messages.
Exceptions
std::invalid_argumentif the number or the lengths of the vectors do not match.

Member Function Documentation

◆ solve()

template<class Coefficients , class Vectors >
UpwindTransportStatistics Opm::detail::ReorderedSystem< Coefficients, Vectors >::solve ( )
inline

Solve the components in the order of Opm::tarjan().

Single cells are solved with their diagonal block, loops of at most UpwindTransportSettings::maxDirectSize unknowns directly, larger loops by Gauss-Seidel.

Returns
Statistics about the components.
Exceptions
std::runtime_errorif a block or loop is singular, a solution value is not finite, or Gauss-Seidel does not converge.

References Opm::UpwindTransportStatistics::largestComponent, Opm::UpwindTransportSettings::maxDirectSize, Opm::UpwindTransportStatistics::maxIterations, Opm::UpwindTransportStatistics::numComponents, Opm::UpwindTransportStatistics::numLoops, and Opm::tarjan().


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