Skip to content
Snippets Groups Projects
Commit f78b6700 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

clang-format ChemistryLib

parent 0352ceb8
No related branches found
No related tags found
No related merge requests found
Showing
with 57 additions and 35 deletions
......@@ -9,6 +9,7 @@
*/
#include "CreateChargeBalance.h"
#include "BaseLib/ConfigTree.h"
#include "BaseLib/Error.h"
#include "ChargeBalance.h"
......
......@@ -243,14 +243,14 @@ void PhreeqcIO::initializeChemicalSystemConcrete(
for (auto& kinetic_reactant : _chemical_system->kinetic_reactants)
{
initializeReactantMolality(kinetic_reactant, chemical_system_id, medium, pos,
t);
initializeReactantMolality(kinetic_reactant, chemical_system_id, medium,
pos, t);
}
for (auto& equilibrium_reactant : _chemical_system->equilibrium_reactants)
{
initializeReactantMolality(equilibrium_reactant, chemical_system_id, medium,
pos, t);
initializeReactantMolality(equilibrium_reactant, chemical_system_id,
medium, pos, t);
}
}
......
......@@ -8,10 +8,11 @@
*
*/
#include "AqueousSolution.h"
#include <cmath>
#include <ostream>
#include "AqueousSolution.h"
#include "ChemistryLib/Common/ChargeBalance.h"
#include "MeshLib/PropertyVector.h"
......
......@@ -9,8 +9,8 @@
*/
#include "ChemicalSystem.h"
#include "AqueousSolution.h"
#include "AqueousSolution.h"
#include "MathLib/LinAlg/MatrixVectorTraits.h"
#include "MathLib/LinAlg/UnifiedMatrixSetters.h"
......
......@@ -9,6 +9,7 @@
*/
#include "CreateAqueousSolution.h"
#include "AqueousSolution.h"
#include "BaseLib/ConfigTree.h"
#include "ChemistryLib/Common/CreateChargeBalance.h"
......
......@@ -9,6 +9,7 @@
*/
#include "CreateChemicalSystem.h"
#include "BaseLib/ConfigTree.h"
#include "ChemicalSystem.h"
#include "CreateAqueousSolution.h"
......
......@@ -53,8 +53,11 @@ std::vector<EquilibriumReactant> createEquilibriumReactants(
mesh, name + "_avg", MeshLib::MeshItemType::Cell, 1);
mesh_prop_molality->resize(mesh.getNumberOfElements());
equilibrium_reactants.emplace_back(
std::move(name), molality, volume_fraction, mesh_prop_molality, saturation_index);
equilibrium_reactants.emplace_back(std::move(name),
molality,
volume_fraction,
mesh_prop_molality,
saturation_index);
}
return equilibrium_reactants;
......
......@@ -9,6 +9,7 @@
*/
#include "CreateKnobs.h"
#include "BaseLib/ConfigTree.h"
#include "Knobs.h"
......
......@@ -8,12 +8,13 @@
*
*/
#include "CreateOutput.h"
#include <algorithm>
#include <numeric>
#include "AqueousSolution.h"
#include "ChemicalSystem.h"
#include "CreateOutput.h"
#include "KineticReactant.h"
#include "UserPunch.h"
......
......@@ -9,6 +9,7 @@
*/
#include "CreateSolutionComponent.h"
#include "AqueousSolution.h"
#include "BaseLib/ConfigTree.h"
......
......@@ -8,21 +8,24 @@
*
*/
#include <iostream>
#include "Dump.h"
#include <iostream>
namespace ChemistryLib
{
namespace PhreeqcIOData
{
void Dump::print(std::ostream& os, std::size_t const num_chemical_systems) const
{
os << "DUMP" << "\n";
os << "DUMP"
<< "\n";
os << "-file " << dump_file << "\n";
os << "-append false" << "\n";
os << "-append false"
<< "\n";
os << "-solution 1-" << num_chemical_systems << "\n";
os << "END" << "\n";
os << "END"
<< "\n";
}
void Dump::readDumpFile(std::istream& in,
......
......@@ -8,10 +8,10 @@
*
*/
#include <ostream>
#include "EquilibriumReactant.h"
#include <ostream>
namespace ChemistryLib
{
namespace PhreeqcIOData
......
......@@ -8,10 +8,10 @@
*
*/
#include <ostream>
#include "KineticReactant.h"
#include <ostream>
namespace ChemistryLib
{
namespace PhreeqcIOData
......
......@@ -8,17 +8,18 @@
*
*/
#include <ostream>
#include "Knobs.h"
#include <ostream>
namespace ChemistryLib
{
namespace PhreeqcIOData
{
std::ostream& operator<<(std::ostream& os, Knobs const& knobs)
{
os << "KNOBS" << "\n";
os << "KNOBS"
<< "\n";
os << "-iterations " << knobs.max_iterations << "\n";
os << "-convergence_tolerance " << knobs.relative_convergence_tolerance
<< "\n";
......
......@@ -8,10 +8,10 @@
*
*/
#include <ostream>
#include "Output.h"
#include <ostream>
namespace ChemistryLib
{
namespace PhreeqcIOData
......@@ -19,7 +19,8 @@ namespace PhreeqcIOData
std::ostream& operator<<(std::ostream& os,
BasicOutputSetups const& basic_output_setups)
{
os << "SELECTED_OUTPUT" << "\n";
os << "SELECTED_OUTPUT"
<< "\n";
os << "-file " << basic_output_setups.output_file << "\n";
os << "-high_precision " << std::boolalpha
<< basic_output_setups.use_high_precision << "\n";
......
......@@ -8,10 +8,10 @@
*
*/
#include <ostream>
#include "ReactionRate.h"
#include <ostream>
namespace ChemistryLib
{
namespace PhreeqcIOData
......@@ -19,14 +19,16 @@ namespace PhreeqcIOData
std::ostream& operator<<(std::ostream& os, ReactionRate const& reaction_rate)
{
os << reaction_rate.kinetic_reactant << "\n";
os << "-start" << "\n";
os << "-start"
<< "\n";
int line_number = 1;
for (auto const& expression_statement : reaction_rate.expression_statements)
{
os << line_number << " " << expression_statement << "\n";
++line_number;
}
os << "-end" << "\n";
os << "-end"
<< "\n";
return os;
}
......
......@@ -8,10 +8,10 @@
*
*/
#include <ostream>
#include "Surface.h"
#include <ostream>
namespace ChemistryLib
{
namespace PhreeqcIOData
......
......@@ -9,6 +9,7 @@
*/
#include "UserPunch.h"
#include "BaseLib/ConfigTreeUtil.h"
namespace ChemistryLib
......@@ -25,7 +26,8 @@ void UserPunch::initialize(std::size_t const num_chemical_systems)
std::ostream& operator<<(std::ostream& os, UserPunch const& user_punch)
{
os << "USER_PUNCH" << "\n";
os << "USER_PUNCH"
<< "\n";
os << "-headings ";
auto const& secondary_variables = user_punch.secondary_variables;
for (auto& secondary_variable : secondary_variables)
......@@ -34,14 +36,16 @@ std::ostream& operator<<(std::ostream& os, UserPunch const& user_punch)
}
os << "\n";
os << "-start" << "\n";
os << "-start"
<< "\n";
int line_number = 1;
for (auto const& statement : user_punch.statements)
{
os << line_number << " " << statement << "\n";
++line_number;
}
os << "-end" << "\n";
os << "-end"
<< "\n";
return os;
}
......
......@@ -9,6 +9,7 @@
*/
#include "CreateInitialAqueousSolution.h"
#include "BaseLib/ConfigTree.h"
#include "BaseLib/Error.h"
#include "ChemistryLib/Common/ChargeBalance.h"
......
......@@ -8,10 +8,10 @@
*
*/
#include <algorithm>
#include "KineticReactant.h"
#include <algorithm>
namespace ChemistryLib
{
namespace PhreeqcKernelData
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment