你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-04 11:36:52 +08:00
Prevent int overflow at large model sizes
这个提交包含在:
@@ -776,7 +776,7 @@ class FDTDGrid:
|
||||
mem_use = 0
|
||||
|
||||
for vol in self.fractalvolumes:
|
||||
mem_use += vol.nx * vol.ny * vol.nz * vol.dtype.itemsize
|
||||
mem_use += np.prod(vol.start) * vol.dtype.itemsize
|
||||
for surface in vol.fractalsurfaces:
|
||||
surfacedims = surface.get_surface_dims()
|
||||
mem_use += surfacedims[0] * surfacedims[1] * surface.dtype.itemsize
|
||||
|
@@ -98,6 +98,10 @@ class Model:
|
||||
def nz(self, value: int):
|
||||
self.G.nz = value
|
||||
|
||||
@property
|
||||
def cells(self) -> np.int64:
|
||||
return np.prod(self.G.size)
|
||||
|
||||
@property
|
||||
def dx(self) -> float:
|
||||
return self.G.dl[0]
|
||||
|
@@ -133,7 +133,7 @@ class Domain(ModelUserObject):
|
||||
logger.info(
|
||||
f"Domain size: {self.domain_size[0]:g} x {self.domain_size[1]:g} x "
|
||||
+ f"{self.domain_size[2]:g}m ({model.nx:d} x {model.ny:d} x {model.nz:d} = "
|
||||
+ f"{(model.nx * model.ny * model.nz):g} cells)"
|
||||
+ f"{(model.cells):g} cells)"
|
||||
)
|
||||
|
||||
# Set mode and switch off appropriate PMLs for 2D models
|
||||
|
在新工单中引用
屏蔽一个用户