你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 15:10:13 +08:00
Corrected call for dispersive materials Cython building.
这个提交包含在:
@@ -20,16 +20,14 @@ import numpy as np
|
||||
cimport numpy as np
|
||||
from cython.parallel import prange
|
||||
|
||||
from gprMax.config cimport float_or_double
|
||||
from gprMax.config cimport real_or_complex
|
||||
|
||||
cdef extern from "complex.h" nogil:
|
||||
double creal(double complex z)
|
||||
float crealf(float complex z)
|
||||
|
||||
#########################################################
|
||||
# Electric field updates - dispersive materials - multipole A
|
||||
#########################################################
|
||||
|
||||
###############################################################
|
||||
# Electric field updates - dispersive materials - multipole A #
|
||||
###############################################################
|
||||
|
||||
{% for item in functions %}
|
||||
cpdef void {{ item.name_a }}(
|
||||
@@ -114,9 +112,9 @@ cpdef void {{ item.name_a }}(
|
||||
{% endfor %}
|
||||
|
||||
|
||||
#########################################################
|
||||
# Electric field updates - dispersive materials - multipole B
|
||||
#########################################################
|
||||
###############################################################
|
||||
# Electric field updates - dispersive materials - multipole B #
|
||||
###############################################################
|
||||
|
||||
{% for item in functions %}
|
||||
cpdef void {{ item.name_b }}(
|
||||
@@ -176,13 +174,11 @@ cpdef void {{ item.name_b }}(
|
||||
{% endfor %}
|
||||
|
||||
|
||||
#########################################################
|
||||
# Electric field updates - dispersive materials - single pole A
|
||||
#########################################################
|
||||
#################################################################
|
||||
# Electric field updates - dispersive materials - single pole A #
|
||||
#################################################################
|
||||
|
||||
# one pole
|
||||
{% for item in functions %}
|
||||
|
||||
cpdef void {{ item.name_a_1 }}(
|
||||
int nx,
|
||||
int ny,
|
||||
@@ -259,12 +255,12 @@ cpdef void {{ item.name_a_1 }}(
|
||||
|
||||
{% endfor %}
|
||||
|
||||
#########################################################
|
||||
# Electric field updates - dispersive materials - single pole B
|
||||
#########################################################
|
||||
|
||||
#################################################################
|
||||
# Electric field updates - dispersive materials - single pole B #
|
||||
#################################################################
|
||||
|
||||
{% for item in functions %}
|
||||
|
||||
cpdef void {{ item.name_b_1 }}(
|
||||
int nx,
|
||||
int ny,
|
||||
|
6
setup.py
6
setup.py
@@ -99,6 +99,9 @@ def build_dispersive_material_templates():
|
||||
with open('gprMax/cython/fields_updates_dispersive.pyx', 'w') as f:
|
||||
f.write(r)
|
||||
|
||||
# Generate Cython file for dispersive materials update functions
|
||||
build_dispersive_material_templates()
|
||||
|
||||
# Importing _version__.py before building can cause issues.
|
||||
with open('gprMax/_version.py', 'r') as fd:
|
||||
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
|
||||
@@ -196,9 +199,6 @@ elif sys.platform == 'linux':
|
||||
linker_args = ['-fopenmp']
|
||||
extra_objects = []
|
||||
|
||||
# generate cython file for dispersive update
|
||||
build_dispersive_material_templates()
|
||||
|
||||
# Build a list of all the extensions
|
||||
extensions = []
|
||||
for file in cythonfiles:
|
||||
|
在新工单中引用
屏蔽一个用户