mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 16:44:49 +01:00
Added -high_precision to PRINT for USER_PRINT.
Made dump_cpp always high precision. Needed to modify ex12a to be consistent with new SELECTED_OUTPUT -active; SELECTED_OUTPUT -user_print now has different meaning. No longer set global high_precision from SELECTED_OUTPUT; only SelectedOutput instance value git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7992 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
adf7d98498
commit
92a7861814
17
read.cpp
17
read.cpp
@ -4978,10 +4978,10 @@ read_selected_output(void)
|
||||
temp_selected_output.Set_new_def(true);
|
||||
value = get_true_false(next_char, TRUE);
|
||||
temp_selected_output.Set_high_precision(value!=FALSE);
|
||||
if (n_user == 1)
|
||||
{
|
||||
high_precision = (value != FALSE);
|
||||
}
|
||||
//if (n_user == 1)
|
||||
//{
|
||||
// high_precision = (value != FALSE);
|
||||
//}
|
||||
if (value == TRUE)
|
||||
{
|
||||
convergence_tolerance = 1e-12;
|
||||
@ -8341,10 +8341,11 @@ read_print(void)
|
||||
"isotope_alphas", /* 36 */
|
||||
"censor_species", /* 37 */
|
||||
"alkalinity", /* 38 */
|
||||
"equilibrium_phase" /* 39 */
|
||||
"equilibrium_phase", /* 39 */
|
||||
"high_precision" /* 40 */
|
||||
};
|
||||
|
||||
int count_opt_list = 40;
|
||||
int count_opt_list = 41;
|
||||
int value;
|
||||
/*
|
||||
* Read flags:
|
||||
@ -8509,6 +8510,10 @@ read_print(void)
|
||||
case 38: /* alkalinity */
|
||||
pr.alkalinity = get_true_false(next_char, TRUE);
|
||||
break;
|
||||
case 40: /* high_precision */
|
||||
value = get_true_false(next_char, TRUE);
|
||||
high_precision = (value != FALSE);
|
||||
break;
|
||||
}
|
||||
if (return_value == EOF || return_value == KEYWORD)
|
||||
break;
|
||||
|
||||
24
readtr.cpp
24
readtr.cpp
@ -1127,12 +1127,12 @@ dump_cpp(void)
|
||||
fs << token;
|
||||
sprintf(token, "\t-timest %13.5e\n", (double) timest);
|
||||
fs << token;
|
||||
if (!high_precision)
|
||||
{
|
||||
sprintf(token, "\t-diffc %13.5e\n", (double) diffc);
|
||||
fs << token;
|
||||
}
|
||||
else
|
||||
//if (!high_precision)
|
||||
//{
|
||||
// sprintf(token, "\t-diffc %13.5e\n", (double) diffc);
|
||||
// fs << token;
|
||||
//}
|
||||
//else
|
||||
{
|
||||
sprintf(token, "\t-diffc %20.12e\n", (double) diffc);
|
||||
fs << token;
|
||||
@ -1167,12 +1167,12 @@ dump_cpp(void)
|
||||
fs << token;
|
||||
for (int i = 0; i < count_cells; i++)
|
||||
{
|
||||
if (!high_precision)
|
||||
{
|
||||
sprintf(token, "%12.3e", (double) cell_data[i].disp);
|
||||
fs << token;
|
||||
}
|
||||
else
|
||||
//if (!high_precision)
|
||||
//{
|
||||
// sprintf(token, "%12.3e", (double) cell_data[i].disp);
|
||||
// fs << token;
|
||||
//}
|
||||
//else
|
||||
{
|
||||
sprintf(token, "%20.12e", (double) cell_data[i].disp);
|
||||
fs << token;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user