Skip to content

Commit 3d07728

Browse files
authored
Merge pull request #198 from njoy/develop
ENDFtk v1.1.0
2 parents 7d9fb07 + 17decef commit 3d07728

File tree

268 files changed

+3332
-503
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

268 files changed

+3332
-503
lines changed

CMakeLists.txt

+5-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if( DEFINED PROJECT_NAME )
1010
endif()
1111

1212
project( ENDFtk
13-
VERSION 1.0.1
13+
VERSION 1.1.0
1414
LANGUAGES CXX
1515
)
1616

@@ -33,7 +33,7 @@ cmake_dependent_option(
3333
cmake_dependent_option(
3434
ENDFtk.python
3535
"Build ENDFtk python bindings" ON
36-
"NOT ${subproject}" OFF
36+
"NOT ${subproject} OR DEFINED require.ENDFtk.python " OFF
3737
)
3838

3939
########################################################################
@@ -77,7 +77,6 @@ target_include_directories( ENDFtk
7777
target_link_libraries( ENDFtk
7878
INTERFACE
7979
njoy::tools
80-
disco
8180
range-v3
8281
)
8382

@@ -335,7 +334,9 @@ if( ENDFtk.python )
335334

336335
list( APPEND ENDFtk_PYTHONPATH ${CMAKE_CURRENT_BINARY_DIR} )
337336

338-
include( cmake/unit_testing_python.cmake )
337+
if( ENDFtk.tests )
338+
include( cmake/unit_testing_python.cmake )
339+
endif()
339340

340341
endif()
341342

ReleaseNotes.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Release Notes—ENDFtk
22
Given here are some release notes for ENDFtk.
33

4+
## [ENDFtk v1.1.0](https://github.com/njoy/ENDFtk/pull/198)
5+
This update adds additional interface functions to complete the human readable and ENDF speak interface for many objects:
6+
- the NBT() and INT() interface functions to complement the boundaries() and interpolants() functions already present in TAB1 and TAB2 style components
7+
- the numberInterpolationRegions() functions to complement the NR() function already present in TAB1 and TAB2 style components.
8+
9+
This update fixes the following issues:
10+
- Older versions of ENDFtk sometimes read numbers like '2.0000000+0' as 1.999999999 instead of 2. The disco library was replaced with a new version included in the tools library that fixes this issue. In addition to fixing this issue, parsing ENDF files is now 10-20% faster.
11+
412
## [ENDFtk v1.0.1](https://github.com/njoy/ENDFtk/pull/195)
513
This update does not add any additional functionality.
614

cmake/develop_dependencies.cmake

+1-8
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ include( FetchContent )
77

88
FetchContent_Declare( tools
99
GIT_REPOSITORY https://github.com/njoy/tools
10-
GIT_TAG v0.2.0
10+
GIT_TAG v0.3.0
1111
GIT_SHALLOW TRUE
1212
)
1313

@@ -17,12 +17,6 @@ FetchContent_Declare( Catch2
1717
GIT_SHALLOW TRUE
1818
)
1919

20-
FetchContent_Declare( disco
21-
GIT_REPOSITORY https://github.com/njoy/disco
22-
GIT_TAG origin/master
23-
GIT_SHALLOW TRUE
24-
)
25-
2620
FetchContent_Declare( range-v3
2721
GIT_REPOSITORY https://github.com/ericniebler/range-v3
2822
GIT_TAG 0.11.0
@@ -39,6 +33,5 @@ FetchContent_Declare( pybind11
3933

4034
FetchContent_MakeAvailable(
4135
tools
42-
disco
4336
range-v3
4437
)

cmake/release_dependencies.cmake

+5-10
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,14 @@ include( FetchContent )
55
# Declare project dependencies
66
#######################################################################
77

8-
FetchContent_Declare( catch-adapter
9-
GIT_REPOSITORY https://github.com/njoy/catch-adapter
10-
GIT_TAG fb84b82ebf7a4789aa43cea560680cf745c6ee4f
11-
)
12-
138
FetchContent_Declare( Catch2
149
GIT_REPOSITORY https://github.com/catchorg/Catch2
1510
GIT_TAG 3f0283de7a9c43200033da996ff9093be3ac84dc # tag: v3.3.2
1611
)
1712

18-
FetchContent_Declare( disco
19-
GIT_REPOSITORY https://github.com/njoy/disco
20-
GIT_TAG 2606933a854bb0269c4ec37143e1236797e27838
13+
FetchContent_Declare( fast_float
14+
GIT_REPOSITORY https://github.com/fastfloat/fast_float
15+
GIT_TAG f476bc713fda06fbd34dc621b466745a574b3d4c # tag: v6.1.1
2116
)
2217

2318
FetchContent_Declare( pybind11
@@ -38,15 +33,15 @@ set( SPDLOG_BUILD_PIC CACHE INTERNAL BOOL ON )
3833

3934
FetchContent_Declare( tools
4035
GIT_REPOSITORY https://github.com/njoy/tools
41-
GIT_TAG 25c9273d05601a9644feea6d7539250bf1d1c0dc # tag: v0.2.0
36+
GIT_TAG 368dbd9bd44754de616c46ffed0f80d2d16d8360 # tag: v0.3.0
4237
)
4338

4439
#######################################################################
4540
# Load dependencies
4641
#######################################################################
4742

4843
FetchContent_MakeAvailable(
49-
disco
44+
fast_float
5045
range-v3
5146
spdlog
5247
tools

cmake/unit_testing.cmake

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Setup
33
#######################################################################
44

5-
message( STATUS "Adding ENDFtk unit testing" )
65
enable_testing()
76

87
FetchContent_MakeAvailable( Catch2 )

python/src/definitions.hpp

+28-2
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,34 @@ void addStandardInterpolationTableDefinitions( PythonClass& component ) {
3131

3232
"NR",
3333
[] ( const Component& self ) { return self.NR(); },
34-
"The number of interpolation ranges"
34+
"The number of interpolation regions"
35+
)
36+
.def_property_readonly(
37+
38+
"number_interpolation_regions",
39+
[] ( const Component& self ) { return self.numberInterpolationRegions(); },
40+
"The number of interpolation regions"
41+
)
42+
.def_property_readonly(
43+
44+
"INT",
45+
[] ( const Component& self ) -> LongRange
46+
{ return self.INT(); },
47+
"The interpolation type for each region"
3548
)
3649
.def_property_readonly(
3750

3851
"interpolants",
3952
[] ( const Component& self ) -> LongRange
4053
{ return self.interpolants(); },
41-
"The interpolation type for each range"
54+
"The interpolation type for each region"
55+
)
56+
.def_property_readonly(
57+
58+
"NBT",
59+
[] ( const Component& self ) -> LongRange
60+
{ return self.NBT(); },
61+
"The interpolation boundaries"
4262
)
4363
.def_property_readonly(
4464

@@ -66,6 +86,12 @@ void addStandardTableDefinitions( PythonClass& component ) {
6686
"NP",
6787
[] ( const Component& self ) { return self.NP(); },
6888
"The number of points"
89+
)
90+
.def_property_readonly(
91+
92+
"number_points",
93+
[] ( const Component& self ) { return self.numberPoints(); },
94+
"The number of points"
6995
);
7096

7197
// add standard tab2 definitions

python/src/record/ListRecord.python.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ void wrapListRecord( python::module& module, python::module& ) {
8989
&Record::NPL,
9090
"The number of values in the list"
9191
)
92+
.def_property_readonly(
93+
94+
"number_values",
95+
&Record::numberValues,
96+
"The number of values in the list"
97+
)
9298
.def_property_readonly(
9399

94100
"list",

python/src/section/1/455/EnergyDependentConstants.python.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ void wrapEnergyDependentConstants( python::module& module, python::module& viewm
8181
&Component::NE,
8282
"The number of incident energy values"
8383
)
84+
.def_property_readonly(
85+
86+
"number_incident_energies",
87+
&Component::numberIncidentEnergies,
88+
"The number of incident energy values"
89+
)
8490
.def_property_readonly(
8591

8692
"E",

python/src/section/14/TabulatedDistributions.python.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ void wrapTabulatedDistributions( python::module& module, python::module& viewmod
109109
"The number of incident energy values for which angular distributions\n"
110110
"are given"
111111
)
112+
.def_property_readonly(
113+
114+
"number_incident_energies",
115+
[] ( const Component& self ) { return self.numberIncidentEnergies(); },
116+
"The number of incident energy values for which angular distributions\n"
117+
"are given"
118+
)
112119
.def_property_readonly(
113120

114121
"incident_energies",

python/src/section/15/TabulatedSpectrum.python.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ void wrapTabulatedSpectrum( python::module& module, python::module& viewmodule )
6767
[] ( const Component& self ) { return self.NE(); },
6868
"The number of incident energy values"
6969
)
70+
.def_property_readonly(
71+
72+
"number_incident_energies",
73+
[] ( const Component& self ) { return self.numberIncidentEnergies(); },
74+
"The number of incident energy values"
75+
)
7076
.def_property_readonly(
7177

7278
"incident_energies",

python/src/section/2/152.python.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@ void wrapSection_2_152( python::module& module, python::module& ) {
137137
&Section::NW,
138138
"The number of data values"
139139
)
140+
.def_property_readonly(
141+
142+
"number_values",
143+
&Section::numberValues,
144+
"The number of data values"
145+
)
140146
.def_property_readonly(
141147

142148
"NREAC",

python/src/section/26/ContinuumEnergyAngle.python.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ void wrapContinuumEnergyAngle( python::module& module, python::module& viewmodul
7474
&Component::NE,
7575
"The number of incident energy values"
7676
)
77+
.def_property_readonly(
78+
79+
"number_incident_energies",
80+
&Component::numberIncidentEnergies,
81+
"The number of incident energy values"
82+
)
7783
.def_property_readonly(
7884

7985
"E",

python/src/section/26/DiscreteTwoBodyScattering.python.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ void wrapDiscreteTwoBodyScattering( python::module& module, python::module& view
6161
&Component::NE,
6262
"The number of incident energy values"
6363
)
64+
.def_property_readonly(
65+
66+
"number_incident_energies",
67+
&Component::numberIncidentEnergies,
68+
"The number of incident energy values"
69+
)
6470
.def_property_readonly(
6571

6672
"E",

python/src/section/27.python.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ void wrapSection_27( python::module& module, python::module& ) {
4141
" mt the MT number\n"
4242
" zaid the ZA identifier\n"
4343
" awr the atomic mass ratio\n"
44-
" boundaries the interpolation range boundaries\n"
45-
" interpolants the interpolation types for each range\n"
44+
" boundaries the interpolation region boundaries\n"
45+
" interpolants the interpolation types for each region\n"
4646
" x the x values\n"
4747
" h the form factor or scattering function values"
4848
)

python/src/section/4.python.cpp

+27-4
Original file line numberDiff line numberDiff line change
@@ -110,20 +110,43 @@ void wrapSection_4( python::module& module, python::module& viewmodule ) {
110110

111111
"NE",
112112
&Section::NE,
113-
"The number of incident energy values for which angular distributions\n"
114-
"are given"
113+
"The number of incident energy values"
114+
)
115+
.def_property_readonly(
116+
117+
"number_incident_energies",
118+
&Section::numberIncidentEnergies,
119+
"The number of incident energy values"
115120
)
116121
.def_property_readonly(
117122

118123
"NR",
119124
&Section::NR,
120-
"The number of interpolation ranges"
125+
"The number of interpolation regions"
126+
)
127+
.def_property_readonly(
128+
129+
"number_interpolation_regions",
130+
&Section::numberInterpolationRegions,
131+
"The number of interpolation regions"
132+
)
133+
.def_property_readonly(
134+
135+
"INT",
136+
&Section::INT,
137+
"The interpolation type for each region"
121138
)
122139
.def_property_readonly(
123140

124141
"interpolants",
125142
&Section::interpolants,
126-
"The interpolation type for each range"
143+
"The interpolation type for each region"
144+
)
145+
.def_property_readonly(
146+
147+
"NBT",
148+
&Section::NBT,
149+
"The interpolation boundaries"
127150
)
128151
.def_property_readonly(
129152

python/src/section/4/LegendreDistributions.python.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,13 @@ void wrapLegendreDistributions( python::module& module, python::module& viewmodu
7676

7777
"NE",
7878
[] ( const Component& self ) { return self.NE(); },
79-
"The number of incident energy values for which angular distributions\n"
80-
"are given"
79+
"The number of incident energy values"
80+
)
81+
.def_property_readonly(
82+
83+
"number_incident_energies",
84+
[] ( const Component& self ) { return self.numberIncidentEnergies(); },
85+
"The number of incident energy values"
8186
)
8287
.def_property_readonly(
8388

python/src/section/4/MixedDistributions.python.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,13 @@ void wrapMixedDistributions( python::module& module, python::module& ) {
9090

9191
"NE",
9292
[] ( const Component& self ) { return self.NE(); },
93-
"The number of incident energy values for which angular distributions\n"
94-
"are given"
93+
"The number of incident energy values"
94+
)
95+
.def_property_readonly(
96+
97+
"number_incident_energies",
98+
[] ( const Component& self ) { return self.numberIncidentEnergies(); },
99+
"The number of incident energy values"
95100
)
96101
.def_property_readonly(
97102

python/src/section/4/TabulatedDistributions.python.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,13 @@ void wrapTabulatedDistributions( python::module& module, python::module& viewmod
7676

7777
"NE",
7878
[] ( const Component& self ) { return self.NE(); },
79-
"The number of incident energy values for which angular distributions\n"
80-
"are given"
79+
"The number of incident energy values"
80+
)
81+
.def_property_readonly(
82+
83+
"number_incident_energies",
84+
[] ( const Component& self ) { return self.numberIncidentEnergies(); },
85+
"The number of incident energy values"
8186
)
8287
.def_property_readonly(
8388

python/src/section/5/TabulatedSpectrum.python.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ void wrapTabulatedSpectrum( python::module& module, python::module& viewmodule )
6565
[] ( const Component& self ) { return self.NE(); },
6666
"The number of incident energy values"
6767
)
68+
.def_property_readonly(
69+
70+
"number_incident_energies",
71+
[] ( const Component& self ) { return self.numberIncidentEnergies(); },
72+
"The number of incident energy values"
73+
)
6874
.def_property_readonly(
6975

7076
"incident_energies",

0 commit comments

Comments
 (0)