anuga.create_domain_from_regions

anuga.create_domain_from_regions(bounding_polygon, boundary_tags, maximum_triangle_area=None, interior_regions=None, interior_holes=None, hole_tags=None, poly_geo_reference=None, mesh_geo_reference=None, breaklines=None, regionPtArea=None, minimum_triangle_angle=28.0, fail_if_polygons_outside=True, use_cache=False, verbose=False)[source]

Create domain from bounding polygons and resolutions.

Parameters:
  • bounding_polygon (list of tuples) – Points in Eastings and Northings, relative to the zone stated in poly_geo_reference if specified. Otherwise points are just x, y coordinates with no particular association to any location.

  • boundary_tags (dict) – Symbolic tags where each key maps to a list of indices referring to segments associated with that tag. Omitted segments are assigned the default tag ‘’.

  • maximum_triangle_area (float, optional) – Maximal area per triangle for the bounding polygon, excluding the interior regions.

  • interior_regions (list of tuples, optional) – List of (polygon, resolution) tuples for each region to be separately refined. Polygon lines must not cross or overlap, and polygons should not be close to each other. Interior regions outside the bounding_polygon will raise an error.

  • interior_holes (list of polygons, optional) – Polygons for each hole. These polygons do not need to be closed, but their points must be specified in counter-clockwise order.

  • hole_tags (list of dict, optional) – List of tag segment dictionaries. Segments cannot share points.

  • poly_geo_reference (GeoReference, optional) – Geo-reference of the bounding polygon and interior polygons. If None, assume absolute coordinates.

  • mesh_geo_reference (GeoReference, optional) – Geo-reference of the mesh to be created. If None, one will be automatically generated using the lower left corner of bounding_polygon as the x and y values.

  • breaklines (list of polygons, optional) – Lines to be preserved by the triangulation algorithm (e.g., coastlines, walls). Polygons are not closed.

  • regionPtArea (list of 3-tuples, optional) – Points with maximum area for the region containing each point.

  • minimum_triangle_angle (float, optional) – Minimum triangle angle in degrees (default: 28.0).

  • fail_if_polygons_outside (bool, optional) – If True (default), raise an Exception when interior polygons fall outside the bounding polygon. If False, ignore and continue.

  • use_cache (bool, optional) – Whether to use caching (default: False).

  • verbose (bool, optional) – Output information (default: False).

Returns:

A shallow water domain instance.

Return type:

Domain

Notes

Interior regions should be fully nested, as overlaps may cause unintended resolutions.