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
3#include "gridfire/screening/screening_abstract.h"
4#include "gridfire/reaction/reaction.h"
5
6#include "cppad/cppad.hpp"
7
8 namespace 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>
126 std::vector<T> BareScreeningModel::calculateFactors_impl(
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}
gridfire::reaction::TemplatedReactionSet::size
size_t size() const
Gets the number of reactions in the set.
Definition reaction.h:459
gridfire::screening::BareScreeningModel
A screening model that applies no screening effect.
Definition screening_bare.h:21
gridfire::screening::BareScreeningModel::ADDouble
CppAD::AD< double > ADDouble
Alias for CppAD Automatic Differentiation type for double precision.
Definition screening_bare.h:23
gridfire::screening::BareScreeningModel::calculateFactors_impl
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.
Definition screening_bare.h:126
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
gridfire::screening::ScreeningModel
An abstract base class for plasma screening models.
Definition screening_abstract.h:27
gridfire::reaction::LogicalReactionSet
TemplatedReactionSet< LogicalReaction > LogicalReactionSet
A set of logical reactions.
Definition reaction.h:563
gridfire::screening
Definition screening_abstract.h:11
reaction.h
Defines classes for representing and managing nuclear reactions.
screening_abstract.h