Merge commit '71af2952a3513766833883f90c18105fd8e7f174'

This commit is contained in:
Darth Vader 2023-05-26 02:28:11 +00:00
commit 0999ee0084
7 changed files with 44 additions and 19 deletions

View File

@ -116,10 +116,13 @@ trigger-downstream:
script:
- echo triggering iphreeqc
- curl -X POST -F token=${IPHREEQC_TRIGGER} -F ref=master https://code.chs.usgs.gov/api/v4/projects/${IPHREEQC_ID}/trigger/pipeline
- sleep 180
- echo triggering iphreeqccom
- curl -X POST -F token=${IPHREEQCCOM_TRIGGER} -F ref=master https://code.chs.usgs.gov/api/v4/projects/${IPHREEQCCOM_ID}/trigger/pipeline
- sleep 120
- echo triggering phreeqcrm-src
- curl -X POST -F token=${PHREEQCRM_SRC_TRIGGER} -F ref=master https://code.chs.usgs.gov/api/v4/projects/${PHREEQCRM_SRC_ID}/trigger/pipeline
- sleep 120
## Upstream Projects
## phreeqc3-src https://code.chs.usgs.gov/coupled/subtrees/phreeqc3-src

View File

@ -106,8 +106,10 @@ trigger-downstream:
script:
- echo triggering iphreeqc-src
- curl -X POST -F token=${IPHREEQC_SRC_TRIGGER} -F ref=master https://code.chs.usgs.gov/api/v4/projects/${IPHREEQC_SRC_ID}/trigger/pipeline
- sleep 120
- echo triggering phreeqc3
- curl -X POST -F token=${PHREEQC3_TRIGGER} -F ref=master https://code.chs.usgs.gov/api/v4/projects/${PHREEQC3_ID}/trigger/pipeline
- sleep 360
## Upstream Projects
## phreeqc3-src-common https://code.chs.usgs.gov/coupled/subtrees/phreeqc3-src-common

View File

@ -1593,6 +1593,12 @@ protected:
int initial_solution_isotopes;
std::vector<class calculate_value*> calculate_value;
std::map<std::string, class calculate_value*> calculate_value_map;
public:
std::map<std::string, class calculate_value*>& GetCalculateValueMap()
{
return this->calculate_value_map;
}
protected:
std::vector<class isotope_ratio*> isotope_ratio;
std::map<std::string, class isotope_ratio*> isotope_ratio_map;
std::vector<class isotope_alpha*> isotope_alpha;

View File

@ -39,8 +39,10 @@ trigger-downstream:
script:
- echo triggering phreeqc3-src
- curl -X POST -F token=${PHREEQC3_SRC_TRIGGER} -F ref=master https://code.chs.usgs.gov/api/v4/projects/${PHREEQC3_SRC_ID}/trigger/pipeline
- sleep 120
- echo triggering wphast
- curl -X POST -F token=${WPHAST_TRIGGER} -F ref=master https://code.chs.usgs.gov/api/v4/projects/${WPHAST_ID}/trigger/pipeline
- sleep 180
## Upstream Projects
## none

View File

@ -0,0 +1,6 @@
#!/bin/sh
# see https://en.wikipedia.org/wiki/Windows-1252
iconv --to-code=UTF-8 --from-code=WINDOWS-1252 print.cpp > print.utf-8.cpp
if grep -q '^// -\*- coding: windows-1252 -\*-$' print.utf-8.cpp; then
sed -i '1d' print.utf-8.cpp
fi

View File

@ -0,0 +1,7 @@
#!/bin/sh
# see https://en.wikipedia.org/wiki/Windows-1252
# and https://en.wikipedia.org/wiki/ISO/IEC_8859
iconv --to-code=WINDOWS-1252 --from-code=UTF-8 print.cpp > print.windows-1252.cpp
grep -q '^// -\*- coding: windows-1252 -\*-$' print.windows-1252.cpp \
|| echo '// -*- coding: windows-1252 -*-' | cat - print.windows-1252.cpp > print.tmp.cpp \
&& mv print.tmp.cpp print.windows-1252.cpp

View File

