函数compute_all_surfaces
用于计算所有的Surface。
def compute_all_surfaces(self, verbose=None, compute_potentials=True):
"""
Calculate all the surfaces of the model.
Args:
verbose (bool): Default to None, will print a progress bar otherwise. Verbosity True
will print some more information as well.
compute_potentials (bool): Default to `True`. If `True`, also computes the potentials for
each surface.
Returns
(gempy.core.solutions.Solution): The computed surfaces are added as an attribute in the
Solution instance.
"""
verbose
(bool):默认情况下为None,否则将显示进度条。 如果参数设为True,则会显示更多的信息。compute_potentials
(bool):默认为True。 如果为True,则还会计算每个Surface的电位。此函数将计算所有的Surface,并将它们添加为Solution实例的一个属性。
import gempy as gp
# load example data
data = gp.datasets.load_data('fold')
# create model
model = gp.create_model('fold')
# initialize interpolator
gp.init_interpolator(model, extent=data.extent,
resolution=[50, 50, 50], path_i=data.interface_path,
path_o=data.orientation_path)
# compute all surfaces
model.solution.compute_all_surfaces()
在上面的示例代码中,我们首先使用gempy.datasets加载一个示例数据集。 然后创建一个名为“fold”的模型,并使用gempy.init_interpolator初始化一些设置。 最后,我们调用compute_all_surfaces()
函数计算所有Surface。