Updated text for functional commands module.

这个提交包含在:
Craig Warren
2016-01-25 14:42:43 +00:00
父节点 ef2ac82c38
当前提交 c38ce2964c
共有 3 个文件被更改,包括 9 次插入11 次删除

查看文件

@@ -30,7 +30,7 @@ gprMax User Guide
:maxdepth: 2
:caption: Advanced topics
python-scripting
python_scripting
openmp_mpi
.. toctree::

查看文件

@@ -29,7 +29,7 @@ You can also access a user library of antenna models. This library currently fea
* Similar to Geophysical Survey Systems, Inc. (GSSI) (http://www.geophysical.com) 1.5 GHz (Model 5100) antenna
* Simmilar to MALA Geoscience (http://www.malags.com/) 1.2 GHz antenna
These antenna models can be accessed from within a block of Python code in your simulation. For example, to use Python to include one of the antenna models from the built-in library at a location 0.125m, 0.094m, 0.100m (x,y,z) using a 1mm spatial resolution:
These antenna models can be accessed from within a block of Python code in your simulation. For example, to use Python to include an antenna model similar to a GSSI 1.5 GHz antenna at a location 0.125m, 0.094m, 0.100m (x,y,z) using a 1mm spatial resolution:
.. code-block:: none
@@ -52,9 +52,7 @@ To make it easier to create commands within a block of Python code, there is a b
cylinder(0.02 + x * 0.02, 0.05, 0, 0.020 + x * 0.02, 0.05, domain[2], 0.005, 'pec’)
#end_python:
The ``domain`` function will print the ``#domain`` command to the input file and return a variable with the extent of the domain that can be used elsewhere in a Python code block, e.g. in this case with the ``cylinder`` function. The ``cylinder`` function is just a functional version of the ``#cylinder`` command and just prints it to the input file.
The following is a list of the functions that are available for input commands:
The ``domain`` function will print the ``#domain`` command to the input file and return a variable with the extent of the domain that can be used elsewhere in a Python code block, e.g. in this case with the ``cylinder`` function. The ``cylinder`` function is just a functional version of the ``#cylinder`` command which prints it to the input file.
input_cmd_funcs.py
------------------

查看文件

@@ -17,7 +17,7 @@
# along with gprMax. If not, see <http://www.gnu.org/licenses/>.
"""This module contains functional forms of some of the most commonly used gprMax commands. It can useful to use these within Python scripting in an input file."""
"""This module contains functional forms of some of the most commonly used gprMax commands. It can be useful to use these within Python scripting in an input file."""
def domain(x, y, z):
@@ -71,10 +71,10 @@ def material(permittivity, conductivity, permeability, magconductivity, name):
"""Prints the gprMax #material command.
Args:
permittivity (float): Relative permittivity of material.
conductivity (float): Conductivity of material.
permeability (float): Relative permeability of material.
magconductivity (float): Magnetic loss of material.
permittivity (float): Relative permittivity of the material.
conductivity (float): Conductivity of the material.
permeability (float): Relative permeability of the material.
magconductivity (float): Magnetic loss of the material.
name (str): Material identifier.
"""