SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::model::StellarState< LayoutT > Struct Template Referencefinal

Own one stellar candidate in physical coordinates, including any solved surface shape. More...

#include <state.hpp>

Collaboration diagram for serif::model::StellarState< LayoutT >:
[legend]

Public Types

using Layout = std::remove_cvref_t<LayoutT>
 

Public Member Functions

 StellarState (Layout layout)
 Allocate one zero-initialized coefficient vector in the declared physical ordering.
 
 StellarState (Layout layout, std::vector< double > values)
 Adopt existing physical coefficients after checking their complete coordinate count.
 
const Layout & layout () const &noexcept
 Inspect the fixed field and equation ordering associated with this state.
 
const Layout & layout () const &&=delete
 Layout references must not outlive a temporary state.
 
template<typename Term>
requires utils::dependencies::ContainsKey<Term, typename Layout::Values>
std::span< double > get () &
 Edit one physical field or scalar without maintaining a second coefficient copy.
 
template<typename Term>
requires utils::dependencies::ContainsKey<Term, typename Layout::Values>
std::span< const double > get () const &
 Inspect one physical field while preserving the constness of its owning state.
 
template<typename Term>
std::span< const double > get () const &&=delete
 A field view cannot outlive a temporary owning state.
 
std::span< double > values () &noexcept
 Access packed physical coordinates for an explicitly chosen numerical update.
 
std::span< const double > values () const &noexcept
 Read packed physical coordinates without permitting a change in their count.
 
std::span< const double > values () const &&=delete
 Do not return a span into a temporary owning state.
 

Private Attributes

Layout m_layout
 
std::vector< double > m_values
 

Detailed Description

template<discretization::blocks::SystemLayoutType LayoutT>
struct serif::model::StellarState< LayoutT >

Own one stellar candidate in physical coordinates, including any solved surface shape.

Note
Copying a state makes an independent candidate. Its layout fixes the field identities and sizes; normalization changes solver coordinates, never these physical coefficients. Prescribed inputs are supplied separately to evaluation because they have no solved coordinate in this layout.

Member Typedef Documentation

◆ Layout

template<discretization::blocks::SystemLayoutType LayoutT>
using serif::model::StellarState< LayoutT >::Layout = std::remove_cvref_t<LayoutT>

Constructor & Destructor Documentation

◆ StellarState() [1/2]

template<discretization::blocks::SystemLayoutType LayoutT>
serif::model::StellarState< LayoutT >::StellarState ( Layout layout)
inlineexplicit

Allocate one zero-initialized coefficient vector in the declared physical ordering.

◆ StellarState() [2/2]

template<discretization::blocks::SystemLayoutType LayoutT>
serif::model::StellarState< LayoutT >::StellarState ( Layout layout,
std::vector< double > values )
inline

Adopt existing physical coefficients after checking their complete coordinate count.

Member Function Documentation

◆ get() [1/3]

template<discretization::blocks::SystemLayoutType LayoutT>
template<typename Term>
requires utils::dependencies::ContainsKey<Term, typename Layout::Values>
std::span< double > serif::model::StellarState< LayoutT >::get ( ) &
inlinenodiscard

Edit one physical field or scalar without maintaining a second coefficient copy.

◆ get() [2/3]

template<discretization::blocks::SystemLayoutType LayoutT>
template<typename Term>
requires utils::dependencies::ContainsKey<Term, typename Layout::Values>
std::span< const double > serif::model::StellarState< LayoutT >::get ( ) const &
inlinenodiscard

Inspect one physical field while preserving the constness of its owning state.

◆ get() [3/3]

template<discretization::blocks::SystemLayoutType LayoutT>
template<typename Term>
std::span< const double > serif::model::StellarState< LayoutT >::get ( ) const &&
delete

A field view cannot outlive a temporary owning state.

◆ layout() [1/2]

template<discretization::blocks::SystemLayoutType LayoutT>
const Layout & serif::model::StellarState< LayoutT >::layout ( ) const &&
delete

Layout references must not outlive a temporary state.

◆ layout() [2/2]

template<discretization::blocks::SystemLayoutType LayoutT>
const Layout & serif::model::StellarState< LayoutT >::layout ( ) const &
inlinenodiscardnoexcept

Inspect the fixed field and equation ordering associated with this state.

◆ values() [1/3]

template<discretization::blocks::SystemLayoutType LayoutT>
std::span< double > serif::model::StellarState< LayoutT >::values ( ) &
inlinenodiscardnoexcept

Access packed physical coordinates for an explicitly chosen numerical update.

◆ values() [2/3]

template<discretization::blocks::SystemLayoutType LayoutT>
std::span< const double > serif::model::StellarState< LayoutT >::values ( ) const &&
delete

Do not return a span into a temporary owning state.

◆ values() [3/3]

template<discretization::blocks::SystemLayoutType LayoutT>
std::span< const double > serif::model::StellarState< LayoutT >::values ( ) const &
inlinenodiscardnoexcept

Read packed physical coordinates without permitting a change in their count.

Member Data Documentation

◆ m_layout

template<discretization::blocks::SystemLayoutType LayoutT>
Layout serif::model::StellarState< LayoutT >::m_layout
private

◆ m_values

template<discretization::blocks::SystemLayoutType LayoutT>
std::vector<double> serif::model::StellarState< LayoutT >::m_values
private

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