GridFire 0.0.1a
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::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. | |
![]() | |
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 | |
![]() | |
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.
Definition at line 21 of file screening_bare.h.
|
private |
Alias for CppAD Automatic Differentiation type for double precision.
Definition at line 23 of file screening_bare.h.
|
nodiscardprivate |
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 | A vector of molar abundances (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. |
T9 | Unused parameter. |
rho | Unused parameter. |
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.
|
nodiscardoverridevirtual |
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 | 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). |
reactions
set. Implements gridfire::screening::ScreeningModel.
Definition at line 12 of file screening_bare.cpp.
|
nodiscardoverridevirtual |
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 (unused). |
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.
Definition at line 22 of file screening_bare.cpp.