SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::model::backend::mfem::AcceptedSystem Class Referencefinal

Own one accepted residual and Jacobian, retaining the discretization owner used by every child action. More...

#include <system.hpp>

Collaboration diagram for serif::model::backend::mfem::AcceptedSystem:
[legend]

Public Member Functions

 AcceptedSystem (int residual_size, int state_size, std::vector< ResidualContribution > residuals, std::vector< JacobianContribution > jacobian, std::vector< RowReplacement > replacements={}, std::shared_ptr< const void > owner={}, std::optional< std::vector< JacobianContribution > > complete_actions={})
 Validate coordinate bounds and row ownership without assuming a square system.
 
const std::vector< double > & residual () const noexcept
 Read the frozen physical residual in the declared residual order.
 
const LinearizedBlock & jacobian () const noexcept
 Access both directions of this accepted physical Jacobian.
 
LinearizedBlock block (int row_offset, int row_size, int column_offset, int column_size) const
 Select a physical coupling without applying unrelated equations; the result retains this snapshot and its owner.
 
LinearizedBlock block (std::span< const CoordinateRange > rows, std::span< const CoordinateRange > columns) const
 Concatenate selected equation and state ranges in their supplied order, retaining this accepted system.
 

Private Attributes

std::shared_ptr< const detail::SystemData > m_data
 
std::vector< double > m_residual
 
LinearizedBlock m_jacobian
 

Detailed Description

Own one accepted residual and Jacobian, retaining the discretization owner used by every child action.

Constructor & Destructor Documentation

◆ AcceptedSystem()

serif::model::backend::mfem::AcceptedSystem::AcceptedSystem ( int residual_size,
int state_size,
std::vector< ResidualContribution > residuals,
std::vector< JacobianContribution > jacobian,
std::vector< RowReplacement > replacements = {},
std::shared_ptr< const void > owner = {},
std::optional< std::vector< JacobianContribution > > complete_actions = {} )

Validate coordinate bounds and row ownership without assuming a square system.

Note
Optional complete actions must represent the same ordinary Jacobian as the blocks. They accelerate whole-system products; block selection and assembly keep using the physical blocks.

Member Function Documentation

◆ block() [1/2]

LinearizedBlock serif::model::backend::mfem::AcceptedSystem::block ( int row_offset,
int row_size,
int column_offset,
int column_size ) const
nodiscard

Select a physical coupling without applying unrelated equations; the result retains this snapshot and its owner.

◆ block() [2/2]

LinearizedBlock serif::model::backend::mfem::AcceptedSystem::block ( std::span< const CoordinateRange > rows,
std::span< const CoordinateRange > columns ) const
nodiscard

Concatenate selected equation and state ranges in their supplied order, retaining this accepted system.

◆ jacobian()

const LinearizedBlock & serif::model::backend::mfem::AcceptedSystem::jacobian ( ) const
nodiscardnoexcept

Access both directions of this accepted physical Jacobian.

◆ residual()

const std::vector< double > & serif::model::backend::mfem::AcceptedSystem::residual ( ) const
nodiscardnoexcept

Read the frozen physical residual in the declared residual order.

Member Data Documentation

◆ m_data

std::shared_ptr<const detail::SystemData> serif::model::backend::mfem::AcceptedSystem::m_data
private

◆ m_jacobian

LinearizedBlock serif::model::backend::mfem::AcceptedSystem::m_jacobian
private

◆ m_residual

std::vector<double> serif::model::backend::mfem::AcceptedSystem::m_residual
private

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