GridFire v0.7.1_rc2 General Purpose Nuclear Network

Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Attributes | List of all members
gridfire::policy::TemperatureDependentChainPolicy Class Reference

Base class for reaction chain policies that are active only within specific temperature ranges. More...

`#include <chains.h>`

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

## Classes
struct | ActiveTempRange
| Struct to hold the active temperature range for the reaction chain. More...

## Public Member Functions
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs)
| Construct a new Temperature Dependent Chain Policy object.
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9)
| Construct a new Temperature Dependent Chain Policy object.
| TemperatureDependentChainPolicy (const std::vector< std::string > &reactionIDs, std::optional< double > minT9, std::optional< double > maxT9)
| Construct a new Temperature Dependent Chain Policy object.
| ~TemperatureDependentChainPolicy () override=default
| Virtual destructor.
const reaction::ReactionSet & | get_reactions () const override
| Get the reactions that comprise the chain.
bool | contains (const std::string &id) const override
| Check if a reaction or reaction ID is part of the chain.
bool | contains (const reaction::Reaction &reaction) const override
| Check if a reaction is part of the chain.
uint64_t | hash (uint64_t seed) const override
| Generate the hash for the reaction chain policy.
bool | operator== (const ReactionChainPolicy &other) const override
| Equality operator.
bool | operator!= (const ReactionChainPolicy &other) const override
| Inequality operator.
bool | is_active (double T9) const
| Check if the reaction chain is active at a given temperature.
Public Member Functions inherited from gridfire::policy::ReactionChainPolicy
virtual | ~ReactionChainPolicy ()=default
virtual std::unique_ptr< ReactionChainPolicy > | clone () const =0
virtual std::string | name () const =0

## Protected Attributes
ActiveTempRange | m_tempRange
| Active temperature range for the reaction chain.
std::vector< std::string > | m_reactionIDs
| Vector of reaction IDs that comprise the chain.
reaction::ReactionSet | m_reactions
| Set of reactions that comprise the chain.

## Detailed Description

Base class for reaction chain policies that are active only within specific temperature ranges.

Such chains may only operate effectively within certain temperature regimes, reflecting the physical conditions required for the reactions to proceed. This class allows defining such temperature-dependent behavior. This is one of the locations where domain specific knowledge is allowed within GridFire.

## Constructor & Destructor Documentation

## ◆ TemperatureDependentChainPolicy() [1/3]

gridfire::policy::TemperatureDependentChainPolicy::TemperatureDependentChainPolicy | ( | const std::vector< std::string > & | reactionIDs | ) |
| explicit

Construct a new Temperature Dependent Chain Policy object.

Parameters

  reactionIDs | Vector of reaction IDs that comprise the chain

Note
  The chain is considered active at all temperatures if no min/max T9 are provided.

## ◆ TemperatureDependentChainPolicy() [2/3]

gridfire::policy::TemperatureDependentChainPolicy::TemperatureDependentChainPolicy | ( | const std::vector< std::string > & | reactionIDs,
|  | std::optional< double > | minT9
| ) |  |
| explicit

Construct a new Temperature Dependent Chain Policy object.

Parameters

  reactionIDs | Vector of reaction IDs that comprise the chain
  minT9 | Minimum temperature (in T9) for which the chain is active

Note
  The chain is considered active at all temperatures above minT9.

## ◆ TemperatureDependentChainPolicy() [3/3]

gridfire::policy::TemperatureDependentChainPolicy::TemperatureDependentChainPolicy | ( | const std::vector< std::string > & | reactionIDs,
|  | std::optional< double > | minT9,
|  | std::optional< double > | maxT9
| ) |  |
| explicit

Construct a new Temperature Dependent Chain Policy object.

Parameters

  reactionIDs | Vector of reaction IDs that comprise the chain
  minT9 | Minimum temperature (in T9) for which the chain is active
  maxT9 | Maximum temperature (in T9) for which the chain is active

## ◆ ~TemperatureDependentChainPolicy()

gridfire::policy::TemperatureDependentChainPolicy::~TemperatureDependentChainPolicy | ( |  | ) |
| override default

Virtual destructor.

## Member Function Documentation

## ◆ contains() [1/2]

bool gridfire::policy::TemperatureDependentChainPolicy::contains | ( | const reaction::Reaction & | reaction | ) | const
| override virtual

Check if a reaction is part of the chain.

Parameters

  reaction | The reaction to check

Returns
  True if the reaction is part of the chain, false otherwise

Implements gridfire::policy::ReactionChainPolicy.

## ◆ contains() [2/2]

bool gridfire::policy::TemperatureDependentChainPolicy::contains | ( | const std::string & | id | ) | const
| override virtual

Check if a reaction or reaction ID is part of the chain.

Parameters

  id | The reaction ID to check

Returns
  True if the reaction ID is part of the chain, false otherwise

Implements gridfire::policy::ReactionChainPolicy.

## ◆ get_reactions()

const reaction::ReactionSet & gridfire::policy::TemperatureDependentChainPolicy::get_reactions | ( |  | ) | const
| override virtual

Get the reactions that comprise the chain.

Returns
  The set of reactions comprising the chain

Implements gridfire::policy::ReactionChainPolicy.

## ◆ hash()

uint64_t gridfire::policy::TemperatureDependentChainPolicy::hash | ( | uint64_t | seed | ) | const
| override virtual

Generate the hash for the reaction chain policy.

Parameters

  seed | Seed value for the hash

Returns
  Unique hash representing the reaction chain policy. XXHash64 is used internally for speed and collision resistance.

Implements gridfire::policy::ReactionChainPolicy.

## ◆ is_active()

bool gridfire::policy::TemperatureDependentChainPolicy::is_active | ( | double | T9 | ) | const

Check if the reaction chain is active at a given temperature.

Parameters

  T9 | Temperature in billions of Kelvin (T9)

Returns
  True if the chain is active at the given temperature, false otherwise

## ◆ operator!=()

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

Inequality operator.

Parameters

  other | The other ReactionChainPolicy to compare against

Returns
  True if the two policies are not equal, false otherwise

Implements gridfire::policy::ReactionChainPolicy.

## ◆ operator==()

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

Equality operator.

Parameters

  other | The other ReactionChainPolicy to compare against

Returns
  True if the two policies are equal, false otherwise

Implements gridfire::policy::ReactionChainPolicy.

## Member Data Documentation

## ◆ m_reactionIDs

std::vector<std::string> gridfire::policy::TemperatureDependentChainPolicy::m_reactionIDs
| protected

Vector of reaction IDs that comprise the chain.

## ◆ m_reactions

reaction::ReactionSet gridfire::policy::TemperatureDependentChainPolicy::m_reactions
| protected

Set of reactions that comprise the chain.

## ◆ m_tempRange

ActiveTempRange gridfire::policy::TemperatureDependentChainPolicy::m_tempRange
| protected

Active temperature range for the reaction chain.

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

- src/include/gridfire/policy/chains.h
- src/lib/policy/chains.cpp