SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
eos_reference.hpp File Reference
#include <memory>
#include <stdexcept>
#include <type_traits>
#include <utility>
#include "serif/utils/error/errors.hpp"
Include dependency graph for eos_reference.hpp:
This graph shows which files directly or indirectly include this file:

Classes

class  serif::model::EosReference< EOS >
 Reuse one immutable EOS in equation objects, optionally retaining shared ownership. More...
 

Namespaces

namespace  serif
 
namespace  serif::model
 

Functions

template<typename Model>
auto serif::model::share_equation_of_state (std::shared_ptr< const Model > model)
 Share the EOS subobject while retaining the model that owns it.
 
template<typename EOS>
EosReference< EOS > serif::model::borrow_eos (const EOS &eos) noexcept
 Borrow the model-owned EOS when the prepared graph already retains its immutable model owner.
 
template<typename EOS>
requires (!std::is_lvalue_reference_v<EOS>)
void serif::model::borrow_eos (EOS &&)=delete
 Borrowing never extends a temporary EOS lifetime.