Skip to content
Snippets Groups Projects
Commit 8bdcd929 authored by renchao.lu's avatar renchao.lu
Browse files

Clean up clang-tidy warning.

parent 18aaf83b
No related branches found
No related tags found
No related merge requests found
...@@ -412,7 +412,9 @@ std::istream& operator>>(std::istream& in, PhreeqcIO& phreeqc_io) ...@@ -412,7 +412,9 @@ std::istream& operator>>(std::istream& in, PhreeqcIO& phreeqc_io)
{ {
// Skip equilibrium calculation result of initial solution // Skip equilibrium calculation result of initial solution
for (int i = 0; i < num_skipped_lines; ++i) for (int i = 0; i < num_skipped_lines; ++i)
{
in.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); in.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
}
// Get calculation result of the solution after the reaction // Get calculation result of the solution after the reaction
if (!std::getline(in, line)) if (!std::getline(in, line))
......
...@@ -20,7 +20,9 @@ std::vector<SurfaceSite> createSurface( ...@@ -20,7 +20,9 @@ std::vector<SurfaceSite> createSurface(
boost::optional<BaseLib::ConfigTree> const& config) boost::optional<BaseLib::ConfigTree> const& config)
{ {
if (!config) if (!config)
{
return {}; return {};
}
std::vector<SurfaceSite> surface; std::vector<SurfaceSite> surface;
for (auto const& site_config : for (auto const& site_config :
......
...@@ -22,7 +22,9 @@ std::unique_ptr<UserPunch> createUserPunch( ...@@ -22,7 +22,9 @@ std::unique_ptr<UserPunch> createUserPunch(
MeshLib::Mesh const& mesh) MeshLib::Mesh const& mesh)
{ {
if (!config) if (!config)
{
return nullptr; return nullptr;
}
std::vector<SecondaryVariable> secondary_variables; std::vector<SecondaryVariable> secondary_variables;
for (auto const& variable_name : for (auto const& variable_name :
......
...@@ -19,7 +19,8 @@ namespace PhreeqcIOData ...@@ -19,7 +19,8 @@ namespace PhreeqcIOData
{ {
struct Dump struct Dump
{ {
Dump(std::string project_file_name) : dump_file(project_file_name + ".dmp") explicit Dump(std::string project_file_name)
: dump_file(project_file_name + ".dmp")
{ {
} }
......
...@@ -20,7 +20,9 @@ std::ostream& operator<<(std::ostream& os, UserPunch const& user_punch) ...@@ -20,7 +20,9 @@ std::ostream& operator<<(std::ostream& os, UserPunch const& user_punch)
os << "-headings "; os << "-headings ";
auto const& secondary_variables = user_punch.secondary_variables; auto const& secondary_variables = user_punch.secondary_variables;
for (auto& secondary_variable : secondary_variables) for (auto& secondary_variable : secondary_variables)
{
os << secondary_variable.name.c_str() << " "; os << secondary_variable.name.c_str() << " ";
}
os << "\n"; os << "\n";
os << "-start" << "\n"; os << "-start" << "\n";
......
...@@ -513,8 +513,10 @@ public: ...@@ -513,8 +513,10 @@ public:
w * dNdx.transpose() * density * K_over_mu * dNdx; w * dNdx.transpose() * density * K_over_mu * dNdx;
if (_process_data.has_gravity) if (_process_data.has_gravity)
{
local_b.noalias() += local_b.noalias() +=
w * density * density * dNdx.transpose() * K_over_mu * b; w * density * density * dNdx.transpose() * K_over_mu * b;
}
// coupling term // coupling term
{ {
......
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