Saving HeadErrorLimit and FlowChangeLimit only if they are used
To help a bit with backward computability the two new parameters will be saved to the INP file only if values were set for them.
This commit is contained in:
@@ -618,8 +618,12 @@ int saveinpfile(EN_Project *pr, char *fname)
|
||||
fprintf(f, "\n CHECKFREQ %-d", hyd->CheckFreq);
|
||||
fprintf(f, "\n MAXCHECK %-d", hyd->MaxCheck);
|
||||
fprintf(f, "\n DAMPLIMIT %-.8f", hyd->DampLimit);
|
||||
fprintf(f, "\n HEADERROR %-.8f", hyd->HeadErrorLimit * pr->Ucf[HEAD]);
|
||||
fprintf(f, "\n FLOWCHANGE %-.8f", hyd->FlowChangeLimit * pr->Ucf[FLOW]);
|
||||
if (hyd->HeadErrorLimit > 0.0) {
|
||||
fprintf(f, "\n HEADERROR %-.8f", hyd->HeadErrorLimit * pr->Ucf[HEAD]);
|
||||
}
|
||||
if (hyd->FlowChangeLimit > 0.0) {
|
||||
fprintf(f, "\n FLOWCHANGE %-.8f", hyd->FlowChangeLimit * pr->Ucf[FLOW]);
|
||||
}
|
||||
|
||||
/* Write [REPORT] section */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user