mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 16:44:49 +01:00
Working on multipunch
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/branches/multi_punch@7875 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
d436c9cf4f
commit
27b3c05684
27
PBasic.cpp
27
PBasic.cpp
@ -472,26 +472,35 @@ numtostr(char * Result, LDBLE n)
|
||||
/* if ((n != 0 && fabs(n) < 1e-2) || fabs(n) >= 1e12) { */
|
||||
if (ceil(n) == floor(n))
|
||||
{
|
||||
//if (PhreeqcPtr->current_selected_output != NULL &&
|
||||
// !PhreeqcPtr->current_selected_output->Get_high_precision())
|
||||
//{
|
||||
// sprintf(l_s, "%12.0f", (double) n);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// sprintf(l_s, "%20.0f", (double) n);
|
||||
//}
|
||||
if (PhreeqcPtr->current_selected_output != NULL &&
|
||||
!PhreeqcPtr->current_selected_output->Get_high_precision())
|
||||
PhreeqcPtr->current_selected_output->Get_high_precision())
|
||||
{
|
||||
sprintf(l_s, "%12.0f", (double) n);
|
||||
sprintf(l_s, "%20.0f", (double) n);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(l_s, "%20.0f", (double) n);
|
||||
sprintf(l_s, "%12.0f", (double) n);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (PhreeqcPtr->current_selected_output != NULL &&
|
||||
!PhreeqcPtr->current_selected_output->Get_high_precision())
|
||||
PhreeqcPtr->current_selected_output->Get_high_precision())
|
||||
{
|
||||
sprintf(l_s, "%12.4e", (double) n);
|
||||
sprintf(l_s, "%20.4e", (double) n);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(l_s, "%20.12e", (double) n);
|
||||
sprintf(l_s, "%12.12e", (double) n);
|
||||
}
|
||||
}
|
||||
i = (int) strlen(l_s) + 1;
|
||||
@ -4423,13 +4432,13 @@ cmdpunch(struct LOC_exec *LINK)
|
||||
PhreeqcPtr->PHRQ_free(n.UU.sval);
|
||||
}
|
||||
else if (PhreeqcPtr->current_selected_output != NULL &&
|
||||
!PhreeqcPtr->current_selected_output->Get_high_precision())
|
||||
PhreeqcPtr->current_selected_output->Get_high_precision())
|
||||
{
|
||||
PhreeqcPtr->fpunchf_user(PhreeqcPtr->n_user_punch_index, "%12.4e\t", (double) n.UU.val);
|
||||
PhreeqcPtr->fpunchf_user(PhreeqcPtr->n_user_punch_index, "%20.4e\t", (double) n.UU.val);
|
||||
}
|
||||
else
|
||||
{
|
||||
PhreeqcPtr->fpunchf_user(PhreeqcPtr->n_user_punch_index, "%20.12e\t", (double) n.UU.val);
|
||||
PhreeqcPtr->fpunchf_user(PhreeqcPtr->n_user_punch_index, "%12.12e\t", (double) n.UU.val);
|
||||
}
|
||||
++PhreeqcPtr->n_user_punch_index;
|
||||
}
|
||||
|
||||
@ -113,7 +113,9 @@ void Phreeqc::
|
||||
fpunchf_user(int user_index, const char *format, double d)
|
||||
{
|
||||
const char *name;
|
||||
|
||||
|
||||
if (current_user_punch == NULL)
|
||||
return;
|
||||
// check headings
|
||||
//if (user_index < user_punch_count_headings)
|
||||
int user_punch_count_headings = (int) current_user_punch->Get_headings().size();
|
||||
@ -150,6 +152,8 @@ fpunchf_user(int user_index, const char *format, char * d)
|
||||
{
|
||||
const char *name;
|
||||
|
||||
if (current_user_punch == NULL)
|
||||
return;
|
||||
int user_punch_count_headings = (int) current_user_punch->Get_headings().size();
|
||||
// check headings
|
||||
if (user_index < user_punch_count_headings)
|
||||
|
||||
2
read.cpp
2
read.cpp
@ -4968,7 +4968,7 @@ read_selected_output(void)
|
||||
case 44: /* selected_out */
|
||||
case 45: /* selected_output */
|
||||
temp_selected_output.Set_new_def(true);
|
||||
warning_msg("Use PRINT; -selected_output, not SELECTED_OUTPUT; -selected_output");
|
||||
//warning_msg("Use PRINT; -selected_output, not SELECTED_OUTPUT; -selected_output");
|
||||
value = get_true_false(next_char, TRUE);
|
||||
temp_selected_output.Set_active(value!=FALSE);
|
||||
opt_save = OPTION_ERROR;
|
||||
|
||||
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 (current_selected_output != NULL && !current_selected_output->Get_high_precision())
|
||||
{
|
||||
sprintf(token, "\t-diffc %13.5e\n", (double) diffc);
|
||||
fs << token;
|
||||
}
|
||||
else
|
||||
//if (current_selected_output != NULL && !current_selected_output->Get_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 (current_selected_output != NULL && !current_selected_output->Get_high_precision())
|
||||
{
|
||||
sprintf(token, "%12.3e", (double) cell_data[i].disp);
|
||||
fs << token;
|
||||
}
|
||||
else
|
||||
//if (current_selected_output != NULL && !current_selected_output->Get_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