mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Update external dagmc regression test to include an update of material temperatures
This commit is contained in:
parent
86e44c4e4a
commit
c35b710a15
3 changed files with 13 additions and 3 deletions
|
|
@ -26,6 +26,7 @@
|
|||
<parameters>-4 -4 -4 4 4 4</parameters>
|
||||
</space>
|
||||
</source>
|
||||
<temperature_default>293</temperature_default>
|
||||
</settings>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<tallies>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include "openmc/error.h"
|
||||
#include "openmc/geometry.h"
|
||||
#include "openmc/geometry_aux.h"
|
||||
#include "openmc/material.h"
|
||||
#include "openmc/nuclide.h"
|
||||
#include <iostream>
|
||||
|
||||
|
|
@ -66,6 +67,14 @@ int main(int argc, char* argv[])
|
|||
// Finalize cross sections having assigned temperatures
|
||||
openmc::finalize_cross_sections();
|
||||
|
||||
// Check that we correctly assigned cell temperatures with non-void fill
|
||||
for (auto& cell_ptr : openmc::model::cells) {
|
||||
if (cell_ptr->material_.front() != openmc::C_NONE &&
|
||||
cell_ptr->temperature() != 300) {
|
||||
fatal_error("Failed to set cell temperature");
|
||||
}
|
||||
}
|
||||
|
||||
// Run OpenMC
|
||||
openmc_err = openmc_run();
|
||||
if (openmc_err)
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ def cpp_driver(request):
|
|||
shutil.rmtree('build')
|
||||
os.remove('CMakeLists.txt')
|
||||
|
||||
@pytest.fixture
|
||||
@pytest.fixture
|
||||
def model():
|
||||
model = openmc.model.Model()
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ def model():
|
|||
[ 4, 4, 4])
|
||||
source = openmc.Source(space=source_box)
|
||||
model.settings.source = source
|
||||
#model.settings.dagmc = True
|
||||
model.settings.temperature['default'] = 293
|
||||
|
||||
# Geometry
|
||||
dag_univ = openmc.DAGMCUniverse("dagmc.h5m")
|
||||
|
|
@ -103,7 +103,7 @@ def model():
|
|||
model.materials = mats
|
||||
|
||||
return model
|
||||
|
||||
|
||||
class ExternalDAGMCTest(PyAPITestHarness):
|
||||
def __init__(self, executable, statepoint_name, model):
|
||||
super().__init__(statepoint_name, model)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue