Apply suggestions from code review

Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Olaf Schumann 2021-10-01 12:17:47 +02:00 committed by GitHub
parent fef3c2dc9d
commit fe9d929ed0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -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.

View file

@ -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"))

View file

@ -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);
}