GridFire v0.7.1_rc2 General Purpose Nuclear Network

Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
gridfire::policy::ReactionChainPolicy Class Referenceabstract

Abstract interface encapsulating a set of reactions representing a single chain or pathway. More...

`#include <policy_abstract.h>`

Inheritance diagram for gridfire::policy::ReactionChainPolicy:
[legend]

## Public Member Functions
virtual | ~ReactionChainPolicy ()=default
virtual const reaction::ReactionSet & | get_reactions () const =0
| Returns the ReactionSet describing this chain.
virtual bool | contains (const std::string &id) const =0
virtual bool | contains (const reaction::Reaction &reaction) const =0
virtual std::unique_ptr< ReactionChainPolicy > | clone () const =0
virtual std::string | name () const =0
virtual uint64_t | hash (uint64_t seed) const =0
virtual bool | operator== (const ReactionChainPolicy &other) const =0
virtual bool | operator!= (const ReactionChainPolicy &other) const =0

## Friends
std::ostream & | operator<< (std::ostream &os, const ReactionChainPolicy &rcp)

## Detailed Description

Abstract interface encapsulating a set of reactions representing a single chain or pathway.

ReactionChainPolicy implementations (see `chains.h`) supply a ReactionSet describing the reactions that comprise a nuclear reaction chain (for example the proton-proton chain, CNO cycle, etc.).

Example
  ProtonProtonChainPolicy pp;
  const gridfire::reaction::ReactionSet& reactions = pp.get_reactions();
  gridfire::policy::MultiReactionChainPolicy::get_reactions
  const reaction::ReactionSet & get_reactions() const override
  Returns the combined ReactionSet of all child chain policies.
  Definition policy_logical.cpp:20
  gridfire::policy::ProtonProtonChainPolicy
  Proton-Proton Chain Policy.
  Definition chains.h:197
  gridfire::reaction::ReactionSet
  Definition reaction.h:842

Note
  Concrete implementations may throw exceptions on construction if the underlying reaction database (e.g. REACLIB) does not include requested reactions. See `chains.h` for details.

## Constructor & Destructor Documentation

## ◆ ~ReactionChainPolicy()

virtual gridfire::policy::ReactionChainPolicy::~ReactionChainPolicy | ( |  | ) |
| virtual default

## Member Function Documentation

## ◆ clone()

virtual std::unique_ptr< ReactionChainPolicy > gridfire::policy::ReactionChainPolicy::clone | ( |  | ) | const
| pure virtual

Implemented in gridfire::policy::ProtonProtonIChainPolicy, gridfire::policy::ProtonProtonIIChainPolicy, gridfire::policy::ProtonProtonIIIChainPolicy, gridfire::policy::CNOIChainPolicy, gridfire::policy::CNOIIChainPolicy, gridfire::policy::CNOIIIChainPolicy, gridfire::policy::CNOIVChainPolicy, gridfire::policy::HotCNOIChainPolicy, gridfire::policy::HotCNOIIChainPolicy, gridfire::policy::HotCNOIIIChainPolicy, gridfire::policy::TripleAlphaChainPolicy, gridfire::policy::MultiReactionChainPolicy, and PyReactionChainPolicy.

## ◆ contains() [1/2]

virtual bool gridfire::policy::ReactionChainPolicy::contains | ( | const reaction::Reaction & | reaction | ) | const
| pure virtual

Implemented in PyReactionChainPolicy, gridfire::policy::TemperatureDependentChainPolicy, and gridfire::policy::MultiReactionChainPolicy.

## ◆ contains() [2/2]

virtual bool gridfire::policy::ReactionChainPolicy::contains | ( | const std::string & | id | ) | const
| pure virtual

Implemented in gridfire::policy::TemperatureDependentChainPolicy, gridfire::policy::MultiReactionChainPolicy, and PyReactionChainPolicy.

## ◆ get_reactions()

virtual const reaction::ReactionSet & gridfire::policy::ReactionChainPolicy::get_reactions | ( |  | ) | const
| pure virtual

Returns the ReactionSet describing this chain.

Returns
  const reaction::ReactionSet& reference to the chain's reactions.

Example
  const reaction::ReactionSet &set = chainPolicy.get_reactions();
  std::cout << "Chain contains " << set.size() << " reactions\n";
  gridfire::reaction::ReactionSet::size
  size_t size() const
  Gets the number of reactions in the set.
  Definition reaction.h:903

Exceptions

  gridfire::exceptions::MissingBaseReactionError | may be thrown by concrete implementations at construction time if the required reactions cannot be found in the base reaction set.

Implemented in gridfire::policy::TemperatureDependentChainPolicy, gridfire::policy::MultiReactionChainPolicy, and PyReactionChainPolicy.

## ◆ hash()

virtual uint64_t gridfire::policy::ReactionChainPolicy::hash | ( | uint64_t | seed | ) | const
| pure virtual

Implemented in gridfire::policy::TemperatureDependentChainPolicy, gridfire::policy::MultiReactionChainPolicy, and PyReactionChainPolicy.

## ◆ name()

virtual std::string gridfire::policy::ReactionChainPolicy::name | ( |  | ) | const
| pure virtual

Implemented in gridfire::policy::ProtonProtonIChainPolicy, gridfire::policy::ProtonProtonIIChainPolicy, gridfire::policy::ProtonProtonIIIChainPolicy, gridfire::policy::ProtonProtonChainPolicy, gridfire::policy::CNOIChainPolicy, gridfire::policy::CNOIIChainPolicy, gridfire::policy::CNOIIIChainPolicy, gridfire::policy::CNOIVChainPolicy, gridfire::policy::CNOChainPolicy, gridfire::policy::HotCNOIChainPolicy, gridfire::policy::HotCNOIIChainPolicy, gridfire::policy::HotCNOIIIChainPolicy, gridfire::policy::HotCNOChainPolicy, gridfire::policy::TripleAlphaChainPolicy, gridfire::policy::MainSequenceReactionChainPolicy, gridfire::policy::MultiReactionChainPolicy, and PyReactionChainPolicy.

## ◆ operator!=()

virtual bool gridfire::policy::ReactionChainPolicy::operator!= | ( | const ReactionChainPolicy & | other | ) | const
| pure virtual

Implemented in gridfire::policy::TemperatureDependentChainPolicy, and gridfire::policy::MultiReactionChainPolicy.

## ◆ operator==()

virtual bool gridfire::policy::ReactionChainPolicy::operator== | ( | const ReactionChainPolicy & | other | ) | const
| pure virtual

Implemented in gridfire::policy::TemperatureDependentChainPolicy, and gridfire::policy::MultiReactionChainPolicy.

## Friends And Related Symbol Documentation

## ◆ operator<<

std::ostream & operator<< | ( | std::ostream & | os,
|  | const ReactionChainPolicy & | rcp
| ) |  |
| friend

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

- src/include/gridfire/policy/policy_abstract.h