100 char *function_name=
"volume_surf";
111 if ((kp<elevation_bottom_fine->nl) || (kp>elevation_bottom_fine->
nh)) {
115 printf (
"Error in function %s volume 'small' polygon %ld (of %ld) cannot belong to the big polygon %ld (r=%ld,c=%ld)!! \n",function_name,kp,elevation_bottom_fine->
nh,i,r,c);
120 hval=(eta-elevation_terrain_fine->element[kp])*aval;
156 char *function_name=
"volume_subs";
166 if ((kp<elevation_bottom_fine->nl) || (kp>elevation_bottom_fine->
nh)) {
170 printf (
"Error in %s volume 'small' polygon %ld (of %ld) cannot belong to the big polygon %ld (r=%ld,c=%ld)!! \n",function_name,kp,elevation_bottom_fine->
nh,i,r,c);
175 hval=(fmin(eta,elevation_terrain_fine->element[kp])-elevation_bottom_fine->element[kp])*aval;
225 double area_vert=0.0;
236 if (((kp<nl_l) || (kp>nh_l)) && (kp!=novalue) ) {
237 printf (
"Error in vertical area lines %ld (of %ld) cannot belong to the big line %ld (c=%ld)!! \n",kp,nh_l,j,c);
239 }
else if (kp!=novalue) {
242 area_vert+=fmax(fmin(eta,elevation_terrain_flines->element[kp])-elevation_bottom_flines->element[kp],0.0)*dgrid->
fine->
lines->
element[kp]->
length2d;
265 double area_vert=0.0;
277 if (((kp<nl_l) || (kp>nh_l)) && (kp!=novalue) ) {
278 printf (
"Error in vertical area lines %ld (of %ld) cannot belong to the big line %ld (c=%ld)!! ",kp,nh_l,j,c);
280 }
else if (kp!=novalue) {
331 if ((kp<elevation_bottom_fine->nl) || (kp>elevation_bottom_fine->
nh)) {
334 printf (
"Error in wet_aera 'small' polygon %ld (of %ld) cannot belong to the big polygon %ld (r=%ld,c=%ld)!! novalue=%ld \n",kp,elevation_bottom_fine->
nh,i,r,c,novalue);
336 }
else if (eta>=elevation_terrain_fine->element[kp]){
338 }
else if (eta>=elevation_bottom_fine->element[kp]) {
383 if ((kp<elevation_bottom_fine->nl) || (kp>elevation_bottom_fine->
nh)) {
385 printf (
"Error in min_elevation 'small' polygon %ld (of %ld) cannot belong to the big polygon %ld (r=%ld,c=%ld)!! novalue=%ld \n",kp,elevation_bottom_fine->
nh,i,r,c,novalue);
388 min_elevation=fmin(elevation_bottom_fine->element[kp],min_elevation);
414 double q_outlet=0.0,q_outlet_surf=0.0;
427 if (((kp<nl_l) || (kp>nh_l)) && (kp!=novalue) ) {
428 printf (
"Error in q_discharge_from_outlet lines %ld (of %ld) cannot belong to the big line %ld (c=%ld)!! novalue=%ld \n",kp,nh_l,j,c,novalue);
430 }
else if (kp!=novalue && (outlet_coefficient->element[kp]!=0.0) && (outlet_coefficient!=NULL) && (outlet_coefficient_surf!=NULL)) {
433 q_outlet+=pow(fmax(fmin(eta,elevation_terrain_flines->element[kp])-elevation_bottom_flines->element[kp],0.0),p)*dgrid->
fine->
lines->
element[kp]->
length2d*outlet_coefficient->element[kp];
434 q_outlet_surf+=pow(fmax(eta-elevation_terrain_flines->element[kp],0.0),p_surf)*dgrid->
fine->
lines->
element[kp]->
length2d*outlet_coefficient_surf->element[kp];
462 for(j=nl_edges;j<=nh_edges;j++) {