|
GridFire v0.7.1_rc2
General Purpose Nuclear Network
|
A screening model that applies no screening effect. More...
#include <screening_bare.h>
Public Member Functions | |
| std::vector< double > | calculateScreeningFactors (const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< double > &Y, double T9, double rho) const override |
| Calculates screening factors, which are always 1.0. | |
| std::vector< ADDouble > | calculateScreeningFactors (const reaction::ReactionSet &reactions, const std::vector< fourdst::atomic::Species > &species, const std::vector< CppAD::AD< double > > &Y, ADDouble T9, 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::ReactionSet &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. | |
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.
|
private |
Alias for CppAD Automatic Differentiation type for double precision.
|
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.
| T | The numeric type, either double or CppAD::AD<double>. |
| reactions | The set of reactions for which to calculate factors. |
| species | A vector of all atomic species (unused). |
| Y | The current molar composition (unused). |
| T9 | The temperature (unused). |
| rho | The density (unused). |
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.
| T | The numeric type, either double or CppAD::AD<double>. |
| reactions | The set of reactions, used to determine the size of the output vector. |
| species | Unused parameter. |
| Y | Unused parameter. @param T9 Unused parameter. @param rho Unused parameter. @return Astd::vector<T>of the same size asreactions`, with all elements set to 1.0. |
|
overridevirtual |
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.
| reactions | The set of logical reactions in the network. |
| species | A vector of all atomic species (unused). |
| Y | The current composition, providing molar abundances (mol/g) for each species (unused). |
| T9 | The temperature as an AD type (unused). |
| rho | The plasma density as an AD type (unused). |
reactions set. Implements gridfire::screening::ScreeningModel.
|
overridevirtual |
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.
| reactions | The set of logical reactions in the network. |
| species | A vector of all atomic species (unused). |
| Y | A vector of the molar abundances. |
| T9 | The temperature (unused). |
| rho | The plasma density (unused). |
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
Implements gridfire::screening::ScreeningModel.