你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-06 20:46:52 +08:00
Updated text for functional commands module.
这个提交包含在:
@@ -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.
|
||||
"""
|
||||
|
||||
@@ -97,7 +97,7 @@ def geometry_view(xs, ys, zs, xf, yf, zf, dx, dy, dz, filename, type='n'):
|
||||
def snapshot(xs, ys, zs, xf, yf, zf, dx, dy, dz, time, filename):
|
||||
"""Prints the gprMax #snapshot command.
|
||||
|
||||
Args:
|
||||
Args:
|
||||
xs, ys, zs, xf, yf, zf (float): Start and finish coordinates.
|
||||
dx, dy, dz (float): Spatial discretisation of geometry view.
|
||||
time (float): Time in seconds (float) or the iteration number (integer) which denote the point in time at which the snapshot will be taken.
|
||||
|
在新工单中引用
屏蔽一个用户