mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Apply suggestions from code review
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
fef3c2dc9d
commit
fe9d929ed0
3 changed files with 4 additions and 4 deletions
|
|
@ -660,10 +660,10 @@ variable and whose sub-elements/attributes are as follows:
|
|||
*Default*: histogram
|
||||
|
||||
:pair:
|
||||
For a "mixture" distribution, this element provides a distribution and its corresponding probability.a
|
||||
For a "mixture" distribution, this element provides a distribution and its corresponding probability.
|
||||
|
||||
:probability:
|
||||
An attribute or ``pair`` that provides the probability of a univatiate distribution within a "mixture" distribution.
|
||||
An attribute or ``pair`` that provides the probability of a univariate distribution within a "mixture" distribution.
|
||||
|
||||
:dist:
|
||||
This sub-element of a ``pair`` element provides information on the corresponding univariate distribution.
|
||||
|
|
|
|||
|
|
@ -828,7 +828,7 @@ class Mixture(Univariate):
|
|||
element = ET.Element(element_name)
|
||||
element.set("type", "mixture")
|
||||
|
||||
for p,d in zip(self.probability, self.distribution):
|
||||
for p, d in zip(self.probability, self.distribution):
|
||||
data = ET.SubElement(element, "pair")
|
||||
data.set("probability", str(p))
|
||||
data.append(d.to_xml_element("dist"))
|
||||
|
|
|
|||
|
|
@ -358,7 +358,7 @@ UPtrDist distribution_from_xml(pugi::xml_node node)
|
|||
} else if (type == "tabular") {
|
||||
dist = UPtrDist {new Tabular(node)};
|
||||
} else if (type == "mixture") {
|
||||
dist = UPtrDist{new Mixture(node)};
|
||||
dist = UPtrDist {new Mixture(node)};
|
||||
} else {
|
||||
openmc::fatal_error("Invalid distribution type: " + type);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue