Bay-Delta SELFE Tools

selfe_mesh Module

selfe_mesh module SelfeMesh class holds mesh and boundary information

class selfe_mesh.SelfeBoundary(nodes, btype, comment=None)

Bases: object

A class for information of an individual SELFE boundary.

Methods

btype

Boundary type.

Getter :Get the type of the boundary.
comment

A comment or name of the boundary.

Getter :Get the comment of the boundary.
Setter :Set the comment of the boundary.
n_nodes()

Get the total number of nodes in the boundary.

nodes

A sequence of node indices in the boundary.

Getter :Get the sequence of nodes in the boundary.
class selfe_mesh.SelfeMesh

Bases: trimesh.TriMesh

Class of the SELFE Mesh inherited from TriMesh. This class has additional information for boundaries and hydraulic structures.

Methods

add_boundary(nodes, btype, comment=None)

Add one boundary.

boundaries

An array of the boundary information

Getter :Get the array of the boundary information
clear_boundary()

Delete all the current boundary information

comment

Comment of the mesh.

Getter :Get the comment
Setter :Set the comment
create_boundaries(open_pairs)

Create boundaries from the given pairs of coordinates for open boundaries

fill_land_and_island_boundarise()

Fill land and island boundaries for boundary edges not assigned to any open boundary.

find_two_neighboring_paths(line_segment)

Format of the line segment: start_x, start_y, end_x, end_y line_segment = a pair of (X, Y)

n_boundaries(btype=None)

Get the number of open boundaries. If a boundary type is given, it counts only open boundaries with the corresponding type.

n_boundary_nodes(btype)

Get the total node boundary of a given type