Changeset 5238
- Timestamp:
- Apr 24, 2008, 10:41:14 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/shallow_water_ext.c
r5224 r5238 7 7 // or use python compile.py 8 8 // 9 // See the module shallow_water.py 9 // See the module shallow_water_domain.py for more documentation on 10 // how to use this module 10 11 // 11 12 // … … 67 68 else 68 69 *qmax=dq0; 69 if ((*qmin=dq0+dq2)<0) 70 ;// qmin is already set to correct value 71 else 72 *qmin=0.0; 70 71 *qmin=dq0+dq2; 72 if (*qmin>=0.0) *qmin = 0.0; 73 73 } 74 74 else{// dq1<dq2 … … 77 77 else 78 78 *qmax=dq0; 79 if ((*qmin=dq0+dq1)<0) 80 ;// qmin is the correct value 81 else 82 *qmin=0.0; 79 80 *qmin=dq0+dq1; 81 if (*qmin>=0.0) *qmin=0.0; 83 82 } 84 83 } … … 89 88 else 90 89 *qmin=dq0; 91 if ((*qmax=dq0+dq2)>0.0) 92 ;// qmax is already set to the correct value 93 else 94 *qmax=0.0; 90 91 *qmax=dq0+dq2; 92 if (*qmax<=0.0) *qmax=0.0; 95 93 } 96 94 else{// dq1>dq2 … … 99 97 else 100 98 *qmin=dq0; 101 if ((*qmax=dq0+dq1)>0.0) 102 ;// qmax is already set to the correct value 103 else 104 *qmax=0.0; 99 100 *qmax=dq0+dq1; 101 if (*qmax<=0.0) *qmax=0.0; 105 102 } 106 103 } … … 1849 1846 if (tri_full_flag[k] == 1) { 1850 1847 if (max_speed > epsilon) { 1848 1849 // Original CFL calculation 1851 1850 timestep = min(timestep, radii[k]/max_speed); 1852 1851 if (n>=0) 1853 1852 timestep = min(timestep, radii[n]/max_speed); 1854 1853 1855 // Ted Rigby's suggest ion1854 // Ted Rigby's suggested less conservative version 1856 1855 //if (n>=0) { 1857 // timestep = min(timestep, 0.8*(radii[k]+radii[n])/max_speed);1856 // timestep = min(timestep, (radii[k]+radii[n])/max_speed); 1858 1857 //} else { 1859 1858 // timestep = min(timestep, radii[k]/max_speed); 1860 1859 // } 1861 1862 1863 // Ole's modification1864 //if (n>=0) {1865 // timestep = min(timestep, max(radii[k],radii[n])/max_speed);1866 //} else {1867 // timestep = min(timestep, radii[k]/max_speed);1868 //}1869 1870 1871 1860 } 1872 1861 }
Note: See TracChangeset
for help on using the changeset viewer.