Loading...
Searching...
No Matches
screening_bare.h
Go to the documentation of this file.
#pragma once
#include "gridfire/screening/screening_abstract.h"
#include "gridfire/reaction/reaction.h"
#include "cppad/cppad.hpp"
namespace gridfire::screening {
class BareScreeningModel final : public ScreeningModel {
using ADDouble = CppAD::AD<double>;
public:
[[nodiscard]] 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;
[[nodiscard]] 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;
private:
template <typename T>
[[nodiscard]] 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<typename T>
std::vector<T> 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 {
return std::vector<T>(reactions.size(), T(1.0)); // Bare screening returns 1.0 for all reactions
}
}
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