SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::solver::preconditioner::computations Namespace Reference

Namespaces

namespace  detail
 

Functions

template<typename First, typename Second, typename Policy>
auto coupling (const CoupledPreconditioner< First, Second, Policy > &)
 Couple child results through the authoritative physical cross blocks.
 
template<typename Fields, typename Constraints>
auto border (const BorderedPreconditioner< Fields, Constraints > &choice)
 Rebuild the constraint Schur system whenever either its physical couplings or its child inverse change.
 
template<typename Strategy>
std::expected< backend::mfem::Inverse, Failure > invert_matrix (std::shared_ptr< const ::mfem::SparseMatrix > matrix, const Strategy &strategy)
 Invert an assembled selected matrix with the chosen dense, sparse direct or AMG backend.
 
template<typename Row, typename Field, typename Strategy>
auto inverse (const BlockPreconditioner< Row, Field, Strategy > &choice)
 Declare only the numerical inputs required by this chosen inverse.
 
template<discretization::blocks::RepresentedValueKind Kind, typename Layout, typename... Coordinates>
std::size_t selected_size (const Layout &layout, utils::dependencies::KeyList< Coordinates... >)
 Count the declared coordinates of a selected physical block.
 
template<typename Key, typename Layout>
std::expected< void, Failure > validate_physical_layout (const Layout &layout, const operators::backend::mfem::LinearizedBlock &block)
 Detect incorrect per-field sizes even when the total packed dimensions happen to agree.
 
template<discretization::blocks::RepresentedValueKind Kind, typename Layout, typename... Coordinates>
std::expected< std::vector< int >, Failure > ordered_indices (const Layout &layout, utils::dependencies::KeyList< Coordinates... >)
 Map each root coefficient to the recipe's explicit subsystem ordering.
 
template<typename Recipe, typename Layout, typename... PhysicalKeys>
auto ordering (utils::dependencies::KeyList< PhysicalKeys... >)
 Bind one inverse to independently ordered state and residual vectors through the common layout.
 
template<typename Rows, typename Values>
auto physical_diagonal ()
 Make physical diagonal extraction visible as its own graph operation.
 
template<typename Rows, typename Values>
auto physical_matrix ()
 Assemble a selected sparse block only for strategies that actually need it.
 

Variables

template<typename Strategy>
constexpr bool needs_diagonal = std::same_as<Strategy, strategies::inverse::Diagonal>
 Identify the inverse strategies whose setup consumes a physical diagonal.
 
template<typename Strategy>
constexpr bool needs_matrix
 Identify strategies requiring an explicitly assembled selected matrix.
 

Function Documentation

◆ border()

template<typename Fields, typename Constraints>
auto serif::solver::preconditioner::computations::border ( const BorderedPreconditioner< Fields, Constraints > & choice)
nodiscard

Rebuild the constraint Schur system whenever either its physical couplings or its child inverse change.

◆ coupling()

template<typename First, typename Second, typename Policy>
auto serif::solver::preconditioner::computations::coupling ( const CoupledPreconditioner< First, Second, Policy > & )
nodiscard

Couple child results through the authoritative physical cross blocks.

◆ inverse()

template<typename Row, typename Field, typename Strategy>
auto serif::solver::preconditioner::computations::inverse ( const BlockPreconditioner< Row, Field, Strategy > & choice)
nodiscard

Declare only the numerical inputs required by this chosen inverse.

◆ invert_matrix()

template<typename Strategy>
std::expected< backend::mfem::Inverse, Failure > serif::solver::preconditioner::computations::invert_matrix ( std::shared_ptr< const ::mfem::SparseMatrix > matrix,
const Strategy & strategy )
nodiscard

Invert an assembled selected matrix with the chosen dense, sparse direct or AMG backend.

◆ ordered_indices()

template<discretization::blocks::RepresentedValueKind Kind, typename Layout, typename... Coordinates>
std::expected< std::vector< int >, Failure > serif::solver::preconditioner::computations::ordered_indices ( const Layout & layout,
utils::dependencies::KeyList< Coordinates... >  )
nodiscard

Map each root coefficient to the recipe's explicit subsystem ordering.

◆ ordering()

template<typename Recipe, typename Layout, typename... PhysicalKeys>
auto serif::solver::preconditioner::computations::ordering ( utils::dependencies::KeyList< PhysicalKeys... > )
nodiscard

Bind one inverse to independently ordered state and residual vectors through the common layout.

◆ physical_diagonal()

template<typename Rows, typename Values>
auto serif::solver::preconditioner::computations::physical_diagonal ( )
nodiscard

Make physical diagonal extraction visible as its own graph operation.

◆ physical_matrix()

template<typename Rows, typename Values>
auto serif::solver::preconditioner::computations::physical_matrix ( )
nodiscard

Assemble a selected sparse block only for strategies that actually need it.

◆ selected_size()

template<discretization::blocks::RepresentedValueKind Kind, typename Layout, typename... Coordinates>
std::size_t serif::solver::preconditioner::computations::selected_size ( const Layout & layout,
utils::dependencies::KeyList< Coordinates... >  )
nodiscard

Count the declared coordinates of a selected physical block.

◆ validate_physical_layout()

template<typename Key, typename Layout>
std::expected< void, Failure > serif::solver::preconditioner::computations::validate_physical_layout ( const Layout & layout,
const operators::backend::mfem::LinearizedBlock & block )
nodiscard

Detect incorrect per-field sizes even when the total packed dimensions happen to agree.

Variable Documentation

◆ needs_diagonal

template<typename Strategy>
bool serif::solver::preconditioner::computations::needs_diagonal = std::same_as<Strategy, strategies::inverse::Diagonal>
inlineconstexpr

Identify the inverse strategies whose setup consumes a physical diagonal.

◆ needs_matrix

template<typename Strategy>
bool serif::solver::preconditioner::computations::needs_matrix
inlineconstexpr
Initial value:
= std::same_as<Strategy, strategies::inverse::DenseDirect> || std::same_as<Strategy, strategies::inverse::FixedAMG> ||
std::same_as<Strategy, strategies::inverse::SparseDirect>

Identify strategies requiring an explicitly assembled selected matrix.