Skip to content

Commit 121cfa5

Browse files
dryuri92Бухтияров  Иван
authored andcommitted
Update project from private fork
1 parent ace5fb8 commit 121cfa5

File tree

13 files changed

+226
-182
lines changed

13 files changed

+226
-182
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ message(STATUS "C++ flags: ${cxxflags}")
8585
#===============================================================================
8686
# Setup process
8787
#===============================================================================
88+
#Linking with thread library
89+
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread -lrt")
8890

8991
list(APPEND lib_SOURCES
9092
"src/chain.cpp"

README.md

Lines changed: 0 additions & 136 deletions
Large diffs are not rendered by default.

configure.xml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,16 @@
22
<configure>
33
<chain>./examples/chain_endfb71.xml</chain>
44
<nuclides>./examples/nuclides.xml</nuclides>
5-
<impxslibs>
6-
<impxslib>./examples/XMAS172.xml</impxslib>
7-
</impxslibs>
8-
<inpmaterials>./examples/U235thn_1sec/materialsi.xml</inpmaterials>
9-
<reaction>./examples/U235thn_1sec/reactions.xml</reaction>
10-
<outmaterials>./examples/U235thn_1sec/materialso.xml</outmaterials>
11-
<filters>
12-
<filter type="exnuclide">U238 U239 U235 Pu238 Pu239 Pu240 Pu241 Pu242 Am241 Am242_m1</filter>
13-
</filters>
14-
<numbers>10</numbers>
15-
<timestep>1</timestep>
16-
<!-- IT IS equivalent time description
17-
timerecord year="0" month="0" day="0.0" hour="0" minute="0" second="1"/-->
5+
<inpmaterials>/mnt/e/code/os/inpmaterialsOS.xml</inpmaterials>
6+
<reaction>/mnt/e/code/os/reactionsOS.xml</reaction>
7+
<outmaterials>/mnt/e/code/outmaterialsOS.xml</outmaterials>
8+
<numbers>1</numbers>
9+
<!--timestep>1</timestep-->
10+
<timerecord year="0" month="0" day="592.0" hour="0" minute="0" second="0"></timerecord>
1811
<method>chebyshev</method>
1912
<epb>1.e-3</epb>
2013
<decaykey>false</decaykey>
21-
<uncertanties>false</uncertanties>
22-
<decay_print>false</decay_print>
14+
<uncertanties>true</uncertanties>
15+
<decay_print>true</decay_print>
2316
<cram_order>16</cram_order>
2417
</configure>

configureold.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0"?>
2+
<configure>
3+
<chain>./examples/chain_endfb71.xml</chain>
4+
<nuclides>./examples/nuclides.xml</nuclides>
5+
<impxslibs>
6+
<impxslib>./examples/XMAS172.xml</impxslib>
7+
</impxslibs>
8+
<inpmaterials>./examples/U235thn_1sec/materialso.xml</inpmaterials>
9+
<reaction>./examples/U235thn_1sec/reactions.xml</reaction>
10+
<outmaterials>./examples/U235thn_1sec/materialso1.xml</outmaterials>
11+
<filters>
12+
<filter type="exnuclide">U238 U239 U235 Pu238 Pu239 Pu240 Pu241 Pu242 Am241 Am242_m1</filter>
13+
</filters>
14+
<numbers>10</numbers>
15+
<timestep>1</timestep>
16+
<!-- IT IS equivalent time description
17+
timerecord year="0" month="0" day="0.0" hour="0" minute="0" second="1"/-->
18+
<method>chebyshev</method>
19+
<epb>1.e-3</epb>
20+
<decaykey>false</decaykey>
21+
<uncertanties>true</uncertanties>
22+
<decay_print>true</decay_print>
23+
<cram_order>16</cram_order>
24+
</configure>

examples/U235thn_1sec/materialso.xml

Lines changed: 8 additions & 0 deletions
Large diffs are not rendered by default.

examples/U235thn_1sec/materialso1.xml

Lines changed: 8 additions & 0 deletions
Large diffs are not rendered by default.

include/openbps/executer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "xtensor/xcomplex.hpp"
77
#include "xtensor/xbuilder.hpp"
88
#include "configure.h"
9+
#include "matrix.h"
910
#include "chain.h"
1011

1112
namespace openbps {
@@ -43,6 +44,7 @@ void run_solver();
4344
//!
4445
void init_solver();
4546

47+
void executethr(int imat, Chain& chain, DecayMatrix& dm, DecayMatrix& ddm);
4648
//! Iterative method implementation v.1.
4749
//! Method based on algorythm described at paper Seleznev E.F., Belov A.A.,
4850
//! Belousov V.I., Chernova I.S. "BPSD CODE UPGRADE FOR SOLVING

include/openbps/matrix.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,8 @@ class BaseMatrix
117117
//!
118118
//! The indexing operator [][]
119119
T* operator [] (int i) {
120-
if (i >= nrows_)
121-
return nullptr;
122-
return data_[i];
120+
if (i < nrows_)
121+
return data_[i];
123122
}
124123
//! M1 | M2
125124
const BaseMatrix& operator |(const BaseMatrix& M2) {
@@ -162,7 +161,6 @@ class BaseMatrix
162161
<< m1.data_[i][j] << " ";
163162
out << std::endl;
164163
}
165-
return out;
166164
}
167165

168166
//==========================================================================
@@ -342,6 +340,14 @@ class CramMatrix : public DecayMatrix {
342340
//!\return result a matrix with all transition for the material
343341
xt::xarray<double> matrixreal(Chain& chain,
344342
const Materials& mat);
343+
344+
//! Form a deviation decay nuclide matrix for unceratanties analysis
345+
//!
346+
//!\param[in] chain with decay information and fill the data storage
347+
//!\param[in] material with nuclear concentration
348+
//!\return result a matrix with all transition for the material
349+
xt::xarray<double> matrixdev(Chain& chain,
350+
const Materials& mat);
345351
}; //class ChebyshevMatrix
346352

347353
//==============================================================================

outlog.csv

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
dt;Act, sec-1;Q, Mev;dAct, sec-1;dQ, Mev;
2+
u235;
3+
dt;Act, sec-1;Q, Mev;dAct, sec-1;dQ, Mev;
4+
u235;
5+
0.1;4.80338e+15;1.85452e+16;1.40574e+14;5.32352e+14;
6+
0.2;5.12429e+15;1.97197e+16;1.50363e+14;5.6691e+14;
7+
0.3;5.43404e+15;2.08474e+16;1.59851e+14;6.00173e+14;
8+
0.4;5.73345e+15;2.19322e+16;1.69057e+14;6.32248e+14;
9+
0.5;6.02325e+15;2.29772e+16;1.78002e+14;6.63229e+14;
10+
0.6;6.30408e+15;2.39854e+16;1.86703e+14;6.93196e+14;
11+
0.7;6.57652e+15;2.49592e+16;1.95173e+14;7.22221e+14;
12+
0.8;6.84109e+15;2.59011e+16;2.03427e+14;7.50366e+14;
13+
0.9;7.09826e+15;2.6813e+16;2.11477e+14;7.77688e+14;
14+
1;7.34845e+15;2.76969e+16;2.19332e+14;8.04236e+14;
15+
dt;Act, sec-1;Q, Mev;dAct, sec-1;dQ, Mev;
16+
os16;
17+
dt;Act, sec-1;Q, Mev;dAct, sec-1;dQ, Mev;
18+
os16;
19+
5.11488e+07;1.31841e+14;2.19058e+14;1.71959e+12;4.45731e+12;
20+
dt;Act, sec-1;Q, Mev;dAct, sec-1;dQ, Mev;
21+
os16;
22+
5.11488e+07;1.31841e+14;2.19058e+14;1.71959e+12;4.45731e+12;

scripts/scriptprepro.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,10 @@ def exec(nuclidnames, filepaths, execdir, nuclidlist):
268268
targetdir = sys.argv[-1]
269269
execdir = os.path.join(targetdir, "proceed")
270270
if (_MOD == "endfb"):
271+
#Parsing ENDFB file structure lib
271272
nucls, paths = parse_endfblib(libdir)
272273
else:
274+
#Parsing TENDL file structure lib
273275
nucls, paths = parse_tendlib(libdir)
274276
if (len(nuclidlist) == 0):
275277
nuclidlist = nucls

0 commit comments

Comments
 (0)