Repository navigation
Expand file tree
/
Copy pathFissionMultiplicityBlock.python.cpp
More file actions
80 lines (64 loc) · 2.33 KB
/
Copy pathFissionMultiplicityBlock.python.cpp
File metadata and controls
80 lines (64 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// system includes
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
// local includes
#include "ACEtk/continuous/FissionMultiplicityBlock.hpp"
#include "definitions.hpp"
// namespace aliases
namespace python = pybind11;
namespace continuous {
void wrapFissionMultiplicityBlock( python::module& module, python::module& ) {
// type aliases
using Block = njoy::ACEtk::continuous::FissionMultiplicityBlock;
using FissionMultiplicityData = njoy::ACEtk::continuous::FissionMultiplicityBlock::FissionMultiplicityData;
// wrap views created by this block
// create the block
python::class_< Block > block(
module,
"FissionMultiplicityBlock",
"The continuous energy NU block with the fission multiplicity data."
);
// wrap the block
block
.def(
python::init< FissionMultiplicityData >(),
python::arg( "prompt" ),
"Initialise the block\n\n"
"Arguments:\n"
" self the block\n"
" prompt the prompt fission multiplicity data"
)
.def(
python::init< FissionMultiplicityData, FissionMultiplicityData >(),
python::arg( "prompt" ), python::arg( "total" ),
"Initialise the block\n\n"
"Arguments:\n"
" self the block\n"
" prompt the prompt fission multiplicity data\n"
" total the total fission multiplicity data"
)
.def_property_readonly(
"has_prompt_and_total_fission_multiplicity",
&Block::hasPromptAndTotalFissionMultiplicity,
"Flag to see whether or not prompt and total fission multiplicity are present"
)
.def_property_readonly(
"multiplicity",
&Block::multiplicity,
"The prompt fission multiplicity\n"
"This returns the prompt fission multiplicity when both prompt and total\n"
"are given or just the available multiplicity data if only one of these is\n"
"given (the ACE format does not indicate which is present)."
)
.def_property_readonly(
"total_fission_multiplicity",
&Block::totalFissionMultiplicity,
"The total fission multiplicity\n"
"This returns the total fission multiplicity when both prompt and total\n"
"are given or just the available multiplicity data if only one of these is\n"
"given (the ACE format does not indicate which is present)."
);
// add standard block definitions
addStandardBlockDefinitions< Block >( block );
}
} // continuous namespace