GridFire 0.0.1a
General Purpose Nuclear Network
Loading...
Searching...
No Matches
screening_bare.h
Go to the documentation of this file.
1#pragma once
2
5
6#include "cppad/cppad.hpp"
7
8namespace gridfire::screening {
21 class BareScreeningModel final : public ScreeningModel {
23 using ADDouble = CppAD::AD<double>;
24 public:
54 [[nodiscard]] std::vector<double> calculateScreeningFactors(
55 const reaction::LogicalReactionSet& reactions,
56 const std::vector<fourdst::atomic::Species>& species,
57 const std::vector<double>& Y,
58 const double T9,
59 const double rho
60 ) const override;
61
77 [[nodiscard]] std::vector<ADDouble> calculateScreeningFactors(
78 const reaction::LogicalReactionSet& reactions,
79 const std::vector<fourdst::atomic::Species>& species,
80 const std::vector<ADDouble>& Y,
81 const ADDouble T9,
82 const ADDouble rho
83 ) const override;
84 private:
100 template <typename T>
101 [[nodiscard]] std::vector<T> calculateFactors_impl(
102 const reaction::LogicalReactionSet& reactions,
103 const std::vector<fourdst::atomic::Species>& species,
104 const std::vector<T>& Y,
105 const T T9,
106 const T rho
107 ) const;
108 };
109
125 template<typename T>
127 const reaction::LogicalReactionSet &reactions,
128 const std::vector<fourdst::atomic::Species> &species,
129 const std::vector<T> &Y,
130 const T T9,
131 const T rho
132 ) const {
133 return std::vector<T>(reactions.size(), T(1.0)); // Bare screening returns 1.0 for all reactions
134 }
135}
size_t size() const
Gets the number of reactions in the set.
Definition reaction.h:453
A screening model that applies no screening effect.
CppAD::AD< double > ADDouble
Alias for CppAD Automatic Differentiation type for double precision.
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.
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.
An abstract base class for plasma screening models.
TemplatedReactionSet< LogicalReaction > LogicalReactionSet
A set of logical reactions.
Definition reaction.h:557
Defines classes for representing and managing nuclear reactions.