你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-06 12:36:51 +08:00
Add options to enable double precision if required.
这个提交包含在:
@@ -25,5 +25,10 @@ cimport numpy as np
|
||||
# Fractal and dispersive coefficient arrays use complex numbers (complextype) which are represented as two floats
|
||||
# Main field arrays use floats (floattype) and complex numbers (complextype)
|
||||
|
||||
# Single precision
|
||||
ctypedef np.float32_t floattype_t
|
||||
ctypedef np.complex64_t complextype_t
|
||||
|
||||
# Double precision
|
||||
#ctypedef np.float64_t floattype_t
|
||||
#ctypedef np.complex128_t complextype_t
|
||||
|
@@ -30,5 +30,20 @@ z0 = np.sqrt(m0 / e0)
|
||||
# Fractal and dispersive coefficient arrays use complex numbers (complextype) which are represented as two floats
|
||||
# Main field arrays use floats (floattype) and complex numbers (complextype)
|
||||
|
||||
# Single precision
|
||||
# For numpy arrays
|
||||
floattype = np.float32
|
||||
complextype = np.complex64
|
||||
|
||||
# For C (CUDA) arrays
|
||||
cfloattype = 'float'
|
||||
ccomplextype = 'pycuda::complex<float>'
|
||||
|
||||
# Double precision
|
||||
# For numpy arrays
|
||||
#floattype = np.float64
|
||||
#complextype = np.complex128
|
||||
|
||||
# For C (CUDA) arrays
|
||||
#cfloattype = 'double'
|
||||
#ccomplextype = 'pycuda::complex<double>'
|
||||
|
在新工单中引用
屏蔽一个用户