GridFire 0.0.1a General Purpose Nuclear Network

Loading...
Searching...
No Matches
py_partition.cpp
Go to the documentation of this file.
1#include "py_partition.h"
2
3#include "gridfire/partition/partition.h"
4
5#include "pybind11/pybind11.h"
6#include "pybind11/stl.h"
7
8#include <string>
9#include <memory>
10
11
12 namespace py = pybind11;
13
14
15 double PyPartitionFunction::evaluate(int z, int a, double T9) const {
16 PYBIND11_OVERRIDE_PURE(
17 double,
18 gridfire::partition::PartitionFunction,
19 evaluate,
20 z, a, T9
21 );
22}
23
24 double PyPartitionFunction::evaluateDerivative(int z, int a, double T9) const {
25 PYBIND11_OVERRIDE_PURE(
26 double,
27 gridfire::partition::PartitionFunction,
28 evaluateDerivative,
29 z, a, T9
30 );
31}
32
33 bool PyPartitionFunction::supports(int z, int a) const {
34 PYBIND11_OVERRIDE_PURE(
35 bool,
36 gridfire::partition::PartitionFunction,
37 supports,
38 z, a
39 );
40}
41
42std::string PyPartitionFunction::type() const {
43 PYBIND11_OVERRIDE_PURE(
44 std::string,
45 gridfire::partition::PartitionFunction,
46 type
47 );
48}
49
50std::unique_ptr<gridfire::partition::PartitionFunction> PyPartitionFunction::clone() const {
51 PYBIND11_OVERRIDE_PURE(
52 std::unique_ptr<gridfire::partition::PartitionFunction>,
53 gridfire::partition::PartitionFunction,
54 clone
55 );
56}
57
PyPartitionFunction::type
std::string type() const override
Get the human-readable type of this partition function.
Definition py_partition.cpp:42
PyPartitionFunction::supports
bool supports(int z, int a) const override
Check if this partition function supports an isotope.
Definition py_partition.cpp:33
PyPartitionFunction::evaluateDerivative
double evaluateDerivative(int z, int a, double T9) const override
Evaluate the temperature derivative of the partition function.
Definition py_partition.cpp:24
PyPartitionFunction::evaluate
double evaluate(int z, int a, double T9) const override
Evaluate the partition function for a given isotope.
Definition py_partition.cpp:15
PyPartitionFunction::clone
std::unique_ptr< gridfire::partition::PartitionFunction > clone() const override
Create a deep copy of this PartitionFunction.
Definition py_partition.cpp:50
gridfire::partition::PartitionFunction
Abstract interface for evaluating nuclear partition functions.
Definition partition_abstract.h:17
partition.h
py_partition.h