mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Updating the cpp driver test to include testing of the new set_temperature behavior. Includes a fix to the dynamic source test to remove the CMake file as well.
This commit is contained in:
parent
c7fe3ab9a3
commit
00fffc8590
5 changed files with 82 additions and 11 deletions
|
|
@ -1,6 +1,8 @@
|
|||
|
||||
#include "openmc/capi.h"
|
||||
#include "openmc/cell.h"
|
||||
#include "openmc/geometry.h"
|
||||
#include "openmc/summary.h"
|
||||
#include "openmc/tallies/filter.h"
|
||||
#include "openmc/tallies/filter_cell.h"
|
||||
#include "openmc/tallies/tally.h"
|
||||
|
|
@ -29,6 +31,17 @@ int main(int argc, char** argv) {
|
|||
tally->set_filters(filters);
|
||||
tally->set_scores({"flux"});
|
||||
|
||||
// set the temperature of the cell containing
|
||||
// the lattice
|
||||
auto& root_univ = openmc::model::universes[openmc::model::root_universe];
|
||||
auto& lattice_cell = openmc::model::cells[root_univ->cells_[0]];
|
||||
lattice_cell->set_temperature(300, 1, true);
|
||||
|
||||
// the summary file will be used to check that
|
||||
// temperatures were set correctly so clear
|
||||
// error output can be provided
|
||||
openmc::write_summary();
|
||||
|
||||
openmc_run();
|
||||
openmc_finalize();
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue