anuga.File_boundary

class anuga.File_boundary(filename, domain, time_thinning=1, time_limit=None, boundary_polygon=None, default_boundary=None, use_cache=False, verbose=False)[source]

The File_boundary reads values for the conserved quantities from an sww NetCDF file, and returns interpolated values at the midpoints of each associated boundary segment. Time dependency is interpolated linearly.

Assumes that file contains a time series and possibly also spatial info. See docstring for File_function in util.py for details about admissible file formats

File boundary must read and interpolate from smoothed version as stored in sww and cannot work with the discontinuous triangles.

Example: Bf = File_boundary(‘source_file.sww’, domain)

Note that the resulting solution history is not exactly the same as if the models were coupled as there is no feedback into the source model.

Optional keyword argument default_boundary must be either None or an instance of class descending from class Boundary. This will be used in case model time exceeds that available in the underlying data.

__init__(filename, domain, time_thinning=1, time_limit=None, boundary_polygon=None, default_boundary=None, use_cache=False, verbose=False)[source]

Methods

__init__(filename, domain[, time_thinning, ...])

evaluate([vol_id, edge_id])

Return linearly interpolated values based on domain time at midpoint of segment defined by vol_id and edge_id.

evaluate_segment([domain, segment_edges])

Evaluate boundary condition at edges of a domain in a list defined by segment_edges

get_boundary_values([t])

get_time()