Added <output_path> option in settings.xml.

This commit is contained in:
Paul Romano 2013-04-25 18:49:34 -04:00
parent c8f61c958f
commit dafb978b66
4 changed files with 21 additions and 0 deletions

View file

@ -212,6 +212,15 @@ sections summary file to be written, this element should be given as:
*Default*: "tallies"
``<output_path>`` Element
-------------------------
The ``<output_path>`` element specifies an absolute or relative path where all
output files should be written to. The specified path must exist or else OpenMC
will abort.
*Default*: Current working directory
``<ptables>`` Element
---------------------

View file

@ -71,6 +71,7 @@ contains
! Initialize XML scalar variables
cross_sections_ = ''
output_path_ = ''
verbosity_ = 0
energy_grid_ = 'union'
seed_ = 0_8
@ -101,6 +102,14 @@ contains
path_cross_sections = trim(cross_sections_)
end if
! Set output directory if a path has been specified on the <output_path>
! element
if (len_trim(output_path_) > 0) then
path_output = output_path_
if (.not. ends_with(path_output, "/")) &
path_output = trim(path_output) // "/"
end if
! Make sure that either criticality or fixed source was specified
if (eigenvalue_ % batches == 0 .and. fixed_source_ % batches == 0 &
.and. criticality_ % batches == 0) then

View file

@ -43,6 +43,8 @@ element settings {
element output { list {
( "summary" | "cross_sections" | "tallies" )+ } }? &
element output_path { xsd:string { maxLength = "255" } }? &
element ptables { xsd:boolean }? &
element run_cmfd { xsd:boolean }? &

View file

@ -51,6 +51,7 @@
<variable name="fixed_source_" tag="fixed_source" type="run_parameters_xml" />
<variable name="no_reduce_" tag="no_reduce" type="word" length="5" />
<variable name="output_" tag="output" type="word-array" length="20" />
<variable name="output_path_" tag="output_path" type="word" length="255" />
<variable name="ptables_" tag="ptables" type="word" length="5" />
<variable name="run_cmfd_" tag="run_cmfd" type="word" length="5" />
<variable name="seed_" tag="seed" type="integer" />