Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differentiate materials in DAGMC universes #3056

Open
wants to merge 69 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 59 commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
903d114
start commenting
bam241 Jun 11, 2024
66a2be4
test
Jun 20, 2024
afd5a96
up
Jun 20, 2024
538313a
new state
Jun 22, 2024
e2c41c6
new state
Jun 22, 2024
ceb12fb
removing print
Jun 22, 2024
42dc9c3
removing unnecessary comment
Jun 22, 2024
2102210
fix
Jul 22, 2024
52dcd3f
add differente_mats into model
Jul 22, 2024
b6df271
syntax
Jul 22, 2024
8f827cc
docstring
Jul 22, 2024
a71e488
tmp commit
Jul 24, 2024
6a80008
computer change
Jul 31, 2024
394d585
computer change
Jul 31, 2024
4ec6b2b
in progress
Aug 2, 2024
5dc39fb
in progress
Aug 2, 2024
0a1e6c5
temp
Aug 7, 2024
7aa6f64
temp
Aug 7, 2024
f7a9b23
up
bam241 Aug 12, 2024
f3acb0b
cleaning printout
bam241 Aug 12, 2024
9bfab40
adding openmc_get_dagmc_cell_ids to compilation without DAGMC
bam241 Aug 12, 2024
635f1f5
Adding some test for dagmc_split
bam241 Aug 12, 2024
44ae1ad
put test restriction on dagmc model test if there is no DAGMC
bam241 Aug 12, 2024
25d29a6
adding missing import
bam241 Aug 12, 2024
f53ec5c
Apply suggestions from code review
bam241 Aug 19, 2024
4b84f67
updatE
bam241 Aug 22, 2024
657da23
formating
bam241 Aug 22, 2024
ca2efe3
cells now contain distribmat after differentiate with match_cell
bam241 Aug 22, 2024
c403854
move dagmc related methods into dagmc.py, factorise Universes method
bam241 Aug 26, 2024
b215d9e
update dagmc.cpp
bam241 Aug 26, 2024
fd2a7a2
raise an error if diff_volume_method is unknown and correct mat name …
bam241 Aug 27, 2024
95ff5bf
forgot to close the parenthesis
bam241 Aug 27, 2024
0fa8a44
missing a loop
bam241 Aug 28, 2024
7ce1b0a
proper order if
bam241 Aug 28, 2024
3197ee4
diff without option is ok
bam241 Aug 29, 2024
3a7c19c
rm commented code
bam241 Aug 29, 2024
8f3ffa5
my enforcing was not the problem
bam241 Aug 29, 2024
8e5c3ef
this adds a diff_volume_method as None by default, and just split mat…
bam241 Sep 4, 2024
55e59ca
Merge remote-tracking branch 'upstream/develop' into dagmc_decoupling
bam241 Sep 5, 2024
293e2f0
fixing dagmc geometry name
bam241 Sep 5, 2024
f96d6e3
pointer should be POINTER
bam241 Sep 9, 2024
81168e0
Update openmc/lib/dagmc.py
bam241 Sep 9, 2024
23a3108
Update openmc/model/model.py
bam241 Sep 9, 2024
94f04ce
Update openmc/model/model.py
bam241 Sep 9, 2024
429ee4a
Update openmc/dagmc.py
bam241 Sep 9, 2024
8baa99a
Update openmc/model/model.py
bam241 Sep 9, 2024
01b4c9d
fixe a to_lower shortcut typo
bam241 Sep 9, 2024
c8de658
adding docstring in dagmc.py
bam241 Sep 9, 2024
86cff56
forgot renameing file open
bam241 Sep 10, 2024
95136d7
no run necesseray
bam241 Sep 12, 2024
610bc95
restore old behavior for diff_deplet_mat, warning instead of error fo…
bam241 Sep 12, 2024
6756288
Apply suggestions from code review
bam241 Sep 12, 2024
c0680dd
adressing most @pshriwise comments
bam241 Sep 21, 2024
31fbcdc
cleaning
bam241 Sep 21, 2024
ebc9829
Merge remote-tracking branch 'upstream/develop' into dagmc_decoupling
bam241 Sep 21, 2024
9d55c28
update
bam241 Sep 21, 2024
416e794
fixing compilation error when searching in map
bam241 Sep 21, 2024
f6a7e76
add safeguard against overridings DAGMC cell with more materials than…
bam241 Sep 22, 2024
e2f392f
add single mat override
bam241 Sep 23, 2024
8148957
Update src/dagmc.cpp
bam241 Oct 1, 2024
ce99675
quickfix depletable only
bam241 Oct 2, 2024
b6ad4b7
factoring method form Universe to UniverseBase, do DAGMCUniverse can …
bam241 Oct 2, 2024
8b0906d
allow assignement overload per cell_id for DAGMC universe
bam241 Oct 5, 2024
c25d34e
Merge remote-tracking branch 'upstream/develop' into dagmc_decoupling
bam241 Oct 8, 2024
569348e
reset fmt to upstream/develop val
bam241 Oct 8, 2024
a9e0306
Apply suggestions from code review
bam241 Oct 9, 2024
dae5527
adressing third round of comment from @pshriwise
bam241 Oct 11, 2024
182d991
Merge remote-tracking branch 'upstream/develop' into dagmc_decoupling
bam241 Oct 11, 2024
50cfcab
Adding missing import for input_path
bam241 Oct 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/openmc/capi.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ int openmc_cell_set_temperature(
int32_t index, double T, const int32_t* instance, bool set_contained = false);
int openmc_cell_set_translation(int32_t index, const double xyz[]);
int openmc_cell_set_rotation(int32_t index, const double rot[], size_t rot_len);
int openmc_get_dagmc_cell_ids(int32_t univ_id, int32_t* ids, size_t* n);
pshriwise marked this conversation as resolved.
Show resolved Hide resolved
int openmc_dagmc_universe_get_num_cells(int32_t univ_id, size_t* n);
int openmc_energy_filter_get_bins(
int32_t index, const double** energies, size_t* n);
int openmc_energy_filter_set_bins(
Expand Down
8 changes: 7 additions & 1 deletion include/openmc/cell.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ class Cell {
int32_t universe_; //!< Universe # this cell is in
int32_t fill_; //!< Universe # filling this cell
int32_t n_instances_ {0}; //!< Number of instances of this cell
GeometryType geom_type_; //!< Geometric representation type (CSG, DAGMC)

//! \brief Index corresponding to this cell in distribcell arrays
int distribcell_index_ {C_NONE};
Expand Down Expand Up @@ -350,6 +349,13 @@ class Cell {
vector<double> rotation_;

vector<int32_t> offset_; //!< Distribcell offset table

// Accessors
const GeometryType& geom_type() const { return geom_type_; }
bam241 marked this conversation as resolved.
Show resolved Hide resolved
GeometryType& geom_type() { return geom_type_; }

private:
GeometryType geom_type_; //!< Geometric representation type (CSG, DAGMC)
};

struct CellInstanceItem {
Expand Down
1 change: 1 addition & 0 deletions include/openmc/dagmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ class DAGUniverse : public Universe {
//!< generate new material IDs for the universe
bool has_graveyard_; //!< Indicates if the DAGMC geometry has a "graveyard"
//!< volume
std::map<std::string, vector<std::string>> instance_material_overrides;
};

//==============================================================================
Expand Down
1 change: 1 addition & 0 deletions openmc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from openmc.weight_windows import *
from openmc.surface import *
from openmc.universe import *
from openmc.dagmc import *
from openmc.source import *
from openmc.settings import *
from openmc.lattice import *
Expand Down
2 changes: 2 additions & 0 deletions openmc/cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,3 +780,5 @@ def from_xml_element(cls, elem, surfaces, materials, get_universe):
univ_id = int(get_text(elem, 'universe', 0))
get_universe(univ_id).add_cell(c)
return c


bam241 marked this conversation as resolved.
Show resolved Hide resolved
Loading
Loading