mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Store slice overlap indices in cell ID field (#4002)
Some checks are pending
Tests and Coverage / filter-changes (push) Waiting to run
Tests and Coverage / Python 3.13 (omp=n, mpi=n, dagmc=, libmesh=, event= (push) Blocked by required conditions
Tests and Coverage / Python 3.14 (omp=n, mpi=n, dagmc=, libmesh=, event= (push) Blocked by required conditions
Tests and Coverage / Python 3.14t (omp=n, mpi=n, dagmc=, libmesh=, event= (push) Blocked by required conditions
Tests and Coverage / Python 3.12 (omp=n, mpi=n, dagmc=n, libmesh=n, event=n (push) Blocked by required conditions
Tests and Coverage / Python 3.12 (omp=y, mpi=n, dagmc=n, libmesh=n, event=n (push) Blocked by required conditions
Tests and Coverage / Python 3.12 (omp=n, mpi=y, dagmc=n, libmesh=n, event=n (push) Blocked by required conditions
Tests and Coverage / Python 3.12 (omp=y, mpi=y, dagmc=n, libmesh=n, event=n (push) Blocked by required conditions
Tests and Coverage / Python 3.12 (omp=y, mpi=n, dagmc=, libmesh=y, event= (push) Blocked by required conditions
Tests and Coverage / Python 3.12 (omp=y, mpi=n, dagmc=, libmesh=, event=y (push) Blocked by required conditions
Tests and Coverage / Python 3.12 (omp=y, mpi=y, dagmc=y, libmesh=, event= (push) Blocked by required conditions
Tests and Coverage / Python 3.12 (omp=y, mpi=y, dagmc=, libmesh=y, event= (push) Blocked by required conditions
Tests and Coverage / coverage (push) Blocked by required conditions
Tests and Coverage / Check CI status (push) Blocked by required conditions
dockerhub-publish-develop / main (push) Waiting to run
dockerhub-publish-develop-dagmc-libmesh / main (push) Waiting to run
dockerhub-publish-develop-dagmc / main (push) Waiting to run
dockerhub-publish-develop-libmesh / main (push) Waiting to run
Some checks are pending
Tests and Coverage / filter-changes (push) Waiting to run
Tests and Coverage / Python 3.13 (omp=n, mpi=n, dagmc=, libmesh=, event= (push) Blocked by required conditions
Tests and Coverage / Python 3.14 (omp=n, mpi=n, dagmc=, libmesh=, event= (push) Blocked by required conditions
Tests and Coverage / Python 3.14t (omp=n, mpi=n, dagmc=, libmesh=, event= (push) Blocked by required conditions
Tests and Coverage / Python 3.12 (omp=n, mpi=n, dagmc=n, libmesh=n, event=n (push) Blocked by required conditions
Tests and Coverage / Python 3.12 (omp=y, mpi=n, dagmc=n, libmesh=n, event=n (push) Blocked by required conditions
Tests and Coverage / Python 3.12 (omp=n, mpi=y, dagmc=n, libmesh=n, event=n (push) Blocked by required conditions
Tests and Coverage / Python 3.12 (omp=y, mpi=y, dagmc=n, libmesh=n, event=n (push) Blocked by required conditions
Tests and Coverage / Python 3.12 (omp=y, mpi=n, dagmc=, libmesh=y, event= (push) Blocked by required conditions
Tests and Coverage / Python 3.12 (omp=y, mpi=n, dagmc=, libmesh=, event=y (push) Blocked by required conditions
Tests and Coverage / Python 3.12 (omp=y, mpi=y, dagmc=y, libmesh=, event= (push) Blocked by required conditions
Tests and Coverage / Python 3.12 (omp=y, mpi=y, dagmc=, libmesh=y, event= (push) Blocked by required conditions
Tests and Coverage / coverage (push) Blocked by required conditions
Tests and Coverage / Check CI status (push) Blocked by required conditions
dockerhub-publish-develop / main (push) Waiting to run
dockerhub-publish-develop-dagmc-libmesh / main (push) Waiting to run
dockerhub-publish-develop-dagmc / main (push) Waiting to run
dockerhub-publish-develop-libmesh / main (push) Waiting to run
This commit is contained in:
parent
8b15ee3915
commit
3cdb67e50d
3 changed files with 37 additions and 17 deletions
|
|
@ -265,22 +265,40 @@ _dll.openmc_slice_data_overlap_info.errcheck = _error_handler
|
|||
|
||||
|
||||
# Python wrappings for overlap functions
|
||||
def slice_data_overlap_count():
|
||||
def slice_data_overlap_count() -> int:
|
||||
"""Return the number of unique overlaps from the last slice plot.
|
||||
|
||||
Returns
|
||||
-------
|
||||
int
|
||||
Number of unique overlapping cell pairs detected by the most recent
|
||||
:func:`slice_data` call with overlap checking enabled.
|
||||
"""
|
||||
count = c_size_t()
|
||||
_dll.openmc_slice_data_overlap_count(count)
|
||||
return count.value
|
||||
|
||||
|
||||
def slice_data_overlap_info():
|
||||
def slice_data_overlap_info() -> np.ndarray:
|
||||
"""Return identifying information for overlaps from the last slice plot.
|
||||
|
||||
Returns
|
||||
-------
|
||||
numpy.ndarray
|
||||
Array of shape ``(n, 3)`` with int32 dtype, where ``n`` is the number
|
||||
of unique overlaps detected by the most recent :func:`slice_data` call
|
||||
with overlap checking enabled. Each row contains ``[universe_id,
|
||||
cell1_id, cell2_id]``.
|
||||
"""
|
||||
n = slice_data_overlap_count()
|
||||
overlap_info = np.empty(n * 3, dtype=np.int32)
|
||||
overlap_info = np.empty((n, 3), dtype=np.int32)
|
||||
|
||||
if n > 0:
|
||||
_dll.openmc_slice_data_overlap_info(
|
||||
n,
|
||||
overlap_info.ctypes.data_as(POINTER(c_int32)),
|
||||
)
|
||||
return overlap_info, n
|
||||
return overlap_info
|
||||
|
||||
|
||||
_dll.openmc_get_plot_index.argtypes = [c_int32, POINTER(c_int32)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue