Ignore:
Timestamp:
Jun 28, 2007, 5:27:17 PM (17 years ago)
Author:
ole
Message:

Thoughts on centroid values - this is probably not going to be useful as nodal values will be good enough given the inherent discretisation error.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/shallow_water/data_manager.py

    r4563 r4567  
    8989     pmesh_to_domain_instance
    9090from anuga.abstract_2d_finite_volumes.util import get_revision_number, \
    91      remove_lone_verts, sww2timeseries
     91     remove_lone_verts, sww2timeseries, get_centroid_values
    9292from anuga.load_mesh.loadASCII import export_mesh_file
    9393# formula mappings
     
    54485448
    54495449def get_maximum_inundation_data(filename, polygon=None, time_interval=None,
     5450                                use_centroid_values=False,
    54505451                                verbose=False):
    54515452    """Compute maximum run up height from sww file.
     
    55135514    elevation = fid.variables['elevation'][:]
    55145515    stage = fid.variables['stage'][:]
     5516
     5517
     5518    # Here's where one could convert nodal information to centroid information
     5519    # but is probably something we need to write in C.
     5520    # Here's a Python thought which is NOT finished!!!
     5521    if use_centroid_values is True:
     5522        x = get_centroid_values(x, volumes)
     5523        y = get_centroid_values(y, volumes)   
     5524        elevation = get_centroid_values(elevation, volumes)   
    55155525
    55165526
     
    55745584    maximal_runup_location = None
    55755585    for i in timesteps:
    5576         depth = stage[i,:] - elevation
     5586        if use_centroid_values is True:
     5587            stage_i = get_centroid_values(stage[i,:], volumes)               
     5588        else:
     5589            stage_i = stage[i,:]
     5590           
     5591        depth = stage_i  - elevation
    55775592   
    55785593        # Get wet nodes i.e. nodes with depth>0 within given region and timesteps
Note: See TracChangeset for help on using the changeset viewer.