Change SpatialIndependent to CartesianIndependent

This commit is contained in:
Paul Romano 2016-01-15 06:38:30 -06:00
parent 148e01eec0
commit 13d91746a0
5 changed files with 17 additions and 17 deletions

View file

@ -449,11 +449,11 @@ attributes/sub-elements:
:type:
The type of spatial distribution. Valid options are "box", "fission",
"point", and "independent". A "box" spatial distribution has coordinates
"point", and "cartesian". A "box" spatial distribution has coordinates
sampled uniformly in a parallelepiped. A "fission" spatial distribution
samples locations from a "box" distribution but only locations in
fissionable materials are accepted. A "point" spatial distribution has
coordinates specified by a triplet. An "independent" spatial distribution
coordinates specified by a triplet. An "cartesian" spatial distribution
specifies independent distributions of x-, y-, and z-coordinates.
*Default*: None
@ -469,25 +469,25 @@ attributes/sub-elements:
three real numbers which specify the (x,y,z) location of an isotropic
point source.
For an "independent" distribution, no parameters are specified. Instead,
For an "cartesian" distribution, no parameters are specified. Instead,
the ``x``, ``y``, and ``z`` elements must be specified.
*Default*: None
:x:
For an "independent" distribution, this element specifies the distribution
For an "cartesian" distribution, this element specifies the distribution
of x-coordinates. The necessary sub-elements/attributes are those of a
univariate probability distribution (see the description in
:ref:`univariate`).
:y:
For an "independent" distribution, this element specifies the distribution
For an "cartesian" distribution, this element specifies the distribution
of y-coordinates. The necessary sub-elements/attributes are those of a
univariate probability distribution (see the description in
:ref:`univariate`).
:z:
For an "independent" distribution, this element specifies the distribution
For an "cartesian" distribution, this element specifies the distribution
of z-coordinates. The necessary sub-elements/attributes are those of a
univariate probability distribution (see the description in
:ref:`univariate`).

View file

@ -241,7 +241,7 @@ class CartesianIndependent(Spatial):
def to_xml(self):
element = ET.Element('space')
element.set("type", "independent")
element.set('type', 'cartesian')
element.append(self.x.to_xml('x'))
element.append(self.y.to_xml('y'))
element.append(self.z.to_xml('z'))

View file

@ -69,13 +69,13 @@ module distribution_multivariate
end function iSampleSpatial
end interface
type, extends(SpatialDistribution) :: SpatialIndependent
type, extends(SpatialDistribution) :: CartesianIndependent
class(Distribution), allocatable :: x
class(Distribution), allocatable :: y
class(Distribution), allocatable :: z
contains
procedure :: sample => spatial_independent_sample
end type SpatialIndependent
procedure :: sample => cartesian_independent_sample
end type CartesianIndependent
type, extends(SpatialDistribution) :: SpatialBox
real(8) :: lower_left(3)
@ -132,14 +132,14 @@ contains
uvw(:) = this % reference_uvw
end function monodirectional_sample
function spatial_independent_sample(this) result(xyz)
class(SpatialIndependent), intent(in) :: this
function cartesian_independent_sample(this) result(xyz)
class(CartesianIndependent), intent(in) :: this
real(8) :: xyz(3)
xyz(1) = this % x % sample()
xyz(2) = this % y % sample()
xyz(3) = this % z % sample()
end function spatial_independent_sample
end function cartesian_independent_sample
function spatial_box_sample(this) result(xyz)
class(SpatialBox), intent(in) :: this

View file

@ -397,8 +397,8 @@ contains
if (check_for_node(node_space, "type")) &
call get_node_value(node_space, "type", type)
select case (to_lower(type))
case ('independent')
allocate(SpatialIndependent :: external_source(i)%space)
case ('cartesian')
allocate(CartesianIndependent :: external_source(i)%space)
case ('box')
allocate(SpatialBox :: external_source(i)%space)
@ -419,7 +419,7 @@ contains
end select
select type (space => external_source(i)%space)
type is (SpatialIndependent)
type is (CartesianIndependent)
! Read distribution for x coordinate
if (check_for_node(node_space, "x")) then
call get_node_ptr(node_space, "x", node_dist)

View file

@ -1 +1 @@
8469cedcf2d3511a80d0f931bc665178ef1bd5b51352dc567385e52c32ad680a1131c8ee079bc022d320c3ea454798afac6b8cac8937a17de92d6cd50d04d72c
5c2fdde85affcd44c1b02c07c300acb8e5c189c1adbf7aa079e37a68e8b8313678fc292bd7f6e0d0957f723e05b8146bd165cf3315dde5f6b2f88ebc954cd65e