forked from openmc-dev/openmc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstate_point.h
55 lines (44 loc) · 1.93 KB
/
state_point.h
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
#ifndef OPENMC_STATE_POINT_H
#define OPENMC_STATE_POINT_H
#include <cstdint>
#include <string>
#include <gsl/gsl-lite.hpp>
#include "hdf5.h"
#include "openmc/capi.h"
#include "openmc/particle.h"
#include "openmc/shared_array.h"
#include "openmc/vector.h"
namespace openmc {
void load_state_point();
// By passing in a filename, source bank, and list of source indices
// on each MPI rank, this writes an HDF5 file which contains that
// information which can later be read in by read_source_bank
// (defined below). If you're writing code to write out a new kind
// of particle bank, this function is the one you want to use!
//
// For example, this is used to write both the surface source sites
// or fission source sites for eigenvalue continuation runs.
//
// This function ends up calling write_source_bank, and is responsible
// for opening the file to be written to and controlling whether the
// write is done in parallel (if compiled with parallel HDF5).
//
// bank_index is an exclusive parallel scan of the source_bank.size()
// values on each rank, used to create global indexing. This vector
// can be created by calling calculate_parallel_index_vector on
// source_bank.size() if such a vector is not already available.
void write_h5_source_point(const char* filename,
gsl::span<SourceSite> source_bank, const vector<int64_t>& bank_index);
void write_source_point(std::string, gsl::span<SourceSite> source_bank,
const vector<int64_t>& bank_index, bool use_mcpl);
// This appends a source bank specification to an HDF5 file
// that's already open. It is used internally by write_source_point.
void write_source_bank(hid_t group_id, gsl::span<SourceSite> source_bank,
const vector<int64_t>& bank_index);
void read_source_bank(
hid_t group_id, vector<SourceSite>& sites, bool distribute);
void write_tally_results_nr(hid_t file_id);
void restart_set_keff();
void write_unstructured_mesh_results();
} // namespace openmc
#endif // OPENMC_STATE_POINT_H