GridFire v0.7.0-alpha
General Purpose Nuclear Network
Loading...
Searching...
No Matches
gridfire::policy::ProtonProtonChainPolicy Class Referencefinal

A ReactionChainPolicy for the Proton-Proton (PP) chain. More...

#include <chains.h>

Inheritance diagram for gridfire::policy::ProtonProtonChainPolicy:
[legend]
Collaboration diagram for gridfire::policy::ProtonProtonChainPolicy:
[legend]

Public Member Functions

 ProtonProtonChainPolicy ()
 Constructs the policy and initializes its reaction set from REACLIB.
 
const reaction::ReactionSet & get_reactions () const override
 Returns the set of reactions in the PP chain.
 
- Public Member Functions inherited from gridfire::policy::ReactionChainPolicy
virtual ~ReactionChainPolicy ()=default
 

Private Attributes

std::vector< std::string > m_reactionIDs
 
reaction::ReactionSet m_reactions
 

Detailed Description

A ReactionChainPolicy for the Proton-Proton (PP) chain.

Encapsulates the set of reactions that constitute the three branches of the PP chain, which is the primary energy generation mechanism in stars like the Sun.

Exceptions
gridfire::exceptions::MissingBaseReactionErrorif a required reaction for the PP chain is not found in the REACLIB database during construction.

Constructor & Destructor Documentation

◆ ProtonProtonChainPolicy()

gridfire::policy::ProtonProtonChainPolicy::ProtonProtonChainPolicy ( )
inline

Constructs the policy and initializes its reaction set from REACLIB.

Member Function Documentation

◆ get_reactions()

const reaction::ReactionSet & gridfire::policy::ProtonProtonChainPolicy::get_reactions ( ) const
inlinenodiscardoverridevirtual

Returns the set of reactions in the PP chain.

Returns
const reaction::ReactionSet&
Example
const auto& reactions = pp_policy.get_reactions();
std::cout << "PP chain has " << reactions.size() << " reactions." << std::endl;
ProtonProtonChainPolicy()
Constructs the policy and initializes its reaction set from REACLIB.
Definition chains.h:221
const reaction::ReactionSet & get_reactions() const override
Returns the set of reactions in the PP chain.
Definition chains.h:58
size_t size() const
Gets the number of reactions in the set.
Definition reaction.h:817

Implements gridfire::policy::ReactionChainPolicy.

Member Data Documentation

◆ m_reactionIDs

std::vector<std::string> gridfire::policy::ProtonProtonChainPolicy::m_reactionIDs
private
Initial value:
= {
"p(p,e+)d",
"d(p,g)he3",
"he3(he3,2p)he4",
"he4(he3,g)be7",
"be7(e-,)li7",
"li7(p,a)he4",
"be7(p,g)b8",
"b8(,e+)be8",
"be8(,a)he4"
}

◆ m_reactions

reaction::ReactionSet gridfire::policy::ProtonProtonChainPolicy::m_reactions
private

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