resqpy.grid_surface.generate_untorn_surface_for_layer_interface

resqpy.grid_surface.generate_untorn_surface_for_layer_interface(grid, k0=0, ref_k_faces='top', quad_triangles=True, border=None)[source]

Returns a Surface object generated from the grid layer interface points after any faults are ‘healed’.

Parameters:
  • grid (grid.Grid object) – the grid object from which a layer interface is to be converted to a surface

  • k0 (int) – the layer number (zero based) to be used

  • ref_k_faces (string) – either ‘top’ (the default) or ‘base’, indicating whether the top or the base interface of the layer is to be used

  • quad_triangles (boolean, optional, default True) – if True, 4 triangles are used to represent each cell k face, which gives a unique solution with a shared node of the 4 triangles at the mean point of the 4 corners of the face; if False, only 2 triangles are used, which gives a non-unique solution

  • border (float, optional) – If given, an extra border row of quadrangles is added around the grid mesh

Returns:

a resqml_surface.Surface object with a single triangulated patch

Notes

The resulting surface is assigned to the same model as grid, though xml is not generated and hdf5 is not written. If a border is specified and the outer grid cells have non-parallel edges, the resulting mesh might be messed up.