你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 23:14:03 +08:00
Merge branch 'master' of https://github.com/gprMax/gprMax
default voxel and optional edge writing
这个提交包含在:
@@ -19,6 +19,7 @@
|
||||
import numpy as np
|
||||
cimport numpy as np
|
||||
from cython.parallel import prange
|
||||
|
||||
from gprMax.constants cimport floattype_t, complextype_t
|
||||
|
||||
|
||||
|
@@ -19,6 +19,7 @@
|
||||
import numpy as np
|
||||
cimport numpy as np
|
||||
np.seterr(divide='raise')
|
||||
|
||||
from gprMax.utilities import round_value
|
||||
from gprMax.yee_cell_setget_rigid cimport set_rigid_Ex, set_rigid_Ey, set_rigid_Ez, set_rigid_Hx, set_rigid_Hy, set_rigid_Hz, set_rigid_E, unset_rigid_E, set_rigid_H, unset_rigid_H
|
||||
|
||||
|
@@ -16,12 +16,14 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with gprMax. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os, sys
|
||||
import os
|
||||
import sys
|
||||
|
||||
import numpy as np
|
||||
from struct import pack
|
||||
from gprMax.xdmf import write_output_file
|
||||
|
||||
from gprMax.utilities import round_value
|
||||
from gprMax.xdmf import write_output_file
|
||||
|
||||
|
||||
class GeometryView(object):
|
||||
|
@@ -67,7 +67,8 @@ def main():
|
||||
|
||||
|
||||
def api(inputfile, n=1, mpi=False, benchmark=False, geometry_only=False, geometry_fixed=False, write_processed=False, opt_taguchi=False):
|
||||
"""If you have installed gprMax as a module this is the entry point"""
|
||||
"""If installed as a module this is the entry point."""
|
||||
|
||||
class ImportArguments:
|
||||
pass
|
||||
|
||||
@@ -86,7 +87,12 @@ def api(inputfile, n=1, mpi=False, benchmark=False, geometry_only=False, geometr
|
||||
|
||||
|
||||
def run_main(args):
|
||||
|
||||
"""Top-level function that controls what mode of simulation (standard/optimsation/benchmark etc...) is run.
|
||||
|
||||
Args:
|
||||
args (dict): Namespace with input arguments from command line or api.
|
||||
"""
|
||||
|
||||
numbermodelruns = args.n
|
||||
inputdirectory = os.path.dirname(os.path.abspath(args.inputfile))
|
||||
inputfile = os.path.abspath(os.path.join(inputdirectory, os.path.basename(args.inputfile)))
|
||||
@@ -415,7 +421,7 @@ def run_model(args, modelrun, numbermodelruns, inputfile, usernamespace):
|
||||
tgeostart = perf_counter()
|
||||
for geometryview in G.geometryviews:
|
||||
geometryview.write_vtk(modelrun, numbermodelruns, G)
|
||||
geometryview.write_xdmf(modelrun, numbermodelruns, G)
|
||||
#geometryview.write_xdmf(modelrun, numbermodelruns, G)
|
||||
tgeoend = perf_counter()
|
||||
print('\nGeometry file(s) written in [HH:MM:SS]: {}'.format(datetime.timedelta(seconds=int(tgeoend - tgeostart))))
|
||||
|
||||
|
@@ -17,14 +17,14 @@
|
||||
# along with gprMax. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
from gprMax.constants import c, floattype, complextype
|
||||
from gprMax.materials import Material
|
||||
|
||||
|
||||
class Grid():
|
||||
|
||||
class Grid(object):
|
||||
"""Generic grid/mesh."""
|
||||
|
||||
def __init__(self, grid):
|
||||
self.nx = grid.shape[0]
|
||||
self.ny = grid.shape[1]
|
||||
|
@@ -16,7 +16,8 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with gprMax. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os, sys
|
||||
import os
|
||||
import sys
|
||||
|
||||
from gprMax.exceptions import CmdInputError
|
||||
from gprMax.utilities import ListStream
|
||||
|
@@ -17,6 +17,7 @@
|
||||
# along with gprMax. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
|
||||
import h5py
|
||||
import numpy as np
|
||||
|
||||
|
@@ -16,8 +16,10 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with gprMax. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os, psutil
|
||||
import os
|
||||
import psutil
|
||||
import decimal as d
|
||||
|
||||
import numpy as np
|
||||
|
||||
from gprMax.constants import c, floattype
|
||||
|
@@ -16,7 +16,9 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with gprMax. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import importlib, os, pickle
|
||||
import importlib
|
||||
import os
|
||||
import pickle
|
||||
from collections import OrderedDict
|
||||
|
||||
import numpy as np
|
||||
|
@@ -19,6 +19,7 @@
|
||||
import numpy as np
|
||||
cimport numpy as np
|
||||
from cython.parallel import prange
|
||||
|
||||
from gprMax.constants cimport floattype_t, complextype_t
|
||||
|
||||
|
||||
|
@@ -19,6 +19,7 @@
|
||||
import numpy as np
|
||||
cimport numpy as np
|
||||
from cython.parallel import prange
|
||||
|
||||
from gprMax.constants cimport floattype_t, complextype_t
|
||||
|
||||
|
||||
|
@@ -16,10 +16,12 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with gprMax. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os, sys
|
||||
import numpy as np
|
||||
import os
|
||||
import sys
|
||||
from struct import pack
|
||||
|
||||
import numpy as np
|
||||
|
||||
from gprMax.constants import floattype
|
||||
from gprMax.grid import Ix, Iy, Iz
|
||||
from gprMax.utilities import round_value
|
||||
|
@@ -17,6 +17,7 @@
|
||||
# along with gprMax. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from copy import deepcopy
|
||||
|
||||
import numpy as np
|
||||
|
||||
from gprMax.constants import c, floattype
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
import sys
|
||||
import decimal as d
|
||||
|
||||
from pyfiglet import Figlet
|
||||
|
||||
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
import h5py
|
||||
|
||||
from ._version import __version__
|
||||
from gprMax._version import __version__
|
||||
from gprMax.constants import floattype
|
||||
from gprMax.grid import Ix, Iy, Iz
|
||||
|
||||
|
@@ -1,8 +1,11 @@
|
||||
import numpy as np
|
||||
import copy
|
||||
|
||||
import h5py
|
||||
from lxml import etree
|
||||
import numpy as np
|
||||
|
||||
from gprMax.grid import Grid
|
||||
import copy
|
||||
|
||||
|
||||
|
||||
class Edges:
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
import numpy as np
|
||||
cimport numpy as np
|
||||
|
||||
from gprMax.materials import Material
|
||||
from gprMax.yee_cell_setget_rigid cimport get_rigid_Ex, get_rigid_Ey, get_rigid_Ez, get_rigid_Hx, get_rigid_Hy, get_rigid_Hz
|
||||
|
||||
|
在新工单中引用
屏蔽一个用户