你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 15:10:13 +08:00
Added func to estimate fractal building memory
这个提交包含在:
@@ -177,7 +177,7 @@ class FDTDGrid:
|
||||
pml.initialise_field_arrays()
|
||||
|
||||
def mem_est_basic(self):
|
||||
"""Estimate the amount of memory (RAM) required for grid arrays.
|
||||
"""Estimates the amount of memory (RAM) required for grid arrays.
|
||||
|
||||
Returns:
|
||||
mem_use: int of memory (bytes).
|
||||
@@ -217,7 +217,7 @@ class FDTDGrid:
|
||||
return mem_use
|
||||
|
||||
def mem_est_dispersive(self):
|
||||
"""Estimate the amount of memory (RAM) required for dispersive grid arrays.
|
||||
"""Estimates the amount of memory (RAM) required for dispersive grid arrays.
|
||||
|
||||
Returns:
|
||||
mem_use: int of memory (bytes).
|
||||
@@ -228,6 +228,26 @@ class FDTDGrid:
|
||||
np.dtype(config.get_model_config().materials['dispersivedtype']).itemsize)
|
||||
return mem_use
|
||||
|
||||
def mem_est_fractals(self):
|
||||
"""Estimates the amount of memory (RAM) required to build any objects
|
||||
which use the FractalVolume/FractalSurface classes.
|
||||
|
||||
Returns:
|
||||
mem_use: int of memory (bytes).
|
||||
"""
|
||||
|
||||
mem_use = 0
|
||||
|
||||
for vol in self.fractalvolumes:
|
||||
mem_use += (vol.nx * vol.ny * vol.nz * vol.dtype.itemsize)
|
||||
for surface in vol.fractalsurfaces:
|
||||
surfacedims = surface.get_surface_dims()
|
||||
mem_use += (surfacedims[0] *
|
||||
surfacedims[1] *
|
||||
surface.dtype.itemsize)
|
||||
|
||||
return mem_use
|
||||
|
||||
def tmx(self):
|
||||
"""Add PEC boundaries to invariant direction in 2D TMx mode.
|
||||
N.B. 2D modes are a single cell slice of 3D grid.
|
||||
|
在新工单中引用
屏蔽一个用户