GridFire 0.0.1a General Purpose Nuclear Network

Loading...
Searching...
No Matches
Public Member Functions | Private Types | Private Member Functions | List of all members
gridfire::screening::BareScreeningModel Class Referencefinal

A screening model that applies no screening effect. More...

`#include <screening_bare.h>`

Inheritance diagram for gridfire::screening::BareScreeningModel:

## Public Member Functions
std::vector< double > | calculateScreeningFactors (const reaction::LogicalReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< double > &Y, const double T9, const double rho) const override
| Calculates screening factors, which are always 1.0.
std::vector< ADDouble > | calculateScreeningFactors (const reaction::LogicalReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< ADDouble > &Y, const ADDouble T9, const ADDouble rho) const override
| Calculates screening factors for AD types, which are always 1.0.
Public Member Functions inherited from gridfire::screening::ScreeningModel
virtual | ~ScreeningModel ()=default
| Virtual destructor.

## Private Types
using | ADDouble = CppAD::AD<double>
| Alias for CppAD Automatic Differentiation type for double precision.

## Private Member Functions
template<typename T>
std::vector< T > | calculateFactors_impl (const reaction::LogicalReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< T > &Y, const T T9, const T rho) const
| Template implementation for calculating screening factors.

## Additional Inherited Members
Public Types inherited from gridfire::screening::ScreeningModel
using | ADDouble = CppAD::AD<double>
| Alias for CppAD Automatic Differentiation type for double precision.

## Detailed Description

A screening model that applies no screening effect.

This class implements the `ScreeningModel` interface but returns a screening factor of 1.0 for all reactions, regardless of the plasma conditions. It represents the case of bare, unscreened nuclei and serves as a baseline or can be used when screening effects are negligible or intentionally ignored.

Definition at line 21 of file screening_bare.h.

## Member Typedef Documentation

## ◆ ADDouble

using gridfire::screening::BareScreeningModel::ADDouble = CppAD::AD<double>
| private

Alias for CppAD Automatic Differentiation type for double precision.

Definition at line 23 of file screening_bare.h.

## Member Function Documentation

## ◆ calculateFactors_impl()

template<typename T>

std::vector< T > gridfire::screening::BareScreeningModel::calculateFactors_impl | ( | const reaction::LogicalReactionSet & | reactions,
|  | const std::vector< fourdst::atomic::Species > & | species,
|  | const std::vector< T > & | Y,
|  | const T | T9,
|  | const T | rho ) const
| nodiscard private

Template implementation for calculating screening factors.

Template implementation for the bare screening model.

This private helper function contains the core logic for both the `double` and `ADDouble` versions of `calculateScreeningFactors`. It is templated to handle both numeric types seamlessly.

Template Parameters

  T | The numeric type, either `double` or `CppAD::AD<double>`.

Parameters

  reactions | The set of reactions for which to calculate factors.
  species | A vector of all atomic species (unused).
  Y | A vector of molar abundances (unused).
  T9 | The temperature (unused).
  rho | The density (unused).

Returns
  A vector of type `T` with all elements initialized to 1.0.

This function provides the actual implementation for `calculateFactors_impl`. It creates a vector of the appropriate numeric type (`T`) and size, and initializes all its elements to 1.0, representing no screening.

Template Parameters

  T | The numeric type, either `double` or `CppAD::AD<double>`.

Parameters

  reactions | The set of reactions, used to determine the size of the output vector.
  species | Unused parameter.
  Y | Unused parameter.
  T9 | Unused parameter.
  rho | Unused parameter.

Returns
  A `std::vector<T>` of the same size as `reactions`, with all elements set to 1.0.

Definition at line 126 of file screening_bare.h.

## ◆ calculateScreeningFactors() [1/2]

std::vector< ADDouble > gridfire::screening::BareScreeningModel::calculateScreeningFactors | ( | const reaction::LogicalReactionSet & | reactions,
|  | const std::vector< fourdst::atomic::Species > & | species,
|  | const std::vector< ADDouble > & | Y,
|  | const ADDouble | T9,
|  | const ADDouble | rho ) const
| nodiscard override virtual

Calculates screening factors for AD types, which are always 1.0.

This implementation returns a vector of AD-typed screening factors where every element is 1.0. This is the automatic differentiation-compatible version.

Parameters

  reactions | The set of logical reactions in the network.
  species | A vector of all atomic species (unused).
  Y | A vector of the molar abundances as AD types (unused).
  T9 | The temperature as an AD type (unused).
  rho | The plasma density as an AD type (unused).

Returns
  A vector of ADDouble, with each element being 1.0, of the same size as the `reactions` set.

Implements gridfire::screening::ScreeningModel.

Definition at line 12 of file screening_bare.cpp.

## ◆ calculateScreeningFactors() [2/2]

std::vector< double > gridfire::screening::BareScreeningModel::calculateScreeningFactors | ( | const reaction::LogicalReactionSet & | reactions,
|  | const std::vector< fourdst::atomic::Species > & | species,
|  | const std::vector< double > & | Y,
|  | const double | T9,
|  | const double | rho ) const
| nodiscard override virtual

Calculates screening factors, which are always 1.0.

This implementation returns a vector of screening factors where every element is 1.0, effectively applying no screening correction to the reaction rates.

Parameters

  reactions | The set of logical reactions in the network.
  species | A vector of all atomic species (unused).
  Y | A vector of the molar abundances (unused).
  T9 | The temperature (unused).
  rho | The plasma density (unused).

Returns
  A vector of doubles, with each element being 1.0, of the same size as the `reactions` set.

Algorithm The function simply creates and returns a `std::vector<double>` of the same size as the input `reactions` set, with all elements initialized to 1.0.

Usage

BareScreeningModel bare_model;
// ... (initialize reactions, species, Y, T9, rho)
std::vector<double> factors = bare_model.calculateScreeningFactors(
reactions, species, Y, T9, rho
);
// 'factors' will contain [1.0, 1.0, ...]
gridfire::screening::BareScreeningModel
A screening model that applies no screening effect.
Definition screening_bare.h:21
gridfire::screening::BareScreeningModel::calculateScreeningFactors
std::vector< double > calculateScreeningFactors(const reaction::LogicalReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< double > &Y, const double T9, const double rho) const override
Calculates screening factors, which are always 1.0.
Definition screening_bare.cpp:22

Implements gridfire::screening::ScreeningModel.

Definition at line 22 of file screening_bare.cpp.

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

- src/include/gridfire/screening/screening_bare.h
- src/lib/screening/screening_bare.cpp