Move some initialization/finalization functions and eigenvalue-related functions to C++
Created by: paulromano
This PR moves many initialization/finalization functions to C++, including openmc_init
, openmc_finalize
, openmc_simulation_init
, and openmc_simulation_finalize
as well as some functions related to calculating k-effective. At this point, eigenvalue.F90
is almost completely converted. openmc_reset
and openmc_hard_reset
are also on the C++ side too. There's not too much else to say about this -- it was a pretty straightforward translation of code. There's a net reduction of about 1k lines of Fortran code and we're now down to 32.7k (version 0.10.0 was at about 50k).
I've also fixed two bugs in this PR:
- In my conversion of
synchronize_bank
to C++, the temporary bank (temp_sites
) was allocated on the stack. Because it can potentially be quite large, it really needs to be on the heap in order to avoid a stack overflow. I've now changed it to astd::vector
so that it appears on the heap. - One version of
read_attribute
made an invalid use ofstrlen
that is now fixed.