Changeset 9165


Ignore:
Timestamp:
Jun 16, 2014, 11:36:32 PM (10 years ago)
Author:
davies
Message:

Fixing likely bug in riverwall routine

Location:
trunk/anuga_core/source/anuga
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/shallow_water/swDE1_domain_ext.c

    r9160 r9165  
    691691            // Edge flux computation (triangle k, edge i)
    692692            _flux_function_central(ql, qr,
     693            //_flux_function_toro(ql, qr,
    693694                    h_left, h_right,
    694695                    hle, hre,
  • trunk/anuga_core/source/anuga/structures/riverwall.py

    r9130 r9165  
    478478
    479479        # Find which 2 vertices have the edge value, by testing the
    480         # x coordinate.
     480        # coordinates
    481481        X01=0.5*(domain.vertex_coordinates[rwV0Inds,0]+domain.vertex_coordinates[rwV1Inds,0])
    482         k01=(abs(X01- domain.edge_coordinates[riverwalledgeInds,0])<tol)
     482        Y01=0.5*(domain.vertex_coordinates[rwV0Inds,1]+domain.vertex_coordinates[rwV1Inds,1])
     483        k01=(abs(X01- domain.edge_coordinates[riverwalledgeInds,0])+abs(Y01-domain.edge_coordinates[riverwalledgeInds,1])<tol)
    483484        X12=0.5*(domain.vertex_coordinates[rwV2Inds,0]+domain.vertex_coordinates[rwV1Inds,0])
    484         k12=(abs(X12 - domain.edge_coordinates[riverwalledgeInds,0])<tol)
     485        Y12=0.5*(domain.vertex_coordinates[rwV2Inds,1]+domain.vertex_coordinates[rwV1Inds,1])
     486        k12=(abs(X12 - domain.edge_coordinates[riverwalledgeInds,0])+abs(Y12-domain.edge_coordinates[riverwalledgeInds,1])<tol)
    485487        X02=0.5*(domain.vertex_coordinates[rwV2Inds,0]+domain.vertex_coordinates[rwV0Inds,0])
    486         k02=(abs(X02 - domain.edge_coordinates[riverwalledgeInds,0])<tol)
     488        Y02=0.5*(domain.vertex_coordinates[rwV2Inds,1]+domain.vertex_coordinates[rwV0Inds,1])
     489        k02=(abs(X02 - domain.edge_coordinates[riverwalledgeInds,0])+abs(Y02-domain.edge_coordinates[riverwalledgeInds,1])<tol)
    487490
    488491        riverwallV2Inds=riverwallCentInds*0
Note: See TracChangeset for help on using the changeset viewer.