@ -1,4 +1,3 @@
// -*- coding: windows-1252 -*-
#include "Utils.h"
#include "Phreeqc.h"
#include "phqalloc.h"
@ -1462,7 +1461,7 @@ print_species(void)
"Molality", "Activity", "Molality", "Activity", "Gamma", "cm3/mol"));
#else
output_msg(sformatf(" %-13s%12s%12s%10s%10s%10s%11s\n\n", "Species",
"Molality", "Activity", "Molality", "Activity", "Gamma", "cm³/mol"));
"Molality", "Activity", "Molality", "Activity", "Gamma", "cm³/mol"));
#endif
/*
* Print list of species
@ -1630,7 +1629,7 @@ print_surface(void)
#ifdef NO_UTF8_ENCODING
output_msg(sformatf("\t%11.3e sigma, C/m2\n",
#else
output_msg(sformatf("\t%11.3e sigma, C/m²\n",
output_msg(sformatf("\t%11.3e sigma, C/m²\n",
#endif
(double) (charge * F_C_MOL /
(charge_ptr->Get_specific_area() *
@ -1641,7 +1640,7 @@ print_surface(void)
#ifdef NO_UTF8_ENCODING
output_msg(sformatf("\tundefined sigma, C/m2\n"));
#else
output_msg(sformatf("\tundefined sigma, C/m²\n"));
output_msg(sformatf("\tundefined sigma, C/m²\n"));
#endif
}
if (use.Get_surface_ptr()->Get_type() == cxxSurface::CCM)
@ -1663,7 +1662,7 @@ print_surface(void)
#ifdef NO_UTF8_ENCODING
"\t%11.3e specific area, m2/mol %s\n",
#else
"\t%11.3e specific area, m²/mol %s\n",
"\t%11.3e specific area, m²/mol %s\n",
#endif
(double) charge_ptr->Get_specific_area(),
comp_ptr->Get_phase_name().c_str()));
@ -1671,7 +1670,7 @@ print_surface(void)
#ifdef NO_UTF8_ENCODING
"\t%11.3e m2 for %11.3e moles of %s\n\n",
#else
"\t%11.3e m² for %11.3e moles of %s\n\n",
"\t%11.3e m² for %11.3e moles of %s\n\n",
#endif
(double) (charge_ptr->Get_grams() *
charge_ptr->Get_specific_area()),
@ -1684,7 +1683,7 @@ print_surface(void)
#ifdef NO_UTF8_ENCODING
"\t%11.3e specific area, m2/mol %s\n",
#else
"\t%11.3e specific area, m²/mol %s\n",
"\t%11.3e specific area, m²/mol %s\n",
#endif
(double) charge_ptr->Get_specific_area(),
comp_ptr->Get_rate_name().c_str()));
@ -1692,7 +1691,7 @@ print_surface(void)
#ifdef NO_UTF8_ENCODING
"\t%11.3e m2 for %11.3e moles of %s\n\n",
#else
"\t%11.3e m² for %11.3e moles of %s\n\n",
"\t%11.3e m² for %11.3e moles of %s\n\n",
#endif
(double) (charge_ptr->Get_grams() *
charge_ptr->Get_specific_area()),
@ -1705,13 +1704,13 @@ print_surface(void)
#ifdef NO_UTF8_ENCODING
"\t%11.3e specific area, m2/g\n",
#else
"\t%11.3e specific area, m²/g\n",
"\t%11.3e specific area, m²/g\n",
#endif
(double) charge_ptr->Get_specific_area()));
#ifdef NO_UTF8_ENCODING
output_msg(sformatf("\t%11.3e m2 for %11.3e g\n\n",
#else
output_msg(sformatf("\t%11.3e m² for %11.3e g\n\n",
output_msg(sformatf("\t%11.3e m² for %11.3e g\n\n",
#endif
(double) (charge_ptr->Get_specific_area() *
charge_ptr->Get_grams()),
@ -1926,28 +1925,28 @@ print_surface_cd_music(void)
#ifdef NO_UTF8_ENCODING
"\t%11.3e sigma, plane 0, C/m2\n",
#else
"\t%11.3e sigma, plane 0, C/m²\n",
"\t%11.3e sigma, plane 0, C/m²\n",
#endif
(double) charge_ptr->Get_sigma0()));
output_msg(sformatf(
#ifdef NO_UTF8_ENCODING
"\t%11.3e sigma, plane 1, C/m2\n",
#else
"\t%11.3e sigma, plane 1, C/m²\n",
"\t%11.3e sigma, plane 1, C/m²\n",
#endif
(double) charge_ptr->Get_sigma1()));
output_msg(sformatf(
#ifdef NO_UTF8_ENCODING
"\t%11.3e sigma, plane 2, C/m2\n",
#else
"\t%11.3e sigma, plane 2, C/m²\n",
"\t%11.3e sigma, plane 2, C/m²\n",
#endif
(double) charge_ptr->Get_sigma2()));
output_msg(sformatf(
#ifdef NO_UTF8_ENCODING
"\t%11.3e sigma, diffuse layer, C/m2\n\n",
#else
"\t%11.3e sigma, diffuse layer, C/m²\n\n",
"\t%11.3e sigma, diffuse layer, C/m²\n\n",
#endif
(double) charge_ptr->Get_sigmaddl()));
}
@ -1956,7 +1955,7 @@ print_surface_cd_music(void)
#ifdef NO_UTF8_ENCODING
output_msg(sformatf("\tundefined sigma, C/m2\n"));
#else
output_msg(sformatf("\tundefined sigma, C/m²\n"));
output_msg(sformatf("\tundefined sigma, C/m²\n"));
#endif
}
output_msg(sformatf("\t%11.3e psi, plane 0, V\n",
@ -2215,7 +2214,7 @@ print_totals(void)
"Specific Conductance (uS/cm, ", tc_x, "oC) = ", (int) SC));
#else
output_msg(sformatf("%35s%3.0f%7s%i\n",
"Specific Conductance (µS/cm, ", tc_x, "°C) = ", (int) SC));
"Specific Conductance (µS/cm, ", tc_x, "°C) = ", (int) SC));
#endif
}
/* VP: Density Start */
@ -2225,7 +2224,7 @@ print_totals(void)
#ifdef NO_UTF8_ENCODING
output_msg(sformatf("%45s%9.5f", "Density (g/cm3) = ",
#else
output_msg(sformatf("%45s%9.5f", "Density (g/cm³) = ",
output_msg(sformatf("%45s%9.5f", "Density (g/cm³) = ",
#endif
(double) dens));
if (state == INITIAL_SOLUTION && use.Get_solution_ptr()->Get_initial_data()->Get_calc_density())
@ -2250,7 +2249,7 @@ print_totals(void)
" (solute contributions limited to 200 oC)"));
#else
output_msg(sformatf("%18s\n",
" (solute contributions limited to 200 °C)"));
" (solute contributions limited to 200 °C)"));
#endif
}
else output_msg(sformatf("\n"));
@ -2280,7 +2279,7 @@ print_totals(void)
#ifdef NO_UTF8_ENCODING
output_msg(sformatf("%45s%6.2f\n", "Temperature (oC) = ",
#else
output_msg(sformatf("%45s%6.2f\n", "Temperature (°C) = ",
output_msg(sformatf("%45s%6.2f\n", "Temperature (°C) = ",
#endif
(double) tc_x));