forked from openmc-dev/openmc
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathurr.cpp
31 lines (23 loc) · 773 Bytes
/
urr.cpp
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
#include "openmc/urr.h"
#include <iostream>
namespace openmc {
UrrData::UrrData(hid_t group_id)
{
// Read interpolation and other flags
int interp_temp;
read_attribute(group_id, "interpolation", interp_temp);
interp_ = static_cast<Interpolation>(interp_temp);
// read the metadata
read_attribute(group_id, "inelastic", inelastic_flag_);
read_attribute(group_id, "absorption", absorption_flag_);
int temp_multiply_smooth;
read_attribute(group_id, "multiply_smooth", temp_multiply_smooth);
multiply_smooth_ = (temp_multiply_smooth == 1);
// read the energies at which tables exist
read_dataset(group_id, "energy", energy_);
// Set n_energy_
n_energy_ = energy_.shape()[0];
// Read URR tables
read_dataset(group_id, "table", prob_);
}
}