GridFire 0.0.1a General Purpose Nuclear Network

Loading...
Searching...
No Matches
py_screening.cpp
Go to the documentation of this file.
1#include "gridfire/screening/screening.h"
2
3#include <pybind11/pybind11.h>
4#include <pybind11/stl.h>
5#include <pybind11/functional.h> // Needed for std::function
6
7#include <vector>
8
9#include "py_screening.h"
10
11#include "cppad/cppad.hpp"
12
13
14 namespace py = pybind11;
15
16std::vector<double> PyScreening::calculateScreeningFactors(const gridfire::reaction::LogicalReactionSet &reactions, const std::vector<fourdst::atomic::Species> &species, const std::vector<double> &Y, const double T9, const double rho) const {
17 PYBIND11_OVERLOAD_PURE(
18 std::vector<double>, // Return type
19 gridfire::screening::ScreeningModel,
20 calculateScreeningFactors // Method name
21 );
22}
23
24 using ADDouble = gridfire::screening::ScreeningModel::ADDouble;
25std::vector<ADDouble> PyScreening::calculateScreeningFactors(const gridfire::reaction::LogicalReactionSet &reactions, const std::vector<fourdst::atomic::Species> &species, const std::vector<ADDouble> &Y, const ADDouble T9, const ADDouble rho) const {
26 PYBIND11_OVERLOAD_PURE(
27 std::vector<ADDouble>, // Return type
28 gridfire::screening::ScreeningModel,
29 calculateScreeningFactors // Method name
30 );
31}
PyScreening::calculateScreeningFactors
std::vector< double > calculateScreeningFactors(const gridfire::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 for a set of reactions.
Definition py_screening.cpp:16
gridfire::screening::ScreeningModel
An abstract base class for plasma screening models.
Definition screening_abstract.h:27
gridfire::screening::ScreeningModel::ADDouble
CppAD::AD< double > ADDouble
Alias for CppAD Automatic Differentiation type for double precision.
Definition screening_abstract.h:30
gridfire::reaction::LogicalReactionSet
TemplatedReactionSet< LogicalReaction > LogicalReactionSet
A set of logical reactions.
Definition reaction.h:563
ADDouble
gridfire::screening::ScreeningModel::ADDouble ADDouble
Definition py_screening.cpp:24
py_screening.h
screening.h