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

An accepted physical block with optional efficient diagonal and sparse assembly operations. More...

#include <linearized_block.hpp>

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

Classes

struct  Data
 

Public Types

using Action = std::shared_ptr<const ::mfem::Operator>
 
using Diagonal = std::function<std::vector<double>()>
 
using Assembly = std::function<std::shared_ptr<const ::mfem::SparseMatrix>()>
 

Public Member Functions

 LinearizedBlock (Action action, Diagonal diagonal={}, Assembly assembly={})
 Retain an immutable action and its matching assembly routines; captures must retain their accepted data.
 
const Action & action () const noexcept
 Read the physical action belonging to this accepted block.
 
bool has_diagonal () const noexcept
 Whether diagonal extraction is available without global column probing.
 
bool has_assembly () const noexcept
 Whether this block supports explicit sparse assembly.
 
std::vector< double > diagonal () const
 Extract the physical operator diagonal, including any installed boundary rows.
 
std::shared_ptr< const ::mfem::SparseMatrix > assemble () const
 Assemble only this selected physical block.
 
bool operator== (const LinearizedBlock &) const=default
 Accepted block identity is stable across copies, but changes when a new linearization is supplied.
 

Private Attributes

std::shared_ptr< const Data > m_data
 

Detailed Description

An accepted physical block with optional efficient diagonal and sparse assembly operations.

Member Typedef Documentation

◆ Action

using serif::operators::backend::mfem::LinearizedBlock::Action = std::shared_ptr<const ::mfem::Operator>

◆ Assembly

using serif::operators::backend::mfem::LinearizedBlock::Assembly = std::function<std::shared_ptr<const ::mfem::SparseMatrix>()>

◆ Diagonal

using serif::operators::backend::mfem::LinearizedBlock::Diagonal = std::function<std::vector<double>()>

Constructor & Destructor Documentation

◆ LinearizedBlock()

serif::operators::backend::mfem::LinearizedBlock::LinearizedBlock ( Action action,
Diagonal diagonal = {},
Assembly assembly = {} )
explicit

Retain an immutable action and its matching assembly routines; captures must retain their accepted data.

Member Function Documentation

◆ action()

const LinearizedBlock::Action & serif::operators::backend::mfem::LinearizedBlock::action ( ) const
nodiscardnoexcept

Read the physical action belonging to this accepted block.

◆ assemble()

std::shared_ptr< const::mfem::SparseMatrix > serif::operators::backend::mfem::LinearizedBlock::assemble ( ) const
nodiscard

Assemble only this selected physical block.

◆ diagonal()

std::vector< double > serif::operators::backend::mfem::LinearizedBlock::diagonal ( ) const
nodiscard

Extract the physical operator diagonal, including any installed boundary rows.

◆ has_assembly()

bool serif::operators::backend::mfem::LinearizedBlock::has_assembly ( ) const
nodiscardnoexcept

Whether this block supports explicit sparse assembly.

◆ has_diagonal()

bool serif::operators::backend::mfem::LinearizedBlock::has_diagonal ( ) const
nodiscardnoexcept

Whether diagonal extraction is available without global column probing.

◆ operator==()

bool serif::operators::backend::mfem::LinearizedBlock::operator== ( const LinearizedBlock & ) const
nodiscarddefault

Accepted block identity is stable across copies, but changes when a new linearization is supplied.

Member Data Documentation

◆ m_data

std::shared_ptr<const Data> serif::operators::backend::mfem::LinearizedBlock::m_data
private

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