FlatGroup#
- class montepy.data_inputs.tally.FlatGroup(items: list[TypeAliasForwardRef('numbers.Integral') | Cell | Surface], lattice_indices: list[LatticeIndex | None] | None = None, *, is_grouped: bool, universe_spec: TypeAliasForwardRef('numbers.Integral') | None = None, node: SyntaxNodeBase | None = None, number_nodes: list | None = None)#
Bases:
TallyGroupA flat list of cells/surfaces to score over.
Used as both a top-level bin and as an individual level in a
PathGroupchain.Added in version 1.6.0b2.
- Parameters:
items (
list[Integral|Cell|Surface]) – Cell/surface numbers, or the live objects themselves (e.g. fromadd_cell()). Mirrorsdivider’s “store whatever’s given” design.lattice_indices (
list[LatticeIndex|None] |None) – Lattice indices parallel toitems.is_grouped (
bool) –True= parenthesized union (one averaged bin);False= separate bins.universe_spec (
Integral|None) – Universe number ifU=Nsyntax was used.node (syntax_node.SyntaxNodeBase | None)
number_nodes (list | None)
Methods:
update_pointers(container, *, is_cell, tally)Resolve any still-raw numbers into live
Cell/Surfaceobjects.Attributes:
The
Cellobjects this group covers, orNoneif this group isn't (fully resolved to be) cell-based.The resolved
Cell/Surfaceobjects this group covers, once linked to a problem.Trueif entries form a union bin (parenthesized).The
LatticeIndexfor each number, parallel toold_numbers.The syntax node for this group.
The cell/surface numbers as originally read or added.
The
Surfaceobjects this group covers, orNoneif this group isn't (fully resolved to be) surface-based.Universe number if
U=Nsyntax was used, elseNone.- update_pointers(container, *, is_cell: bool, tally: Tally) None#
Resolve any still-raw numbers into live
Cell/Surfaceobjects.Mirrors
update_pointers().Added in version 1.6.0b4.
- Parameters:
- Return type:
- property cells: list[Cell] | None#
The
Cellobjects this group covers, orNoneif this group isn’t (fully resolved to be) cell-based.Added in version 1.6.0b4.
- property cells_or_surfaces#
The resolved
Cell/Surfaceobjects this group covers, once linked to a problem. Empty if not yet linked.Added in version 1.6.0b3.
- property is_grouped#
Trueif entries form a union bin (parenthesized).
- property lattice_indices#
The
LatticeIndexfor each number, parallel toold_numbers.Added in version 1.6.0b3.
- property node#
The syntax node for this group.
If this was generated by parsing, that node (patched to reflect current numbers) is returned. If this was created from scratch, a new node is generated the first time this is accessed.
Added in version 1.6.0b3.
- property old_numbers#
The cell/surface numbers as originally read or added.
- property surfaces: list[Surface] | None#
The
Surfaceobjects this group covers, orNoneif this group isn’t (fully resolved to be) surface-based.Added in version 1.6.0b4.
- property universe_spec#
Universe number if
U=Nsyntax was used, elseNone.