SpECTRE  v2024.04.12
TimeSteppers::BoundaryHistory< LocalData, RemoteData, CouplingResult >::SideAccessCommon< Local, Mutable > Class Template Reference

Public Types

using MutableData = tmpl::conditional_t< Local, LocalData, RemoteData >
 
using Data = tmpl::conditional_t< Mutable, MutableData, const MutableData >
 

Public Member Functions

size_t size () const override
 
const TimeStepIdoperator[] (const size_t n) const override
 
const TimeStepIdoperator[] (const std::pair< size_t, size_t > &step_and_substep) const override
 
size_t integration_order (const size_t n) const override
 
size_t integration_order (const TimeStepId &id) const override
 
size_t number_of_substeps (const size_t n) const override
 
size_t number_of_substeps (const TimeStepId &id) const override
 
template<typename Func >
void for_each (Func &&func) const
 Apply func to each entry. More...
 
Data & data (const size_t n) const
 Access the data stored on the side. When performed through a MutableSideAccess, these allow modification of the data. Performing such modifications likely invalidates the coupling cache for the associated BoundaryHistory object, which should be cleared.
 
Data & data (const TimeStepId &id) const
 Access the data stored on the side. When performed through a MutableSideAccess, these allow modification of the data. Performing such modifications likely invalidates the coupling cache for the associated BoundaryHistory object, which should be cleared.
 

Static Public Member Functions

static constexpr size_t max_size ()
 

Protected Types

using StoredHistory = tmpl::conditional_t< Mutable, BoundaryHistory, const BoundaryHistory >
 

Protected Member Functions

auto & parent_data () const
 
auto & step_data (const TimeStepId &id) const
 
auto & entry (const TimeStepId &id) const
 
auto & entry (const std::pair< size_t, size_t > &step_and_substep) const
 
 SideAccessCommon (const gsl::not_null< StoredHistory * > parent)
 

Protected Attributes

gsl::not_null< StoredHistory * > parent_
 

Member Function Documentation

◆ for_each()

template<typename LocalData , typename RemoteData , typename CouplingResult >
template<bool Local, bool Mutable>
template<typename Func >
void TimeSteppers::BoundaryHistory< LocalData, RemoteData, CouplingResult >::SideAccessCommon< Local, Mutable >::for_each ( Func &&  func) const

Apply func to each entry.

The function func must accept two arguments, one of type const TimeStepId& and a second of either type const Data& or gsl::not_null<Data*>. (Note that Data may be a const-qualified type.) If entries are modified, the coupling cache must be cleared by calling clear_coupling_cache() on the parent BoundaryHistory object.


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