Tidied some comments.

这个提交包含在:
craig-warren
2018-08-30 19:53:51 +01:00
父节点 824f53b8dd
当前提交 c05accf77a
共有 3 个文件被更改,包括 16 次插入16 次删除

查看文件

@@ -154,19 +154,19 @@ Allows you to control the amount of information displayed on screen when gprMax
where ``c1`` can be either y (yes) or n (no) which turns on or off the messages on the screen. The default value is y. When messages are on, gprMax will display on the screen information the translation of space and time values to cell coordinates, iteration number, material parameters etc... This information can be useful for error checking.
#output_dir:
----------
------------
Allows you to control the directory of output files. The syntax of the command is:
Allows you to control the directory where output file(s) will be stored. The syntax of the command is:
.. code-block:: none
#output_dir: str1
where ``str1`` can be either the absolute path of the output directory or relative to the directory of the input files. The default value is the same as the directory of the input files.
where ``str1`` can be either the absolute path to the directory for the output file(s) or a path relative to the directory of the input files. The default value is the same as the directory of the input files.
#num_threads:
-----------------
-------------
Allows you to control how many OpenMP threads (usually the number of physical CPU cores available) are used when running the model. The most computationally intensive parts of gprMax, which are the FDTD solver loops, have been parallelised using `OpenMP <http://openmp.org>`_ which supports multi-platform shared memory multiprocessing. The syntax of the command is:

查看文件

@@ -313,8 +313,8 @@ def process_singlecmds(singlecmds, G):
G.waveforms.append(w)
# set output dir
# Set the output directory
cmd = '#output_dir'
if singlecmds[cmd] is not None:
output_dir = singlecmds[cmd]
G.outputdirectory = output_dir
outputdir = singlecmds[cmd]
G.outputdirectory = outputdir

查看文件

@@ -334,20 +334,20 @@ def run_model(args, currentmodelrun, modelend, numbermodelruns, inputfile, usern
# Output filename
inputdirectory, inputfilename = os.path.split(os.path.join(G.inputdirectory, G.inputfilename))
if G.outputdirectory is None:
output_dir = inputdirectory
outputdir = inputdirectory
else:
output_dir = G.outputdirectory
# save current directory
outputdir = G.outputdirectory
# Save current directory
curdir = os.getcwd()
os.chdir(inputdirectory)
output_dir = os.path.abspath(output_dir)
if not os.path.isdir(output_dir):
os.mkdir(output_dir)
print('\nmaking outputdirectory: {}'.format(output_dir))
# restore current directory
outputdir = os.path.abspath(outputdir)
if not os.path.isdir(outputdir):
os.mkdir(outputdir)
print('\nCreated output directory: {}'.format(outputdir))
# Restore current directory
os.chdir(curdir)
basename, ext = os.path.splitext(inputfilename)
outputfile = os.path.join(output_dir, basename + appendmodelnumber + '.out')
outputfile = os.path.join(outputdir, basename + appendmodelnumber + '.out')
print('\nOutput file: {}\n'.format(outputfile))
# Main FDTD solving functions for either CPU or GPU